forked from rperez1989/CodeRevisor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProcedureNLqILiqInterface.txt
66 lines (58 loc) · 1.7 KB
/
ProcedureNLqILiqInterface.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
======OBJECT = ProcedureNLqILiqInterface === NLq ILiq Interface=====
=== RULES ===
parm(in:&LqTskId);
=== PROCEDURE SOURCE ===
/*
2016-03-02 DV Created.
Insert into LqInt completed task's information.
*/
for each LqTskB
order LqTskBId
where LqTskId = &LqTskId
//new books
if (LqTskBShNQ > 0)
PGet001('LQINT', &AuxId)
&LqInt.LqIntID = &AuxId
&LqInt.LqIntTC = "TXT"
&LqInt.LqIntStrN = LqTskShStr
&LqInt.LqIntDept = trim(str(PGetPr23()))
&LqInt.LqIntDate = LqTskInsOn
&LqInt.LqIntLiqN = LqTskId
&LqInt.LqIntLiqr = LQRName.Trim()
&LqInt.LqIntRefN = LqTskRefN.Trim()
&LqInt.LqIntQty = LqTskBShNQ
&LqInt.LqIntBRP = LqTskBPRSN
&LqInt.LqIntBREP = round((LqTskBPRSN * LqTskBShNQ),2)
&LqInt.LqIntBLP = LqTskBPrc
&LqInt.LqIntBLEP = round((LqTskBPrc * LqTskBShNQ),2)
&LqInt.LqIntEAN = LqTskBEAN.Trim()
&LqInt.LqIntAthr = LqTskBAthr.Trim()
&LqInt.LqIntTtle = LqTskBTtl.Trim()
&LqInt.LqIntAPSts = 'PE'
&LqInt.LqIntTStmp = servernow()
&LqInt.Save()
endif
//used books
if (LqTskBShUQ > 0)
PGet001('LQINT', &AuxId)
&LqInt.LqIntID = &AuxId
&LqInt.LqIntTC = "TXT"
&LqInt.LqIntStrN = LqTskShStr
&LqInt.LqIntDept = trim(str(PGetPr24()))
&LqInt.LqIntDate = LqTskInsOn
&LqInt.LqIntLiqN = LqTskId
&LqInt.LqIntLiqr = LQRName.Trim()
&LqInt.LqIntRefN = LqTskRefN.Trim()
&LqInt.LqIntQty = LqTskBShUQ
&LqInt.LqIntBRP = LqTskBPRSU
&LqInt.LqIntBREP = round((LqTskBPRSU * LqTskBShUQ),2)
&LqInt.LqIntBLP = LqTskBPrc
&LqInt.LqIntBLEP = round((LqTskBPrc * LqTskBShUQ),2)
&LqInt.LqIntEAN = LqTskBEAN.Trim()
&LqInt.LqIntAthr = LqTskBAthr.Trim()
&LqInt.LqIntTtle = LqTskBTtl.Trim()
&LqInt.LqIntAPSts = 'PE'
&LqInt.LqIntTStmp = servernow()
&LqInt.Save()
endif
endfor