mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
Added more required fields to e-invoice
This commit is contained in:
parent
5b19bf9bca
commit
ab45e86b47
@ -113,6 +113,10 @@ class ZugferdEDokument extends AbstractService
|
|||||||
$this->xdocument->addDocumentSellerTaxRegistration("FC", $company->getSetting('vat_number'));
|
$this->xdocument->addDocumentSellerTaxRegistration("FC", $company->getSetting('vat_number'));
|
||||||
} else {
|
} else {
|
||||||
$this->xdocument->addDocumentSellerTaxRegistration("VA", $company->getSetting('vat_number'));
|
$this->xdocument->addDocumentSellerTaxRegistration("VA", $company->getSetting('vat_number'));
|
||||||
|
|
||||||
|
}
|
||||||
|
if (!empty($client->vat_number)){
|
||||||
|
$this->xdocument->addDocumentBuyerTaxRegistration("VA", $client->vat_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
$invoicing_data = $this->document->calc();
|
$invoicing_data = $this->document->calc();
|
||||||
@ -149,7 +153,7 @@ class ZugferdEDokument extends AbstractService
|
|||||||
$linenetamount -= $linenetamount * ($item->discount / 100);
|
$linenetamount -= $linenetamount * ($item->discount / 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->xdocument->setDocumentPositionLineSummation($linenetamount);
|
$this->xdocument->setDocumentPositionLineSummation($linenetamount, $item->line_total-$linenetamount);
|
||||||
// According to european law, each line item can only have one tax rate
|
// According to european law, each line item can only have one tax rate
|
||||||
if (!(empty($item->tax_name1) && empty($item->tax_name2) && empty($item->tax_name3))) {
|
if (!(empty($item->tax_name1) && empty($item->tax_name2) && empty($item->tax_name3))) {
|
||||||
$taxtype = $this->getTaxType($item->tax_id);
|
$taxtype = $this->getTaxType($item->tax_id);
|
||||||
@ -190,7 +194,12 @@ class ZugferdEDokument extends AbstractService
|
|||||||
$this->xdocument->setDocumentSummation($this->document->amount, $this->document->balance, $invoicing_data->getSubTotal(), $invoicing_data->getTotalSurcharges(), $invoicing_data->getTotalDiscount(), $invoicing_data->getSubTotal(), $invoicing_data->getItemTotalTaxes(), 0.0, $this->document->amount - $this->document->balance);
|
$this->xdocument->setDocumentSummation($this->document->amount, $this->document->balance, $invoicing_data->getSubTotal(), $invoicing_data->getTotalSurcharges(), $invoicing_data->getTotalDiscount(), $invoicing_data->getSubTotal(), $invoicing_data->getItemTotalTaxes(), 0.0, $this->document->amount - $this->document->balance);
|
||||||
|
|
||||||
foreach ($this->tax_map as $item) {
|
foreach ($this->tax_map as $item) {
|
||||||
|
if ($item["tax_type"] == ZugferdDutyTaxFeeCategories::VAT_EXEMPT_FOR_EEA_INTRACOMMUNITY_SUPPLY_OF_GOODS_AND_SERVICES){
|
||||||
|
$this->xdocument->addDocumentTax($item["tax_type"], "VAT", $item["net_amount"], $item["tax_rate"] * $item["net_amount"], $item["tax_rate"] * 100, ctrans('texts.intracommunity_suply'));
|
||||||
|
} else {
|
||||||
$this->xdocument->addDocumentTax($item["tax_type"], "VAT", $item["net_amount"], $item["tax_rate"] * $item["net_amount"], $item["tax_rate"] * 100);
|
$this->xdocument->addDocumentTax($item["tax_type"], "VAT", $item["net_amount"], $item["tax_rate"] * $item["net_amount"], $item["tax_rate"] * 100);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// The validity can be checked using https://portal3.gefeg.com/invoice/validation or https://e-rechnung.bayern.de/app/#/upload
|
// The validity can be checked using https://portal3.gefeg.com/invoice/validation or https://e-rechnung.bayern.de/app/#/upload
|
||||||
|
@ -5104,6 +5104,7 @@ $lang = array(
|
|||||||
'triangular_tax_info' => 'Intra-community triangular transaction',
|
'triangular_tax_info' => 'Intra-community triangular transaction',
|
||||||
'intracommunity_tax_info' => 'Tax-free intra-community delivery',
|
'intracommunity_tax_info' => 'Tax-free intra-community delivery',
|
||||||
'reverse_tax_info' => 'Please note that this supply is subject to reverse charge',
|
'reverse_tax_info' => 'Please note that this supply is subject to reverse charge',
|
||||||
|
'intracommunity_suply'=>'Intra-community supply',
|
||||||
'currency_nicaraguan_cordoba' => 'Nicaraguan Córdoba',
|
'currency_nicaraguan_cordoba' => 'Nicaraguan Córdoba',
|
||||||
'public' => 'Public',
|
'public' => 'Public',
|
||||||
'private' => 'Private',
|
'private' => 'Private',
|
||||||
|
Loading…
Reference in New Issue
Block a user