List of commits:
Subject Hash Author Date (UTC)
c1485 54031cfe6e8c2ba4cdb833be90ffc01ebdf14b07 nac 2015-01-23 01:53:56
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
Commit 54031cfe6e8c2ba4cdb833be90ffc01ebdf14b07 - c1485
Author: nac
Author date (UTC): 2015-01-23 01:53
Committer name: nac
Committer date (UTC): 2015-01-23 01:53
Parent(s): a1a2692751a6743d6f68f6eac84f2b026ebb9307
Signing key:
Tree: 1ca28c141e73fa438ed70916266296dfdb5df21f
File Lines added Lines deleted
mfg/2013/base/src/QAD_CustProfitability.p 46 17
File mfg/2013/base/src/QAD_CustProfitability.p changed (mode: 100644) (index 6376615..1c1a8e5)
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* */
10 9 /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
11 10 /* Report matches gltbrp.p for use by QAD Reporting Framework */ /* Report matches gltbrp.p for use by QAD Reporting Framework */
12 11 /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
 
... ... define var stringVar as char.
1032 1031 custto = trim(stringVar) no-error. custto = trim(stringVar) no-error.
1033 1032 /*c1485* end added code */ /*c1485* end added code */
1034 1033
1034 /*nac*/ if begdt = ? then begdt = low_date.
1035 /*nac*/ if enddt = ? then enddt = hi_date.
1036
1035 1037 if begdt = ? if begdt = ?
1036 1038 then do: then do:
1037 1039 find last glc_cal no-lock find last glc_cal no-lock
 
... ... define var stringVar as char.
1102 1104 /* Run the Trial Balance Report */ /* Run the Trial Balance Report */
1103 1105 {gprun.i ""gltrbl01.p""} {gprun.i ""gltrbl01.p""}
1104 1106 *<<*/ *<<*/
1105
1107 /*nac>>*/
1108 if custto = "" then custto = hi_char.
1109 /*nac<<*/
1110
1111 for each cm_mstr
1112 where
1113 cm_domain = global_domain
1114 and cm_addr >= custfrom
1115 and cm_addr <= custto
1116 no-lock:
1106 1117 for each ih_hist for each ih_hist
1107 1118 where ih_hist.ih_domain = global_domain where ih_hist.ih_domain = global_domain
1108 1119 and ih_inv_date >= begdt and ih_inv_date >= begdt
1109 1120 and ih_inv_date <= enddt and ih_inv_date <= enddt
1110 /*c1485* start added code */
1111 and ih_cust >= custfrom
1112 and ih_cust <= custto
1113 /*c1485* end added code */
1121 /*nac
1122 * /*c1485* start added code */
1123 * and ih_cust >= custfrom
1124 * and ih_cust <= custto
1125 * /*c1485* end added code */
1126 */
1127 /*nac*/ and ih_cust = cm_addr
1114 1128 no-lock no-lock
1115 1129 break by ih_cust: break by ih_cust:
1116 1130 for each idh_hist for each idh_hist
 
... ... define var stringVar as char.
1133 1147 input idh_part). input idh_part).
1134 1148 *<<*/ *<<*/
1135 1149
1150 /*
1136 1151 find cm_mstr where find cm_mstr where
1137 1152 cm_domain = global_domain and cm_domain = global_domain and
1138 1153 cm_addr = ih_cust cm_addr = ih_cust
1139 1154 no-lock no-error. no-lock no-error.
1140 1155 if available cm_mstr then do: if available cm_mstr then do:
1156 */
1141 1157 assign vsort = cm_sort assign vsort = cm_sort
1142 1158 vglobal = if cm_type begins "AU" then "Domestic" else "Export" vglobal = if cm_type begins "AU" then "Domestic" else "Export"
1143 1159 vsegment = substring(cm_type,1,2) vsegment = substring(cm_type,1,2)
1144 1160 vregion = cm_region. vregion = cm_region.
1161 /*
1145 1162 end. end.
1163 */
1146 1164 find pt_mstr where find pt_mstr where
1147 1165 pt_domain = global_domain and pt_domain = global_domain and
1148 1166 pt_part = idh_part pt_part = idh_part
 
... ... define var stringVar as char.
1264 1282 /*gbg*/ end. /*gbg*/ end.
1265 1283 end. end.
1266 1284 end. end.
1267 if last-of(ih_cust) then do:
1285 end.
1286 assign vsort = cm_sort
1287 vglobal = if cm_type begins "AU" then "Domestic" else "Export"
1288 vsegment = substring(cm_type,1,2)
1289 vregion = cm_region.
1290 /* if last-of(ih_cust) then do: */
1268 1291 vfreight = 0. vfreight = 0.
1269 1292 vdiscount = 0. vdiscount = 0.
1270 1293 vterms = 0. vterms = 0.
 
... ... define var stringVar as char.
1278 1301 if available Company then do: if available Company then do:
1279 1302 for each GL where for each GL where
1280 1303 /*c1485* lookup(GLCode, "41745,41765,41725,41735,41755") > 0 */ /*c1485* lookup(GLCode, "41745,41765,41725,41735,41755") > 0 */
1281 /*c1485*/ lookup(GLCode, "41745,41765,41725,41735,41755,51500") > 0
1304 /*c1485*/ lookup(GLCode, "41745,41765,41725,41735,41755,51500,50700") > 0
1282 1305 no-lock: no-lock:
1283 1306 for each PostingLine where for each PostingLine where
1284 1307 PostingLine.Company_ID = Company.Company_ID PostingLine.Company_ID = Company.Company_ID
1285 1308 and PostingLine.GL_ID = GL.GL_ID and PostingLine.GL_ID = GL.GL_ID
1286 1309 and PostingYearPeriod >= begyearper and PostingYearPeriod >= begyearper
1287 1310 and PostingYearPeriod <= endyearper and PostingYearPeriod <= endyearper
1288 and (PostingLineCreditTC + PostingLineDebitTC) <> 0
1311 and (PostingLineDebitTC - PostingLineCreditTC) <> 0
1289 1312 and can-find(first Division where and can-find(first Division where
1290 1313 Division.Division_ID = PostingLine.Division_ID and Division.Division_ID = PostingLine.Division_ID and
1291 DivisionCode = ih_cust)
1314 DivisionCode = cm_addr)
1292 1315 no-lock: no-lock:
1293 1316
1294 1317 create ttCustProfit. create ttCustProfit.
1295 1318 assign assign
1319 /*
1296 1320 ttCustProfit.InvDate = ih_inv_date ttCustProfit.InvDate = ih_inv_date
1297 1321 ttCustProfit.Invbill = ih_bill ttCustProfit.Invbill = ih_bill
1298 1322 ttCustProfit.SoNumber = ih_nbr ttCustProfit.SoNumber = ih_nbr
1299 1323 ttCustProfit.InvoiceNumber = ih_inv_nbr ttCustProfit.InvoiceNumber = ih_inv_nbr
1300 ttCustProfit.InvCust = ih_cust
1324 */
1325 ttCustProfit.InvCust = cm_addr
1301 1326 ttCustProfit.CustSort = vsort ttCustProfit.CustSort = vsort
1302 1327 ttCustProfit.CustRegion = vregion ttCustProfit.CustRegion = vregion
1303 1328 ttCustProfit.CustGlobal = vglobal ttCustProfit.CustGlobal = vglobal
1304 1329 ttCustProfit.CustSegment = vsegment ttCustProfit.CustSegment = vsegment
1305 ttCustProfit.DivCode = ih_cust
1330 ttCustProfit.DivCode = cm_addr
1306 1331 ttCustProfit.LineGLCode = GL.GLCode ttCustProfit.LineGLCode = GL.GLCode
1307 1332 ttCustProfit.RangeBeg = begdt ttCustProfit.RangeBeg = begdt
1308 1333 ttCustProfit.RangeEnd = enddt ttCustProfit.RangeEnd = enddt
 
... ... define var stringVar as char.
1312 1337 if lookup(GL.GLCode,"41745,41765") > 0 if lookup(GL.GLCode,"41745,41765") > 0
1313 1338 then then
1314 1339 ttCustProfit.InvDisc = ttCustProfit.InvDisc =
1315 (PostingLineCreditTC + PostingLineDebitTC).
1340 (PostingLineDebitLC - PostingLineCreditLC).
1316 1341 /*c1485* start added code */ /*c1485* start added code */
1317 1342 else if Gl.GlCode = "51500" else if Gl.GlCode = "51500"
1318 1343 then ttCustProfit.InvFreight = then ttCustProfit.InvFreight =
1319 1344 /*c1485a vfreight. */ /*c1485a vfreight. */
1320 (PostingLineCreditTC + PostingLineDebitTC).
1345 (PostingLineDebitLC - PostingLineCreditLC).
1321 1346 /*c1485* end added code */ /*c1485* end added code */
1347 else if GL.GLCode = "50700"
1348 then
1349 ttCustProfit.Commission =
1350 (PostingLineDebitLC - PostingLineCreditLC).
1322 1351 else else
1323 1352 ttCustProfit.InvTerms = ttCustProfit.InvTerms =
1324 (PostingLineCreditTC + PostingLineDebitTC).
1353 (PostingLineDebitLC - PostingLineCreditLC).
1325 1354 end. end.
1326 1355 end. end.
1327 1356 end. end.
1328 1357 end. end.
1329 end.
1330 end.
1358 /* end. */
1359 end.
1331 1360
1332 1361 /* /*
1333 1362 /* Copy the data to the Result Dataset */ /* Copy the data to the Result Dataset */
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