Settlements (Technical Utility methods)

Piece of code that checks if the invoice is already marked with some payment or not

 protected boolean checkIfAlreadyMark(CustVendTransOpen _custVendTransOpen)  
 {  
   specTransManager specTransManager = specTransManager::construct(_custVendTransOpen);  
   return specTransManager.existForOtherSpec(_custVendTransOpen.company(), _custVendTransOpen.TableId, _custVendTransOpen.RecId);  
 }  

Piece of code that settles the invoice with the payment

 protected void markSettlement(CustVendTransOpen _custVendTransOpen)  
 {  
   CustVendOpenTransManager manager = CustVendOpenTransManager::construct(ledgerJournalTrans);  
   manager.updateTransMarked(_custVendTransOpen, true);  
 }  
%d bloggers like this: