use of org.globalqss.model.LCO_MInvoice in project lar_361 by comitsrl.
the class LCO_GenerateWithholding method doIt.
// prepare
/**
* Process
* @return message
* @throws Exception
*/
protected String doIt() throws Exception {
int cnt = 0;
LCO_MInvoice inv = new LCO_MInvoice(getCtx(), p_Record_ID, get_TrxName());
if (inv.getC_Invoice_ID() == 0)
throw new AdempiereUserError("@No@ @Invoice@");
cnt = inv.recalcWithholdings();
if (cnt == -1)
throw new AdempiereUserError("Error calculating withholding, please check log");
return "@Inserted@=" + cnt;
}
Aggregations