diff --git a/app/Services/EDocument/Standards/Peppol.php b/app/Services/EDocument/Standards/Peppol.php index c37fb46214aa..5d833f680ba5 100644 --- a/app/Services/EDocument/Standards/Peppol.php +++ b/app/Services/EDocument/Standards/Peppol.php @@ -188,16 +188,6 @@ class Peppol extends AbstractService $this->countryLevelMutators(); - // $this->p_invoice->PaymentMeans = $this->getPaymentMeans(); - - // $payeeFinancialAccount = (new PayeeFinancialAccount()) - // ->setBankId($company->settings->custom_value1) - // ->setBankName($company->settings->custom_value2); - - // $paymentMeans = (new PaymentMeans()) - // ->setPaymentMeansCode($invoice->custom_value1) - // ->setPayeeFinancialAccount($payeeFinancialAccount); - // $ubl_invoice->setPaymentMeans($paymentMeans); return $this; } @@ -485,7 +475,7 @@ class Peppol extends AbstractService $tax_amount = new TaxAmount(); $tax_amount->currencyID = $this->invoice->client->currency()->code; -$tax_amount->amount = $this->invoice->uses_inclusive_taxes ? $this->calcInclusiveLineTax($item->tax_rate2, $item->line_total) : $this->calcAmountLineTax($item->tax_rate2, $item->line_total); + $tax_amount->amount = $this->invoice->uses_inclusive_taxes ? $this->calcInclusiveLineTax($item->tax_rate2, $item->line_total) : $this->calcAmountLineTax($item->tax_rate2, $item->line_total); $tax_subtotal = new TaxSubtotal(); $tax_subtotal->TaxAmount = $tax_amount; @@ -728,6 +718,26 @@ $tax_amount->amount = $this->invoice->uses_inclusive_taxes ? $this->calcInclusiv return $this; } + private function setPaymentMeans(): self + { + $paymentMeans = new PaymentMeans(); + +// = $this->getPaymentMeans(); + +// $payeeFinancialAccount = (new PayeeFinancialAccount()) +// ->setBankId($company->settings->custom_value1) +// ->setBankName($company->settings->custom_value2); + +// $paymentMeans = (new PaymentMeans()) +// ->setPaymentMeansCode($invoice->custom_value1) +// ->setPayeeFinancialAccount($payeeFinancialAccount); +// $ubl_invoice->setPaymentMeans($paymentMeans); + + $this->p_invoice->PaymentMeans = $paymentMeans; + + return $this; + } + private function DE(): self { // accountingsupplierparty.party.contact MUST be set - Name / Telephone / Electronic Mail