added LSL2 stored procedures

This commit is contained in:
Infineon\StieberD
2024-03-25 14:46:21 -07:00
parent 09f1a66046
commit c667dd56eb
1655 changed files with 527967 additions and 0 deletions

View File

@ -0,0 +1,38 @@
compile function invoice_comm(Branch)
begin condition
pre:
post:
end condition
declare function set_property, fieldcount, get_property, msg
$insert logical
ReturnVar = 0
Branches = 'DUE_DATE_DEF'
convert ',' to @fm in Branches
locate Branch in Branches using @fm setting Bpos then
on Bpos gosub DueDateDefault
end else
Void = msg( '', 'Invalid Branch ':Bpos:' passed to order_comm' )
end
return ReturnVar
*===========================================================================*
DueDateDefault:
Terms = get_property( @window:'.TERMS', 'TEXT' )
convert ' ' to @fm in Terms
begin case
case num( Terms<1> ) and num( Terms<2> )
DaysToAdd = Terms<4>
case num( Terms<2> )
DaysToAdd = Terms<2>
case Terms = 'C.O.D.'
DaysToAdd = 0
case Terms = 'Due Upon Recipt'
DaysToAdd = 10
case otherwise$
DaysToAdd = 10
end case
DayInt = iconv( get_property( @window:'.SHIP_DATE', 'TEXT' ), 'D' )
DayInt += DaysToAdd
ReturnVar = DayInt
return ReturnVar
*============================================================================*