List of commits:
Subject Hash Author Date (UTC)
c1485b a1a2692751a6743d6f68f6eac84f2b026ebb9307 nac 2014-12-09 05:28:32
c1485 4b886da89f1d50501a37d678c8676a485d47f0c1 nac 2014-12-09 05:27:38
c1485 9b651808f47eccc51a50aebd85c9f59c3c9d1697 gbg 2014-09-17 04:43:53
c1485 7edc5474ef79faad54c8f0ea7ea401d3fe0ee412 gbg 2014-09-17 04:40:17
c1485 4ec559b86cfcf3525c05b3067dfc93f95431efab gbg 2014-09-17 04:15:47
c1485 5a7f22188dcae14b979985c75feebb47388be676 gbg 2014-09-16 02:29:31
K2155 2e7558f7db2b6e31da2519cad202b86da09adb9b nac 2014-09-04 01:01:16
k2155 86ded46bdb75580f51d14ba9b9d02c5b0e74199b nac 2014-09-04 00:58:06
c1474 1e6975340fddfad71c1da85972c906b15ad455c3 nac 2014-07-28 03:16:10
c1474 5abda4b993a526d461af27de8e74b352f173e775 gbg 2014-07-03 14:15:32
Update tpl library for EFT Bank File Creation with workaround for amounts 91dab2d3618b99b8758bf65d58cd8facc6df08ff gbg 2014-03-03 07:29:21
d2561 a3d2e47f82c1e0d9b245391d8e9cebec9a900afd gbg 2014-02-21 04:33:43
d2561 46df2f4ab87f400e7d20dfb31faf448d396f04fa gbg 2014-02-21 03:35:00
d2561 5614d485d8c4bcfd6402d6df9f1edbd4d8371305 gbg 2014-02-21 03:23:35
d2561 732b3761194e0c0783b9f31ae2df7541bdcd598f gbg 2014-02-21 01:12:15
d2561 b4b13a6ba9792b545ab63e8dfd600253e321c163 gbg 2014-02-21 00:51:11
d2561 df49e7e8ba5529218cb6c78a3bcaa11b6810830e gbg 2014-02-21 00:44:04
d2561 1ea4b24c354f3797da29ffba02870e0ff674a4d8 gbg 2014-02-21 00:28:48
d2561 377b24a944d64666775de8306b607fb8c9e524ae gbg 2014-02-21 00:00:44
d2561 ddcc8ed0c739b426768a8caf646260bfb008a1d9 gbg 2014-02-20 15:01:12
Commit a1a2692751a6743d6f68f6eac84f2b026ebb9307 - c1485b
Author: nac
Author date (UTC): 2014-12-09 05:28
Committer name: nac
Committer date (UTC): 2014-12-09 05:28
Parent(s): 4b886da89f1d50501a37d678c8676a485d47f0c1
Signing key:
Tree: ec708301be8d376ce04f48c66d00675f4833f5b8
File Lines added Lines deleted
mfg/2013/base/src/QAD_CustProfitability.p 93 80
File mfg/2013/base/src/QAD_CustProfitability.p changed (mode: 100644) (index 4eda6f0..6376615)
6 6 /* REVISION: 1.0 LAST MODIFIED: 20-MAY-2013 BY: gbg *c1407* */ /* REVISION: 1.0 LAST MODIFIED: 20-MAY-2013 BY: gbg *c1407* */
7 7 /* REVISION: 1.0 LAST MODIFIED: 16-SEP-2014 BY: gbg *c1485* */ /* REVISION: 1.0 LAST MODIFIED: 16-SEP-2014 BY: gbg *c1485* */
8 8 /* REVISION: 1.0 LAST MODIFIED: 18-NOV-2014 BY: nac *c1485a* */ /* REVISION: 1.0 LAST MODIFIED: 18-NOV-2014 BY: nac *c1485a* */
9 /* REVISION: 1.0 LAST MODIFIED: 09-DEC-2014 BY: nac *c1485b* */
9 10 /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
10 11 /* Report matches gltbrp.p for use by QAD Reporting Framework */ /* Report matches gltbrp.p for use by QAD Reporting Framework */
11 12 /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
 
... ... define temp-table ttCustProfit no-undo
59 60 field InvTerms as dec field InvTerms as dec
60 61 field RangeBeg as date field RangeBeg as date
61 62 field RangeEnd as date field RangeEnd as date
63 field tbegyearper as int
64 field tendyearper as int
62 65 . .
63 66
64 67 /*c1485* start added code */ /*c1485* start added code */
65 68 define temp-table ttReportOptions no-undo define temp-table ttReportOptions no-undo
66 69 field rptDateBegin as char field rptDateBegin as char
67 field rptEndDate as char
70 field rptDateEnd as char
68 71 field rptCustFrom as char field rptCustFrom as char
69 72 field rptCustTo as char field rptCustTo as char
70 73 . .
 
... ... run CreateField in reportHandle
675 678
676 679 run CreateField in reportHandle run CreateField in reportHandle
677 680 (buffername, (buffername,
678 "ReportEnd",
681 "RangeEnd",
679 682 "End Date", "End Date",
680 683 "date", "date",
681 684 "99/99/99", "99/99/99",
 
... ... run CreateField in reportHandle
693 696 "", "",
694 697 {&ParameterValueType_Constant}). {&ParameterValueType_Constant}).
695 698
699 run CreateField in reportHandle
700 (buffername,
701 "tbegyearper",
702 "BegYrPr",
703 "int",
704 "999999",
705 "",
706 false,
707 true,
708 true,
709 false,
710 false,
711 false,
712 false,
713 "",
714 {&ParameterOperator_Equals},
715 {&ParameterValueType_Constant},
716 "",
717 {&ParameterValueType_Constant}).
718
719 run CreateField in reportHandle
720 (buffername,
721 "tendyearper",
722 "EndYrPr",
723 "int",
724 "999999",
725 "",
726 false,
727 true,
728 true,
729 false,
730 false,
731 false,
732 false,
733 "",
734 {&ParameterOperator_Equals},
735 {&ParameterValueType_Constant},
736 "",
737 {&ParameterValueType_Constant}).
696 738
697 739 buffername = "ttReportOptions". buffername = "ttReportOptions".
698 740 run CreateBufferHeader in reportHandle run CreateBufferHeader in reportHandle
 
... ... define var stringVar as char.
978 1020
979 1021 /* dates */ /* dates */
980 1022 stringVar = getFilterValue("ttReportOptions", "rptDateBegin", ""). stringVar = getFilterValue("ttReportOptions", "rptDateBegin", "").
1023 /* begdt = date(stringVar) no-error. */
981 1024 begdt = date(stringVar) no-error. begdt = date(stringVar) no-error.
982 stringVar = getFilterValue("ttReportOptions", "rptEndDate", "").
1025 stringVar = getFilterValue("ttReportOptions", "rptDateEnd", "").
983 1026 enddt = date(stringVar) no-error. enddt = date(stringVar) no-error.
984 1027 /*c1485* start added code */ /*c1485* start added code */
985 1028 /* Cust Codes */ /* Cust Codes */
 
... ... define var stringVar as char.
1009 1052 then do: then do:
1010 1053 assign assign
1011 1054 begdt = glc_start begdt = glc_start
1012 begyearper = int(string(glc_year,"9999") + string(glc_per,"99")).
1055 endyearper = int(string(glc_year,"9999") + string(glc_per,"99")).
1013 1056 end. end.
1014 1057 end. end.
1015 1058 end. end.
 
... ... define var stringVar as char.
1038 1081 end. end.
1039 1082 end. end.
1040 1083
1041
1042 /*
1043 if rpt_curr = "" then rpt_curr = base_curr.
1044 if et_report_curr = "" then et_report_curr = rpt_curr.
1045 */
1046
1047 /* initialise dates from calendar */
1048
1049 /*
1050 find first glc_cal no-lock
1084 find last glc_cal no-lock
1051 1085 where glc_domain = global_domain where glc_domain = global_domain
1052 and glc_start <= enddt
1053 and glc_end >= begdt
1054 no-error.
1055 if available glc_cal
1056 then do:
1057 yr = glc_year.
1058 begyearper = int(string(glc_year,"9999") + string(glc_per,"99")).
1059 find first glc_cal no-lock
1060 where glc_domain = global_domain
1061 and glc_year = yr
1062 and glc_per = 1
1063 no-error.
1064 if available glc_cal
1065 then do:
1066 assign
1067 yr_beg = glc_start.
1068 end.
1069 find last glc_cal no-lock
1070 where glc_domain = global_domain
1071 and glc_year = yr
1072 no-error.
1073 if available glc_cal
1074 then do:
1075 assign
1076 yr_end = glc_end
1077 end.
1078 end.
1079 */
1080 find first glc_cal no-lock
1081 where glc_domain = global_domain
1082 and glc_start >= begdt
1086 and glc_start <= begdt
1083 1087 no-error. no-error.
1084 1088 if available glc_cal if available glc_cal
1085 1089 then then
 
... ... define var stringVar as char.
1223 1227 ttCustProfit.LineList = vlist ttCustProfit.LineList = vlist
1224 1228 ttCustProfit.RangeBeg = begdt ttCustProfit.RangeBeg = begdt
1225 1229 ttCustProfit.RangeEnd = enddt ttCustProfit.RangeEnd = enddt
1230 ttCustProfit.tbegyearper = begyearper
1231 ttCustProfit.tendyearper = endyearper
1232
1226 1233 . .
1227 1234
1228 if last-of(ih_cust) then do:
1235 if last-of(idh_inv_nbr) then do:
1236 vfreight = 0.
1237 if ih_trl1_cd <> "10" then
1238 vfreight = ih_trl1_amt.
1239 else if ih_trl2_cd <> "10" then
1240 vfreight = ih_trl2_amt.
1241 else if ih_trl3_cd <> "10" then
1242 vfreight = ih_trl3_amt.
1243 /*gbg*/ if vfreight <> 0
1244 /*gbg*/ then do:
1245 create ttCustProfit.
1246 assign
1247 ttCustProfit.InvDate = ih_inv_date
1248 ttCustProfit.Invbill = ih_bill
1249 ttCustProfit.SoNumber = ih_nbr
1250 ttCustProfit.InvoiceNumber = ih_inv_nbr
1251 ttCustProfit.InvCust = ih_cust
1252 ttCustProfit.CustSort = vsort
1253 ttCustProfit.CustRegion = vregion
1254 ttCustProfit.CustGlobal = vglobal
1255 ttCustProfit.CustSegment = vsegment
1256 ttCustProfit.DivCode = DivisionCode
1257 ttCustProfit.LineGLCode = GL.GLCode
1258 ttCustProfit.InvFreight = vfreight
1259 ttCustProfit.RangeBeg = begdt
1260 ttCustProfit.RangeEnd = enddt
1261 ttCustProfit.tbegyearper = begyearper
1262 ttCustProfit.tendyearper = endyearper
1263 .
1264 /*gbg*/ end.
1265 end.
1266 end.
1267 if last-of(ih_cust) then do:
1229 1268 vfreight = 0. vfreight = 0.
1230 1269 vdiscount = 0. vdiscount = 0.
1231 1270 vterms = 0. vterms = 0.
 
... ... define var stringVar as char.
1242 1281 /*c1485*/ lookup(GLCode, "41745,41765,41725,41735,41755,51500") > 0 /*c1485*/ lookup(GLCode, "41745,41765,41725,41735,41755,51500") > 0
1243 1282 no-lock: no-lock:
1244 1283 for each PostingLine where for each PostingLine where
1245 PostingLine.GL_ID = GL.GL_ID
1284 PostingLine.Company_ID = Company.Company_ID
1285 and PostingLine.GL_ID = GL.GL_ID
1246 1286 and PostingYearPeriod >= begyearper and PostingYearPeriod >= begyearper
1247 1287 and PostingYearPeriod <= endyearper and PostingYearPeriod <= endyearper
1288 and (PostingLineCreditTC + PostingLineDebitTC) <> 0
1248 1289 and can-find(first Division where and can-find(first Division where
1249 1290 Division.Division_ID = PostingLine.Division_ID and Division.Division_ID = PostingLine.Division_ID and
1250 1291 DivisionCode = ih_cust) DivisionCode = ih_cust)
1251 1292 no-lock: no-lock:
1252 /*
1253 display
1254 GL.GLCode
1255 (PostingLineCreditTC + PostingLineDebitTC).
1256 */
1257 1293
1258 1294 create ttCustProfit. create ttCustProfit.
1259 1295 assign assign
 
... ... define var stringVar as char.
1266 1302 ttCustProfit.CustRegion = vregion ttCustProfit.CustRegion = vregion
1267 1303 ttCustProfit.CustGlobal = vglobal ttCustProfit.CustGlobal = vglobal
1268 1304 ttCustProfit.CustSegment = vsegment ttCustProfit.CustSegment = vsegment
1269 ttCustProfit.DivCode = DivisionCode
1305 ttCustProfit.DivCode = ih_cust
1270 1306 ttCustProfit.LineGLCode = GL.GLCode ttCustProfit.LineGLCode = GL.GLCode
1307 ttCustProfit.RangeBeg = begdt
1308 ttCustProfit.RangeEnd = enddt
1309 ttCustProfit.tbegyearper = PostingYearPeriod
1310 ttCustProfit.tendyearper = PostingYearPeriod
1271 1311 . .
1272 1312 if lookup(GL.GLCode,"41745,41765") > 0 if lookup(GL.GLCode,"41745,41765") > 0
1273 1313 then then
 
... ... define var stringVar as char.
1287 1327 end. end.
1288 1328 end. end.
1289 1329 end. end.
1290 if last-of(idh_inv_nbr) then do:
1291 if ih_trl1_cd <> "10" then
1292 vfreight = ih_trl1_amt.
1293 else if ih_trl2_cd <> "10" then
1294 vfreight = ih_trl2_amt.
1295 else if ih_trl3_cd <> "10" then
1296 vfreight = ih_trl3_amt.
1297 /*gbg*/ if vfreight <> 0
1298 /*gbg*/ then do:
1299 create ttCustProfit.
1300 assign
1301 ttCustProfit.InvDate = ih_inv_date
1302 ttCustProfit.Invbill = ih_bill
1303 ttCustProfit.SoNumber = ih_nbr
1304 ttCustProfit.InvoiceNumber = ih_inv_nbr
1305 ttCustProfit.InvCust = ih_cust
1306 ttCustProfit.CustSort = vsort
1307 ttCustProfit.CustRegion = vregion
1308 ttCustProfit.CustGlobal = vglobal
1309 ttCustProfit.CustSegment = vsegment
1310 ttCustProfit.DivCode = DivisionCode
1311 ttCustProfit.LineGLCode = GL.GLCode
1312 ttCustProfit.InvFreight = vfreight
1313 .
1314 /*gbg*/ end.
1315 end.
1316 end.
1317 1330 end. end.
1318 1331
1319 1332 /* /*
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/gbfg55/gbg-20-git

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/gbfg55/gbg-20-git

Clone this repository using git:
git clone git://git.rocketgit.com/user/gbfg55/gbg-20-git

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main