Search in sources :

Example 1 with LCO_MInvoice

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;
}
Also used : AdempiereUserError(org.compiere.util.AdempiereUserError) LCO_MInvoice(org.globalqss.model.LCO_MInvoice)

Aggregations

AdempiereUserError (org.compiere.util.AdempiereUserError)1 LCO_MInvoice (org.globalqss.model.LCO_MInvoice)1