Preorder RML BMD Export

This commit is contained in:
Frank Schubert
2025-04-11 15:20:59 +02:00
parent 91c4bac3ba
commit 4c312c99c5

View File

@@ -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";