Thursday, February 21, 2013

Choose payments means in the danish OIOUBL invoice

When building the OIOUBL invoice you can choose which form of payment should apply. You can choose between bank transfer, FIK 71 and Giro.

How payment information is added to the OIOUBL file is determined from the AX OIOUBL stylesheet.

The stylesheet assumes that you to have used the following payment method codes in AX: "DK:BANK", "DK:FIK" or "DK:GIRO".

According to the code, the stylesheet formats the payment information correct.
If you don't want to work with these codes in AX, you need to change the stylesheet according to look for the codes you are using.

If you are using FIK or Giro, you'd want AX to fill the field CustInvoiceJour.PaymId with payment reference information. This is however not implemented for Denmark, but only Norway.

PaymentId is set from code in:
\Classes\CustPostInvoice\run (\Classes\CustPostInvoice\runInternal in R3)

You need to choose the the correct Giro type for the invoice when doing the invoice update, to get the right payment id calculation.

With the correct Giro type you only need to add #isoDK to the container here:
if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoNO]) && numberSeq)
        moneyTransferSlip = PaymMoneyTransferSlip::construct(custInvoiceJour.GiroType);


        paymId = moneyTransferSlip.ocrField( custInvoiceJour.InvoiceAccount, custInvoiceJour.InvoiceId,

        custInvoiceJour.PaymId = strLRTrim(paymId);

No comments: