kawajanagi
Programmer
Hi,
I want to remove the 0 value from a quantity on an invoice when there is no item number. Right now when I put a comment on a line it puts a 0 under quantity orderd and quantity back ordered because it considers it has an item. So I want to put a condition in these fields so that there is no more 0 when the item is null.
example of what I tried and wasn't succesfull:
NumberVar nLen;
StringVar sNum;
sNum := ToText({INVITEM_CSV.ORDERED},4,",","."
nLen := Length(sNum);
If Right( sNum, 1) = "0" Then
nLen := nLen -1;
If Right( sNum, 2) = "00" Then
nLen := nLen -1;
If Right( sNum, 3) = "000" Then
nLen := nLen -1;
If Right( sNum, 4) = "0000" Then
nLen := nLen -2;
Left(sNum,nLen);
//This is the part I tried to add:
IfNull({INVITEM_CSV.ITEM})
sNum := "";
nLen :="";
//End
Thank you for your time!
I want to remove the 0 value from a quantity on an invoice when there is no item number. Right now when I put a comment on a line it puts a 0 under quantity orderd and quantity back ordered because it considers it has an item. So I want to put a condition in these fields so that there is no more 0 when the item is null.
example of what I tried and wasn't succesfull:
NumberVar nLen;
StringVar sNum;
sNum := ToText({INVITEM_CSV.ORDERED},4,",","."
nLen := Length(sNum);
If Right( sNum, 1) = "0" Then
nLen := nLen -1;
If Right( sNum, 2) = "00" Then
nLen := nLen -1;
If Right( sNum, 3) = "000" Then
nLen := nLen -1;
If Right( sNum, 4) = "0000" Then
nLen := nLen -2;
Left(sNum,nLen);
//This is the part I tried to add:
IfNull({INVITEM_CSV.ITEM})
sNum := "";
nLen :="";
//End
Thank you for your time!