/// <summary> /// Get Total Costs (amt*qty) in Accounting Schema Currency /// </summary> /// <param name="as1">accounting schema</param> /// <param name="AD_Org_ID"></param> /// <param name="costingMethod">if null uses Accounting Schema - AcctSchema.COSTINGMETHOD_*</param> /// <param name="C_OrderLine_ID">optional order line</param> /// <param name="zeroCostsOK">zero/no costs are OK</param> /// <returns>cost or null, if qty or costs cannot be determined</returns> public Decimal?GetProductCosts(MAcctSchema as1, int AD_Org_ID, String costingMethod, int C_OrderLine_ID, bool zeroCostsOK) { if (_qty == null) { log.Fine("No Qty"); return(null); } // No Product if (_product == null) { log.Fine("No Product"); return(null); } // Decimal?cost = MCost.GetCurrentCost(_product, _M_AttributeSetInstance_ID, as1, AD_Org_ID, costingMethod, Utility.Util.GetValueOfDecimal(_qty), C_OrderLine_ID, zeroCostsOK, _trx); if (cost == null || cost == 0) { log.Fine("No Costs"); return(null); } return(cost); }