static double getStockDocLineAmount(DataRow docLine) { double amount = 0; ConstBool isCancelled = (ConstBool)(short)ToolCell.isNull(docLine[TableSTLINE.CANCELLED], (short)ConstBool.yes); ConstLineType lineType = (ConstLineType)(short)ToolCell.isNull(docLine[TableSTLINE.LINETYPE], (short)ConstLineType.undef); if (isCancelled == ConstBool.not && (lineType == ConstLineType.material || lineType == ConstLineType.promotion)) { amount = (double)ToolCell.isNull(docLine[TableSTLINE.AMOUNT], 0.0); ConstIOCode ioCode = (ConstIOCode)(short)ToolCell.isNull(docLine[TableSTLINE.IOCODE], (short)0); switch (ioCode) { case ConstIOCode.input: case ConstIOCode.inputFromWarehouse: amount = +amount; break; case ConstIOCode.output: case ConstIOCode.outputFromWarehouse: amount = -amount; break; default: amount = 0; break; } } return(amount); }
double getFix(object lref, DataRow lRow, DataRowVersion vers) { double fix = 0; if ((string)lref == (string)lRow[TableSTLINE.STOCKREF, vers]) { ConstBool isCancelled = (ConstBool)(short)ToolCell.isNull(lRow[TableSTLINE.CANCELLED, vers], (short)ConstBool.yes); if (isCancelled == ConstBool.not) { ConstLineType lineType = (ConstLineType)(short)ToolCell.isNull(lRow[TableSTLINE.LINETYPE, vers], (short)ConstLineType.undef); double amount = (double)ToolCell.isNull(lRow[TableSTLINE.AMOUNT, vers], (double)0.0); ConstIOCode ioCode = (ConstIOCode)(short)ToolCell.isNull(lRow[TableSTLINE.IOCODE, vers], (short)0); if (lineType == ConstLineType.material || lineType == ConstLineType.promotion) { fix += (amount * getIOSign(ioCode)); } } } return(fix); }
public void Visit(ConstBool constBool) { result.Push(BuiltIns.Bool); }
public void Visit(ConstBool constBool) { }
public void Visit(ConstBool constBool) { result.Push(constBool); }