Monday, July 16, 2018

Add Another Condition to the Submit Action

1. Add the following method CanPostCreditLimit to the salesTabletable.

2. Add the following code to the methods
canPickingListBeUpdate(),canPackingSlipBeUpdated() and canInvoiceBeUpdated() in thesalesTableType class.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
boolean canPostCreditLimit()
{
amountMST creditBalance;
custTable custTable;
;
if (this.CreditLimitApprovalStatus ==
SalesCreditLimitApprovalStatus::Approved)
return true;
if (this.CreditLimitApprovalStatus ==
SalesCreditLimitApprovalStatus::Rejected
|| this.CreditLimitApprovalStatus ==
SalesCreditLimitApprovalStatus::Submitted)
return false;
custTable = this.custTable_InvoiceAccount();
if (!custTable.CreditMax)
return true;
creditBalance = custTable.CreditMax -
custTable.balanceMST();
if (this.amountRemainSalesFinancial() +
this.amountRemainSalesPhysical() < creditBalance)
return true;
return false;
}


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
boolean canPickingListBeUpdated()
{
......
ok = ok && salesTable.canPostCreditLimit();
return ok;
}
boolean canPackingslipBeUpdated()
{
......
ok = ok && salesTable.canPostCreditLimit();
return ok;
}
boolean canInvoiceBeUpdated()
{
......
ok = ok && salesTable.canPostCreditLimit();
return ok;
}

Best Regards,
Hossein Karimi

No comments:

Post a Comment

Configure the Firewall on the Enterprise Portal Server

After you install Enterprise Portal, enable Web Server (HTTP) in Windows Firewall. If you do not enable the web server in Windows Firewall...