flag "Pay Schedule valid" of invoice customer is not update in some case, make invoice not list in search when payment
Description
Environment
Attachments
- 17 Jul 2014, 02:49 AM
relates to
testing discovered
Activity
Carlos Ruiz August 7, 2016 at 11:57 AM
Thanks @Hiep Lq and @Pritesh Shah.
Commited fixes at:
https://bitbucket.org/idempiere/idempiere/commits/8c26148
The second issue reported by @Hiep Lq was solved in https://idempiere.atlassian.net/browse/IDEMPIERE-2135#icft=IDEMPIERE-2135
Pritesh Shah July 2, 2015 at 4:58 AM
I think for the 1st way when copying the existing invoice which is complete and having pay schedule checkbox checked, we should make pay schedule checkbox to have "Allow Copy" as false in Table and Column.
Hiep Lq July 17, 2014 at 7:56 PM
@Carlos Ruiz please help me review below code:
MInvoice.prepareIt () line 1450-1457
if ( getGrandTotal().signum() != 0
&& PAYMENTRULE_OnCredit.equals(getPaymentRule()))
{
if (!createPaySchedule())
{
m_processMsg = "@ErrorPaymentSchedule@";
return DocAction.STATUS_Invalid;
}
}
with payment rule = "Direct Debit" we also can select a "Payment Term".
why in this case "payment rule = "Direct Debit" don't call createPaySchedule?
when a invoice in state
+ complete
+ flag "Pay Schedule valid" = true
+ "Payment Schedule" have non record
it's can't search to payment
have some way to make this state
way 1:
1. copy invoice from other invoice have "Pay Schedule valid" = true
input more info and complete it.
way 2:
1. make new invoice.
2. complete it.
3. make some "Payment Schedule" record and run validate.
=> "Pay Schedule valid" = true
4. delete one "Payment Schedule" record
=> remain "Pay Schedule valid" = true
other "Payment Schedule" is remain validate
solution:
+ reset "Pay Schedule valid" = true when copy
+ when delete "Payment Schedule" record, rerun validate process