mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for the ZUGFeRD implementation
This commit is contained in:
parent
295d6971f6
commit
f4e571fee5
@ -98,8 +98,10 @@ class ZugferdEInvoice extends AbstractService
|
|||||||
if (!empty($item->notes)){
|
if (!empty($item->notes)){
|
||||||
$xrechnung->setDocumentPositionProductDetails($item->product_key, $item->notes);
|
$xrechnung->setDocumentPositionProductDetails($item->product_key, $item->notes);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
$xrechnung->setDocumentPositionProductDetails($item->product_key);
|
$xrechnung->setDocumentPositionProductDetails($item->product_key);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (!empty($item->notes)){
|
if (!empty($item->notes)){
|
||||||
$xrechnung->setDocumentPositionProductDetails($item->notes);
|
$xrechnung->setDocumentPositionProductDetails($item->notes);
|
||||||
@ -161,7 +163,7 @@ class ZugferdEInvoice extends AbstractService
|
|||||||
|
|
||||||
|
|
||||||
if ($this->invoice->isPartial()) {
|
if ($this->invoice->isPartial()) {
|
||||||
$xrechnung->setDocumentSummation($this->invoice->amount, $this->invoice->balance, $invoicing_data->getSubTotal(), $invoicing_data->getTotalSurcharges(), $invoicing_data->getTotalDiscount(), $invoicing_data->getSubTotal(), $invoicing_data->getItemTotalTaxes(), null, $this->invoice->partial);
|
$xrechnung->setDocumentSummation($this->invoice->amount, $this->invoice->balance, $invoicing_data->getSubTotal(), $invoicing_data->getTotalSurcharges(), $invoicing_data->getTotalDiscount(), $invoicing_data->getSubTotal(), $invoicing_data->getItemTotalTaxes(), null, (float) $this->invoice->partial);
|
||||||
} else {
|
} else {
|
||||||
$xrechnung->setDocumentSummation($this->invoice->amount, $this->invoice->balance, $invoicing_data->getSubTotal(), $invoicing_data->getTotalSurcharges(), $invoicing_data->getTotalDiscount(), $invoicing_data->getSubTotal(), $invoicing_data->getItemTotalTaxes(), null, 0.0);
|
$xrechnung->setDocumentSummation($this->invoice->amount, $this->invoice->balance, $invoicing_data->getSubTotal(), $invoicing_data->getTotalSurcharges(), $invoicing_data->getTotalDiscount(), $invoicing_data->getSubTotal(), $invoicing_data->getItemTotalTaxes(), null, 0.0);
|
||||||
}
|
}
|
||||||
@ -236,7 +238,8 @@ class ZugferdEInvoice extends AbstractService
|
|||||||
}
|
}
|
||||||
return $tax_type;
|
return $tax_type;
|
||||||
}
|
}
|
||||||
private function addtoTaxMap(string $tax_type, float $net_amount, float $tax_rate){
|
private function addtoTaxMap(string $tax_type, float $net_amount, float $tax_rate): void
|
||||||
|
{
|
||||||
$hash = hash("md5", $tax_type."-".$tax_rate);
|
$hash = hash("md5", $tax_type."-".$tax_rate);
|
||||||
if (array_key_exists($hash, $this->tax_map)){
|
if (array_key_exists($hash, $this->tax_map)){
|
||||||
$this->tax_map[$hash]["net_amount"] += $net_amount;
|
$this->tax_map[$hash]["net_amount"] += $net_amount;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user