fixes bug 0009294: Happens in Postgres. The description of the payment is null after completing an invoice
authorGorka Mauleon <gorka.mauleon@openbravo.com>
Wed, 03 Jun 2009 13:38:20 +0200
changeset 3956 2ea030117f07
parent 3955 bf55034d6c62
child 3957 f733983eabf8
child 4537 926ca1ff6017
fixes bug 0009294: Happens in Postgres. The description of the payment is null after completing an invoice
src-db/database/model/functions/C_INVOICE_POST.xml
--- a/src-db/database/model/functions/C_INVOICE_POST.xml	Tue Jun 02 22:52:28 2009 +0200
+++ b/src-db/database/model/functions/C_INVOICE_POST.xml	Wed Jun 03 13:38:20 2009 +0200
@@ -1560,7 +1560,7 @@
                   (
                     v_debtPaymentID, v_Client_ID, v_Org_ID, 'Y',
                     now(), v_UpdatedBy, now(), v_UpdatedBy,
-                    v_IsSOTrx, NULL, NULL, '* ' || v_DocumentNo || ' * (' || v_BPartnerName ||( CASE WHEN v_POReference IS NULL THEN '' ELSE ' .Ref:'||TO_CHAR(v_POReference) END) || ' )',
+                    v_IsSOTrx, NULL, NULL, '* ' || v_DocumentNo || ' * (' || COALESCE('' ,v_BPartnerName) ||( CASE WHEN v_POReference IS NULL THEN '' ELSE ' .Ref:'||TO_CHAR(v_POReference) END) || ' )',
                     v_Record_ID, v_BPartner_ID, v_Currency_ID, NULL,
                     v_bankAccount, v_cashBook, CUR_PAYMENTS.PaymentRule, 'N',
                     C_Currency_Round((v_paymentamount *v_multiplierarc) -withholdamount *(v_paymentamount *v_multiplierarc / v_grandtotal), v_Currency_ID, NULL), 0, v_plannedDate, 'N',