File mfg/2013/base/src/xf10e01mb.i added (mode: 100644) (index 0000000..1a198ba) |
|
1 |
|
/* xf10e01mb.i - Formtrap Include file Invoice Print */
|
|
2 |
|
/* Copyright 1986-2009 QAD Inc., Carpinteria, CA, USA. */
|
|
3 |
|
/* All rights reserved worldwide. This is an unpublished work. */
|
|
4 |
|
/*----------------------------------------------------------------------------*/
|
|
5 |
|
/* Revision: eB3SP5 BY: Achint Lele DATE: 02/08/10 ECO: *eb3sp5* */
|
|
6 |
|
/* Revision: QAD2012.1 BY: Steve Hong DATE: 07/10/12 ECO: *93sp12.1 */
|
|
7 |
|
/* BGL LAST MODIFIED: 2016-JUN-17 BY: gbg *D3519* */
|
|
8 |
|
/*----------------------------------------------------------------------------*/
|
|
9 |
|
/*V8:ConvertMode=Report */
|
|
10 |
|
|
|
11 |
|
define variable tot_calc_tax as decimal.
|
|
12 |
|
def var lvLineExcise as dec.
|
|
13 |
|
def var lvLineGST as dec.
|
|
14 |
|
def var lvUnitPrice as dec.
|
|
15 |
|
def var lvExtLine as dec.
|
|
16 |
|
{us/bbi/gprun.i ""xxgetordexcise.p""
|
|
17 |
|
"(sod_nbr,
|
|
18 |
|
sod_line,
|
|
19 |
|
output lvLineExcise,
|
|
20 |
|
output lvLineGST,
|
|
21 |
|
output lvUnitPrice,
|
|
22 |
|
output lvExtLine)"}
|
|
23 |
|
/*d3519* end added code */
|
|
24 |
|
|
|
25 |
|
find first tt_tax where tt_sfb = 0 no-error.
|
|
26 |
|
assign
|
|
27 |
|
tot_tax = if available tt_tax then tt_tax_amt else 0
|
|
28 |
|
tot_ex_tax = if available tt_tax then tt_tax_ex_amt else 0.
|
|
29 |
|
|
|
30 |
|
/*** LINE DETAIL RECORDS ***/
|
|
31 |
|
assign tot_calc_tax = tot_tax + tot_ex_tax.
|
|
32 |
|
if desc2 = "" then
|
|
33 |
|
put stream ft "E" at 001 format "x(01)".
|
|
34 |
|
else
|
|
35 |
|
put stream ft "B" at 001 format "x(01)".
|
|
36 |
|
|
|
37 |
|
/*93sp12.1** added us/xf for all include file */
|
|
38 |
|
put stream ft
|
|
39 |
|
{us/xf/xfput.i sod_line 002 ">>9" } /* line number */
|
|
40 |
|
{us/xf/xfput.i sod_part 005 "x(18)" } /* item number */
|
|
41 |
|
{us/xf/xfput.i sod_taxable 023 "yes/no" } /* taxable */
|
|
42 |
|
{us/xf/xfput.i year(sod_due_date) 026 "9999" } /* due date */
|
|
43 |
|
{us/xf/xfput.i month(sod_due_date) 030 "99" }
|
|
44 |
|
{us/xf/xfput.i day(sod_due_date) 032 "99" }
|
|
45 |
|
{us/xf/xfput.i "(if sod_fsm_type <> 'FSM-RO':U then sod_qty_inv ~
|
|
46 |
|
else if sod_fsm_type = 'FSM-RO':U ~
|
|
47 |
|
and available itm_det then itm_qty_call ~
|
|
48 |
|
else 0)" 034 "->>>>>>>>9.999999999" }
|
|
49 |
|
{us/xf/xfput.i "(if sod_fsm_type <> 'FSM-RO':U then qty_bo ~
|
|
50 |
|
else 0") 054 "->>>>>>>>9.999999999" }
|
|
51 |
|
{us/xf/xfput.i sod_um 074 "x(02)" } /* uom */
|
|
52 |
|
/*d3519* start added code >>> */
|
|
53 |
|
{us/xf/xfput.i lvUnitPrice 076 "->>>>>>>>9.99999" }
|
|
54 |
|
/*d3519* end added code <<< */
|
|
55 |
|
/*d3519* start deleted code >>>
|
|
56 |
|
* {us/xf/xfput.i "(if sod_fsm_type <> 'FSM-RO':U then sod_price ~
|
|
57 |
|
* else if sod_fsm_type = 'FSM-RO':U ~
|
|
58 |
|
* and sod_fix_pr then sod_fixed_price ~
|
|
59 |
|
* else 0)" 076 "->>>>>>>>9.99999" }
|
|
60 |
|
*d3519* end deleted code <<<< */
|
|
61 |
|
{us/xf/xfput.i ext_price 092 "->>>>>>>>9.99999"} /* line value */
|
|
62 |
|
{us/xf/xfput.i sod_site 108 "x(08)" } /* site */
|
|
63 |
|
{us/xf/xfput.i sod_custpart 116 "x(30)" } /* cust item */
|
|
64 |
|
{us/xf/xfput.i desc1 146 "x(24)" } /* item desc 1*/
|
|
65 |
|
{us/xf/xfput.i "(if desc2 <> '' then desc2 ~
|
|
66 |
|
else '')" 170 "x(24)" }
|
|
67 |
|
{us/xf/xfput.i sod_disc_pct 194 "->>9.99" } /* disc % */
|
|
68 |
|
{us/xf/xfput.i sod_list_pr 201 "->>>>>>>>9.99999"} /* list price */
|
|
69 |
|
{us/xf/xfput.i sod_pr_list 217 "x(08)" } /* price list */
|
|
70 |
|
{us/xf/xfput.i tot_tax 225 "->>>>>>>>>>>9.99"} /* Tax Amount */
|
|
71 |
|
{us/xf/xfput.i tot_calc_tax 241 "->>>>>>>>>>>9.99"} /* Line Total incl Tax */
|
|
72 |
|
{us/xf/xfput.i tot_ex_tax 257 "->>>>>>>>>>>9.99"} /* Line Total excl Tax */
|
|
73 |
|
{us/xf/xfput.i year(sod_promise_date) 274 "9999" }
|
|
74 |
|
{us/xf/xfput.i month(sod_promise_date) 278 "99" }
|
|
75 |
|
{us/xf/xfput.i day(sod_promise_date) 280 "99" }
|
|
76 |
|
.
|
|
77 |
|
|
|
78 |
|
if desc2 = ""
|
|
79 |
|
then do :
|
|
80 |
|
{us/xf/xfso10ue.i} /*BLANK TEMPLATE*/
|
|
81 |
|
end.
|
|
82 |
|
else do:
|
|
83 |
|
{us/xf/xfso10ub.i} /*BLANK TEMPLATE*/
|
|
84 |
|
end.
|
|
85 |
|
|
|
86 |
|
put stream ft skip.
|
File mfg/2013/base/src/xxgetordexcise.p copied from file mfg/2013/base/src/xxgetexcise.p (similarity 67%) (mode: 100644) (index 778d0d7..5207f81) |
1 |
|
/* xxgetexcise.p - Return excise on invoice / order line */ |
|
|
1 |
|
/* xxgetordexcise.p - Return excise on invoice / order line */ |
2 |
2 |
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA. */ |
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA. */ |
3 |
3 |
/* All rights reserved worldwide. This is an unpublished work. */ |
/* All rights reserved worldwide. This is an unpublished work. */ |
4 |
4 |
/*---------------------------------------------------------------------------*/ |
/*---------------------------------------------------------------------------*/ |
|
6 |
6 |
/*---------------------------------------------------------------------------*/ |
/*---------------------------------------------------------------------------*/ |
7 |
7 |
{us/bbi/mfdeclre.i} |
{us/bbi/mfdeclre.i} |
8 |
8 |
|
|
9 |
|
define input parameter ipRef as char. |
|
|
9 |
|
define input parameter ipNbr as char. |
10 |
10 |
define input parameter ipLine as int. |
define input parameter ipLine as int. |
11 |
11 |
define output parameter opExcise as dec. |
define output parameter opExcise as dec. |
12 |
12 |
define output parameter opGST as dec. |
define output parameter opGST as dec. |
|
... |
... |
opGST = 0.0. |
20 |
20 |
opUnitPr = 0.0. |
opUnitPr = 0.0. |
21 |
21 |
opExtPr = 0.0. |
opExtPr = 0.0. |
22 |
22 |
|
|
23 |
|
for first idh_hist no-lock |
|
24 |
|
where idh_domain = global_domain |
|
25 |
|
and idh_inv_nbr = ipref |
|
26 |
|
and idh_line = ipLine: |
|
|
23 |
|
for first sod_det no-lock |
|
24 |
|
where sod_domain = global_domain |
|
25 |
|
and sod_nbr = ipref |
|
26 |
|
and sod_line = ipLine: |
27 |
27 |
for each tx2d_det |
for each tx2d_det |
28 |
28 |
no-lock |
no-lock |
29 |
29 |
where tx2d_domain = global_domain |
where tx2d_domain = global_domain |
30 |
30 |
and (tx2d_tax_type = "tax-excise" or tx2d_tax_type = "tax-o") |
and (tx2d_tax_type = "tax-excise" or tx2d_tax_type = "tax-o") |
31 |
|
and tx2d_ref = ipRef |
|
|
31 |
|
and tx2d_nbr = ipNbr |
32 |
32 |
and tx2d_line = ipLine |
and tx2d_line = ipLine |
33 |
33 |
: |
: |
34 |
34 |
case tx2d_tax_type: |
case tx2d_tax_type: |
35 |
35 |
when "tax-excise" then do: |
when "tax-excise" then do: |
36 |
|
opExcise = opExcise + (if idh_qty_inv = 0 then 0 else (tx2d_tax_amt / idh_qty_inv)). |
|
|
36 |
|
opExcise = opExcise + (if sod_qty_inv = 0 then 0 else (tx2d_tax_amt / sod_qty_inv)). |
37 |
37 |
end. |
end. |
38 |
38 |
when "tax-o" then do: |
when "tax-o" then do: |
39 |
|
opGST = opGST + (if idh_qty_inv = 0 then 0 else (tx2d_tax_amt / idh_qty_inv)). |
|
|
39 |
|
opGST = opGST + (if sod_qty_inv = 0 then 0 else (tx2d_tax_amt / sod_qty_inv)). |
40 |
40 |
end. |
end. |
41 |
41 |
end. |
end. |
42 |
42 |
end. |
end. |
43 |
|
opUnitPr = idh_price + opExcise. |
|
44 |
|
opExtPr = idh_qty_inv * opUnitPr. |
|
|
43 |
|
opUnitPr = sod_price + opExcise. |
|
44 |
|
opExtPr = sod_qty_inv * opUnitPr. |
45 |
45 |
end. |
end. |
46 |
46 |
|
|