Incorrect setting of the prepayment field

Description

The method beforeSave on MPayment sets the field IsPrepayment. But it does not correctly because IsPrepayment must be false when:

  • Order>0

  • Invoice>0

  • Charge>0

  • CBPartner=0
    So:
    setIsPrepayment (getC_Charge_ID() == 0
    && getC_BPartner_ID() != 0
    && (getC_Order_ID() == 0

(getC_Project_ID() == 0 && getC_Invoice_ID() == 0)));
It should also be controlled when this field is checked, invoice and charge must be read only. @IsPrepayment@=Y on ReadOnlyLogic

In payment callouts we see that when we establish order, invoice and charge IsPrepayment is changed to false. So the logic on the beforeSave must be like that.

Environment

None

Attachments

1
  • 05 May 2014, 05:06 PM

Activity

Show:

Carlos Ruiz July 11, 2018 at 6:56 PM

Closing as invalid request.

Carlos Ruiz May 7, 2014 at 5:49 PM

, I don't get what's the issue.

The IsPrepayment field is read-only and set just on beforeSave.
Seems like your suggestion is supposing the IsPrepayment field is not readonly but set by the user.

Regards,

Carlos Ruiz

Antonio Cañaveral May 5, 2014 at 5:22 PM
Edited

UPDATE AD_Column SET ReadOnlyLogic='@C_Invoice_ID@!0 | @C_Order_ID@!0 | @IsPrepayment@=Y' where AD_Column_ID=8984
UPDATE AD_Column SET ReadOnlyLogic='@C_Order_ID@!0 | @C_Charge_ID@!0| @IsPrepayment@=Y' where AD_Column_ID=5355
UPDATE AD_Column SET ReadOnlyLogic='@C_Invoice_ID@!0 | @C_Charge_ID@!0 | @IsPrepayment@=Y' where AD_Column_ID=12925
UPDATE AD_Column SET ReadOnlyLogic='@IsPrepayment@=Y' where AD_Column_ID=8554
UPDATE AD_Column SET ReadOnlyLogic='@C_Invoice_ID@!0 | @C_Charge_ID@!0 | @C_Order_ID@!0' where AD_Column_ID=13045

Incomplete

Details

Assignee

Reporter

Priority

Created May 5, 2014 at 4:40 PM
Updated September 1, 2018 at 11:01 AM
Resolved July 11, 2018 at 6:56 PM