diff --git a/application/PreorderBillingInvoice/PreorderBillingInvoiceController.php b/application/PreorderBillingInvoice/PreorderBillingInvoiceController.php index 0a0658eec..fd041cb9b 100644 --- a/application/PreorderBillingInvoice/PreorderBillingInvoiceController.php +++ b/application/PreorderBillingInvoice/PreorderBillingInvoiceController.php @@ -851,8 +851,8 @@ class PreorderBillingInvoiceController extends mfBaseController { $invoice_date = new DateTime($invoice->invoice_date); - $konto = $invoice->customer_number; - $gkonto = $invoice->fibu_revenue_code; + $konto = $invoice->fibu_account_number; + $gkonto = $invoice->fibu_revenue_account; $belegnr = $invoice->invoice_number; $belegdatum = $invoice_date->format("d.m.Y"); $betrag = number_format($invoice->total_gross, 2, ",", ""); @@ -862,9 +862,9 @@ class PreorderBillingInvoiceController extends mfBaseController { $kost = $invoice->fibu_cost_account; if(count($kostentraeger) < 2) { - $csv_line = "$satzart;$konto;$gkonto;$belegnr;$belegdatum;$buchsymbol;$buchcode;$prozent;$steuercode;$betrag;$steuer;\"$text\";$kost"; + $csv_line = "$satzart;$konto;$gkonto;$belegnr;$belegdatum;$buchsymbol;$buchcode;$prozent;$steuercode;$betrag;$steuer;\"$text\";$kost;;"; } else { - $csv_line = "$satzart;$konto;$gkonto;$belegnr;$belegdatum;$buchsymbol;$buchcode;$prozent;$steuercode;$betrag;$steuer;\"$text\";;"; + $csv_line = "$satzart;$konto;$gkonto;$belegnr;$belegdatum;$buchsymbol;$buchcode;$prozent;$steuercode;$betrag;$steuer;\"$text\";;;"; foreach($kostentraeger as $kotraeger => $kobetrag) { $kobetrag_text = number_format($kobetrag, 2, ",", ""); $csv_line .= "\n1;;;;;;;;;;;;$kost;$kotraeger;$kobetrag_text";