geer-builder 1.2.513 → 1.2.517

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,8 +68,8 @@ export default
68
68
  {
69
69
  month_picker: false,
70
70
  link: '',
71
- report_options: ['Completed Transaction', 'Pending Transaction','For Pick Up Transaction', 'Voided Transaction'],
72
- report_type: 'Completed Transaction',
71
+ report_options: ['All Transactions','Completed Transactions', 'Pending Transactions','For Pick Up Transactions', 'Voided Transactions'],
72
+ report_type: 'All Transactions',
73
73
  filter: {
74
74
  from: '',
75
75
  to: '',
@@ -78,6 +78,9 @@ export default
78
78
  month_pick: '',
79
79
  public_settings: {},
80
80
  db_sale: new DB_SALE(),
81
+ payment_method:[],
82
+ filtered_cashier_method:[],
83
+ header:["Sale No.", "Customer Slot","Customer Name", "Customer Email", "Stockist", "Sub Total", "Discount", "Grand Total","Transction Date", "Claim Code", "Remarks","Status"],
81
84
  }),
82
85
  async mounted()
83
86
  {
@@ -85,9 +88,19 @@ export default
85
88
  this.filter.from = moment().format('YYYY/MM/DD');
86
89
  this.filter.to = moment().format('YYYY/MM/DD');
87
90
  this.public_settings = await this.$_getData('public_settings');
91
+ await this.getPaymentMethod();
88
92
  },
89
93
  methods:
90
94
  {
95
+ async getPaymentMethod()
96
+ {
97
+ this.payment_method = await this.$_getData('cashier_payment_methods');
98
+
99
+ this.payment_method.forEach(element => {
100
+ this.header.splice(5, 0, element.method_name);
101
+ });
102
+ console.log(this.header);
103
+ },
91
104
  async generateReport()
92
105
  {
93
106
  let fields = {
@@ -98,14 +111,138 @@ export default
98
111
  this.$q.loading.show({
99
112
  message: 'Generating Reports'
100
113
  });
114
+ if(fields.report_type == "All Transactions")
115
+ {
116
+ let date_now = moment(new Date()).tz('Africa/Accra').format('MMMM Do YYYY, h:mm:ss a');
117
+ let sale = await this.db_sale.getAllSale(this.user_info.branch_slot,this.filter.from, this.filter.to);
118
+ let sale_data = [];
119
+ let total_sale = 0;
120
+
121
+ sale.forEach(element => {
122
+
123
+
124
+ let sale_details ={};
125
+ sale_details.sale_id = element.sale_id;
126
+ sale_details.customer_slot = element.slot_reference;
127
+ sale_details.customer_name = element.customer.name;
128
+ sale_details.customer_email = element.customer.email;
129
+ sale_details.stockist = element.stockist;
130
+ sale_details.mtn_mobile_money = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
131
+ sale_details.payout_for_product_purchase = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
132
+ sale_details.bank_deposit = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
133
+ sale_details.cash = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
134
+ element.payment.forEach(pay =>
135
+ {
136
+ if(pay.payment_type.method_key == 'mtn_mobile_money')
137
+ {
138
+ sale_details.mtn_mobile_money = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
139
+ }
140
+ if(pay.payment_type.method_key == 'payout_for_product_purchase')
141
+ {
142
+ sale_details.payout_for_product_purchase = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
143
+ }
144
+ if(pay.payment_type.method_key == 'bank_deposit')
145
+ {
146
+ sale_details.bank_deposit = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
147
+ }
148
+ if(pay.payment_type.method_key == 'cash')
149
+ {
150
+ sale_details.cash = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
151
+ }
152
+ });
153
+ sale_details.sub_total = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.sub_total : '' +element.sub_total;
154
+ sale_details.discount = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.discount : '' +element.discount;
155
+ sale_details.grand_total = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.grand_total : '' +element.grand_total;
156
+ sale_details.date = formatDateCashier(element.created_date, 'MMMM Do YYYY, h:mm:ss a');
157
+ sale_details.claim_code = element.claim_code;
158
+ sale_details.memo = element.memo;
159
+ sale_details.status = element.status;
160
+ total_sale = total_sale + element.grand_total;
161
+ sale_data.push(sale_details);
162
+ });
163
+
164
+ let createXLSLFormatObj = [];
165
+ /* XLS Head Columns */
166
+ let xlsHeader = this.header;
167
+
168
+ createXLSLFormatObj.push(xlsHeader);
169
+
170
+ $.each(sale_data, function(index, value) {
171
+ let innerRowData = [];
172
+ $("tbody").append('<tr><td>' + value.sale_id +
173
+ '</td><td>' + value.customer_slot +
174
+ '</td><td>' + value.customer_name +
175
+ '</td><td>' + value.customer_email +
176
+ '</td><td>' + value.stockist +
177
+ '</td><td>' + value.sub_total +
178
+ '</td><td>' + value.discount +
179
+ '</td><td>' + value.grand_total +
180
+ '</td><td>' + value.created_date +
181
+ '</td><td>' + value.claim_code +
182
+ '</td><td>' + value.memo +
183
+ '</td><td>' + value.status +
184
+ '</td></tr>');
185
+ $.each(value, function(ind, val) {
186
+ innerRowData.push(val);
187
+ });
188
+ createXLSLFormatObj.push(innerRowData);
189
+ });
190
+
191
+ let space = [''];
192
+ createXLSLFormatObj.push(space);
193
+
194
+ let currency = this.public_settings.cashier_currency ? this.public_settings.cashier_currency : '';
195
+ let total = ['Total Sale: ' +currency+ ' '+ total_sale]
196
+ createXLSLFormatObj.push(total);
197
+ // footer
198
+ let footer = ['DATE GENERATED: ' + date_now];
199
+ createXLSLFormatObj.push(footer);
101
200
 
102
- if(fields.report_type == "Completed Transaction")
201
+ /* File Name */
202
+ let filename = fields.report_type +".xlsx";
203
+
204
+ /* Sheet Name */
205
+ // let ws_name = "Completed Transaction "+ this.filter.from +' - '+ this.filter.to;
206
+ let ws_name = "All Transaction ";
207
+
208
+
209
+ // if (typeof console !== 'undefined') console.log(new Date());
210
+ let wb = XLSX.utils.book_new(),
211
+ ws = XLSX.utils.aoa_to_sheet(createXLSLFormatObj);
212
+
213
+ //set colum witdh
214
+ let wscols = [
215
+ {wch:10},
216
+ {wch:15},
217
+ {wch:25},
218
+ {wch:25},
219
+ {wch:15},
220
+ {wch:10},
221
+ {wch:10},
222
+ {wch:10},
223
+ {wch:10},
224
+ {wch:10},
225
+ {wch:10},
226
+ {wch:10},
227
+ {wch:25},
228
+ {wch:10},
229
+ {wch:30},
230
+ {wch:10},
231
+ ];
232
+ ws['!cols'] = wscols;
233
+
234
+ /* Add worksheet to workbook */
235
+ XLSX.utils.book_append_sheet(wb, ws, ws_name);
236
+
237
+ /* Write workbook and Download */
238
+ XLSX.writeFile(wb, filename);
239
+ }
240
+ else if(fields.report_type == "Completed Transactions")
103
241
  {
104
242
  let date_now = moment(new Date()).tz('Africa/Accra').format('MMMM Do YYYY, h:mm:ss a');
105
243
  let sale = await this.db_sale.getCompletedSale(this.user_info.branch_slot,this.filter.from, this.filter.to);
106
244
  let sale_data = [];
107
245
  let total_sale = 0;
108
- let header = ["Sale No.", "Customer Slot","Customer Name", "Customer Email", "Stockist", "Sub Total", "Discount", "Grand Total","Transction Date", "Claim Code", "Remarks","Status"];
109
246
 
110
247
  sale.forEach(element => {
111
248
  let sale_details ={};
@@ -114,6 +251,29 @@ export default
114
251
  sale_details.customer_name = element.customer.name;
115
252
  sale_details.customer_email = element.customer.email;
116
253
  sale_details.stockist = element.stockist;
254
+ sale_details.mtn_mobile_money = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
255
+ sale_details.payout_for_product_purchase = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
256
+ sale_details.bank_deposit = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
257
+ sale_details.cash = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
258
+ element.payment.forEach(pay =>
259
+ {
260
+ if(pay.payment_type.method_key == 'mtn_mobile_money')
261
+ {
262
+ sale_details.mtn_mobile_money = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
263
+ }
264
+ if(pay.payment_type.method_key == 'payout_for_product_purchase')
265
+ {
266
+ sale_details.payout_for_product_purchase = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
267
+ }
268
+ if(pay.payment_type.method_key == 'bank_deposit')
269
+ {
270
+ sale_details.bank_deposit = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
271
+ }
272
+ if(pay.payment_type.method_key == 'cash')
273
+ {
274
+ sale_details.cash = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
275
+ }
276
+ });
117
277
  sale_details.sub_total = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.sub_total : '' +element.sub_total;
118
278
  sale_details.discount = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.discount : '' +element.discount;
119
279
  sale_details.grand_total = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.grand_total : '' +element.grand_total;
@@ -127,7 +287,7 @@ export default
127
287
 
128
288
  let createXLSLFormatObj = [];
129
289
  /* XLS Head Columns */
130
- let xlsHeader = header;
290
+ let xlsHeader = this.header;
131
291
 
132
292
  createXLSLFormatObj.push(xlsHeader);
133
293
 
@@ -184,6 +344,10 @@ export default
184
344
  {wch:10},
185
345
  {wch:10},
186
346
  {wch:10},
347
+ {wch:10},
348
+ {wch:10},
349
+ {wch:10},
350
+ {wch:10},
187
351
  {wch:25},
188
352
  {wch:10},
189
353
  {wch:30},
@@ -197,7 +361,7 @@ export default
197
361
  /* Write workbook and Download */
198
362
  XLSX.writeFile(wb, filename);
199
363
  }
200
- else if(fields.report_type == "Pending Transaction")
364
+ else if(fields.report_type == "Pending Transactions")
201
365
  {
202
366
  console.log('Print Pending');
203
367
 
@@ -205,7 +369,6 @@ export default
205
369
  let sale = await this.db_sale.getPendingSale(this.user_info.branch_slot,this.filter.from, this.filter.to);
206
370
  let sale_data = [];
207
371
  let total_sale = 0;
208
- let header = ["Sale No.", "Customer Slot", "Customer Name","Customer Name", "Customer Email", "Stockist", "Sub Total", "Discount", "Grand Total","Transction Date", "Claim Code", "Remarks","Status"];
209
372
 
210
373
  sale.forEach(element => {
211
374
  let sale_details ={};
@@ -214,6 +377,29 @@ export default
214
377
  sale_details.customer_name = element.customer.name;
215
378
  sale_details.customer_email = element.customer.email;
216
379
  sale_details.stockist = element.stockist;
380
+ sale_details.mtn_mobile_money = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
381
+ sale_details.payout_for_product_purchase = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
382
+ sale_details.bank_deposit = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
383
+ sale_details.cash = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
384
+ element.payment.forEach(pay =>
385
+ {
386
+ if(pay.payment_type.method_key == 'mtn_mobile_money')
387
+ {
388
+ sale_details.mtn_mobile_money = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
389
+ }
390
+ if(pay.payment_type.method_key == 'payout_for_product_purchase')
391
+ {
392
+ sale_details.payout_for_product_purchase = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
393
+ }
394
+ if(pay.payment_type.method_key == 'bank_deposit')
395
+ {
396
+ sale_details.bank_deposit = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
397
+ }
398
+ if(pay.payment_type.method_key == 'cash')
399
+ {
400
+ sale_details.cash = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
401
+ }
402
+ });
217
403
  sale_details.sub_total = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.sub_total : '' +element.sub_total;
218
404
  sale_details.discount = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.discount : '' +element.discount;
219
405
  sale_details.grand_total = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.grand_total : '' +element.grand_total;
@@ -227,7 +413,7 @@ export default
227
413
 
228
414
  let createXLSLFormatObj = [];
229
415
  /* XLS Head Columns */
230
- let xlsHeader = header;
416
+ let xlsHeader = this.header;
231
417
 
232
418
  createXLSLFormatObj.push(xlsHeader);
233
419
 
@@ -284,6 +470,10 @@ export default
284
470
  {wch:10},
285
471
  {wch:10},
286
472
  {wch:10},
473
+ {wch:10},
474
+ {wch:10},
475
+ {wch:10},
476
+ {wch:10},
287
477
  {wch:25},
288
478
  {wch:10},
289
479
  {wch:30},
@@ -297,7 +487,7 @@ export default
297
487
  /* Write workbook and Download */
298
488
  XLSX.writeFile(wb, filename);
299
489
  }
300
- else if(fields.report_type == "For Pick Up Transaction")
490
+ else if(fields.report_type == "For Pick Up Transactions")
301
491
  {
302
492
  console.log('Print for pick up');
303
493
 
@@ -305,7 +495,6 @@ export default
305
495
  let sale = await this.db_sale.getForPickUpSale(this.user_info.branch_slot,this.filter.from, this.filter.to);
306
496
  let sale_data = [];
307
497
  let total_sale = 0;
308
- let header = ["Sale No.", "Customer Slot", "Customer Name", "Customer Email", "Stockist", "Sub Total", "Discount", "Grand Total","Transction Date", "Claim Code", "Remarks","Status"];
309
498
 
310
499
  sale.forEach(element => {
311
500
  let sale_details ={};
@@ -314,6 +503,29 @@ export default
314
503
  sale_details.customer_name = element.customer.name;
315
504
  sale_details.customer_email = element.customer.email;
316
505
  sale_details.stockist = element.stockist;
506
+ sale_details.mtn_mobile_money = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
507
+ sale_details.payout_for_product_purchase = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
508
+ sale_details.bank_deposit = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
509
+ sale_details.cash = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
510
+ element.payment.forEach(pay =>
511
+ {
512
+ if(pay.payment_type.method_key == 'mtn_mobile_money')
513
+ {
514
+ sale_details.mtn_mobile_money = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
515
+ }
516
+ if(pay.payment_type.method_key == 'payout_for_product_purchase')
517
+ {
518
+ sale_details.payout_for_product_purchase = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
519
+ }
520
+ if(pay.payment_type.method_key == 'bank_deposit')
521
+ {
522
+ sale_details.bank_deposit = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
523
+ }
524
+ if(pay.payment_type.method_key == 'cash')
525
+ {
526
+ sale_details.cash = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
527
+ }
528
+ });
317
529
  sale_details.sub_total = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.sub_total : '' +element.sub_total;
318
530
  sale_details.discount = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.discount : '' +element.discount;
319
531
  sale_details.grand_total = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.grand_total : '' +element.grand_total;
@@ -327,7 +539,7 @@ export default
327
539
 
328
540
  let createXLSLFormatObj = [];
329
541
  /* XLS Head Columns */
330
- let xlsHeader = header;
542
+ let xlsHeader = this.header;
331
543
 
332
544
  createXLSLFormatObj.push(xlsHeader);
333
545
 
@@ -384,6 +596,10 @@ export default
384
596
  {wch:10},
385
597
  {wch:10},
386
598
  {wch:10},
599
+ {wch:10},
600
+ {wch:10},
601
+ {wch:10},
602
+ {wch:10},
387
603
  {wch:25},
388
604
  {wch:10},
389
605
  {wch:30},
@@ -398,7 +614,7 @@ export default
398
614
  XLSX.writeFile(wb, filename);
399
615
 
400
616
  }
401
- else if(fields.report_type == "Voided Transaction")
617
+ else if(fields.report_type == "Voided Transactions")
402
618
  {
403
619
  console.log('Print voided');
404
620
 
@@ -406,8 +622,6 @@ export default
406
622
  let sale = await this.db_sale.getVoidedSale(this.user_info.branch_slot,this.filter.from, this.filter.to);
407
623
  let sale_data = [];
408
624
  let total_sale = 0;
409
- let header = ["Sale No.", "Customer Slot", "Customer Name", "Customer Email", "Stockist", "Sub Total", "Discount", "Grand Total","Transction Date", "Claim Code", "Remarks","Status"];
410
-
411
625
  sale.forEach(element => {
412
626
  let sale_details ={};
413
627
  sale_details.sale_id = element.sale_id;
@@ -415,6 +629,29 @@ export default
415
629
  sale_details.customer_name = element.customer.name;
416
630
  sale_details.customer_email = element.customer.email;
417
631
  sale_details.stockist = element.stockist;
632
+ sale_details.mtn_mobile_money = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
633
+ sale_details.payout_for_product_purchase = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
634
+ sale_details.bank_deposit = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
635
+ sale_details.cash = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+0 : '' +0;
636
+ element.payment.forEach(pay =>
637
+ {
638
+ if(pay.payment_type.method_key == 'mtn_mobile_money')
639
+ {
640
+ sale_details.mtn_mobile_money = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
641
+ }
642
+ if(pay.payment_type.method_key == 'payout_for_product_purchase')
643
+ {
644
+ sale_details.payout_for_product_purchase = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
645
+ }
646
+ if(pay.payment_type.method_key == 'bank_deposit')
647
+ {
648
+ sale_details.bank_deposit = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
649
+ }
650
+ if(pay.payment_type.method_key == 'cash')
651
+ {
652
+ sale_details.cash = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+pay.payment_amount : '' +pay.payment_amount;
653
+ }
654
+ });
418
655
  sale_details.sub_total = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.sub_total : '' +element.sub_total;
419
656
  sale_details.discount = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.discount : '' +element.discount;
420
657
  sale_details.grand_total = this.public_settings.cashier_currency ? this.public_settings.cashier_currency+element.grand_total : '' +element.grand_total;
@@ -428,7 +665,7 @@ export default
428
665
 
429
666
  let createXLSLFormatObj = [];
430
667
  /* XLS Head Columns */
431
- let xlsHeader = header;
668
+ let xlsHeader = this.header;
432
669
 
433
670
  createXLSLFormatObj.push(xlsHeader);
434
671
 
@@ -485,6 +722,10 @@ export default
485
722
  {wch:10},
486
723
  {wch:10},
487
724
  {wch:10},
725
+ {wch:10},
726
+ {wch:10},
727
+ {wch:10},
728
+ {wch:10},
488
729
  {wch:25},
489
730
  {wch:10},
490
731
  {wch:30},
package/GCheckout.vue CHANGED
@@ -40,7 +40,6 @@
40
40
  </div>
41
41
  </div>
42
42
  <div v-if="payment_method.payment_method_id !='gc_points' && !hide_voucher" class="voucher-body">
43
- {{hide_voucher}}
44
43
  <div class="q-mr-xl"></div>
45
44
  <div class="q-ml-xl"><q-icon class="q-mr-sm" size="18px" name="fas fa-ticket-alt"></q-icon>Shop Voucher</div>
46
45
  <div @click="selectVoucher(merch);" class="select-voucher-button">Select Voucher</div>
@@ -415,6 +414,7 @@ export default {
415
414
  cod_payment_limit:999999,
416
415
  online_payment_limit:999999,
417
416
  hide_voucher:false,
417
+ kyc_cod:false,
418
418
  disable_ecom:false,
419
419
  total_amount:0,
420
420
  available_payment_channel:[],
@@ -456,6 +456,10 @@ export default {
456
456
  {
457
457
  this.hide_voucher = true;
458
458
  }
459
+ if(this.public_settings.hasOwnProperty('kyc_cod') && this.public_settings.kyc_cod)
460
+ {
461
+ this.kyc_cod = true;
462
+ }
459
463
  if(this.public_settings.hasOwnProperty('cod_payment_limit'))
460
464
  {
461
465
  this.cod_payment_limit = this.public_settings.cod_payment_limit;
@@ -512,7 +516,11 @@ export default {
512
516
  sessionStorage.setItem('referral_slot_code', this.user_info.sponsor);
513
517
  }
514
518
  }
515
- this.getPaymentChannel();
519
+
520
+ if(this.public_settings.hasOwnProperty('dragonpay_details') && this.public_settings.dragonpay_details.show_active_payment)
521
+ {
522
+ this.getPaymentChannel();
523
+ }
516
524
 
517
525
  },
518
526
  computed:
@@ -1553,6 +1561,10 @@ export default {
1553
1561
  this.is_update_address_dialog_open = true;
1554
1562
  });
1555
1563
  }
1564
+ else if (this.kyc_cod && !this.user_info.hasOwnProperty('verified'))
1565
+ {
1566
+ this.$q.dialog({ html: true, title: `Something's not quite right`, message: `Your account must be verified to use cod transaction` });
1567
+ }
1556
1568
  else if (this.user_info.active_slot && Number(this.checkout_info.grand_total) > this.cod_payment_limit && this.checkout_info.payment_method.payment_method_id == "cod")
1557
1569
  {
1558
1570
  this.$q.dialog({ html: true, title: `Something's not quite right`, message: `The maximum amount for COD transaction is ${this.cod_payment_limit}` });
@@ -1622,6 +1634,10 @@ export default {
1622
1634
  }
1623
1635
  else if (this.checkout_info.payment_method.payment_method_id == "dragon_pay")
1624
1636
  {
1637
+ if(this.public_settings.hasOwnProperty('dragonpay_details') && !this.public_settings.dragonpay_details.show_active_payment)
1638
+ {
1639
+ this.dragon_pay_choice = this.public_settings.dragonpay_details ? this.public_settings.dragonpay_details.mode : 1;
1640
+ }
1625
1641
  if(!this.dragon_pay_choice)
1626
1642
  {
1627
1643
  this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Invalid Dragon payment Method" });
@@ -39,7 +39,8 @@
39
39
  <input type="hidden" name="description" :value="description">
40
40
  <input type="hidden" name="email" :value="email">
41
41
  <input type="hidden" name="digest" :value="digest_string.toString('hex')">
42
- <input v-if="!public_settings.dragonpay_details.test" type="hidden" name="procid" :value="proc_id.procId">
42
+ <input v-if="!public_settings.dragonpay_details.test && public_settings.dragonpay_details.show_active_payment" type="hidden" name="procid" :value="proc_id.procId">
43
+ <input v-if="!public_settings.dragonpay_details.show_active_payment" type="hidden" name="mode" :value="public_settings.dragonpay_details.mode ? public_settings.dragonpay_details.mode : proc_id">
43
44
  <!-- <input type="hidden" name="mode" :value="mode"> -->
44
45
  <!-- <input type="hidden" name="ResponseURL" :value="ipay88_response_url"> -->
45
46
  <input type="hidden" name="param1" :value="dragonpay_backend">
package/models/DB_SALE.js CHANGED
@@ -27,7 +27,27 @@ export default class DB_SALE extends MODEL
27
27
 
28
28
  return data;
29
29
  }
30
+ async getAllSale(branch_slot,from_date, to_date)
31
+ {
32
+ let date_start = new Date(from_date + ' 00:00:00');
33
+ let date_end = new Date(to_date + ' 23:59:59');
34
+ let slot_code = branch_slot;
35
+
36
+ let res = await this.collection().where('stockist','==', slot_code).where('created_date','>=', date_start).where('created_date','<=', date_end).orderBy('created_date', 'asc').get();
37
+
38
+ let data = [];
39
+
40
+ if(!res.empty)
41
+ {
42
+ res.docs.forEach((d, i) =>
43
+ {
44
+ data[i] = d.data();
45
+ data[i].id = d.id;
46
+ })
47
+ }
30
48
 
49
+ return data;
50
+ }
31
51
  async getCompletedSale(branch_slot,from_date, to_date)
32
52
  {
33
53
  let date_start = new Date(from_date + ' 00:00:00');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.513",
3
+ "version": "1.2.517",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,6 +11,7 @@
11
11
  "dependencies": {
12
12
  "@capacitor/core": "^2.0.0",
13
13
  "axios": "^0.20.0",
14
+ "console": "^0.7.2",
14
15
  "jquery": "^3.5.1",
15
16
  "moment-timezone": "^0.5.33",
16
17
  "philippine-location-json-for-geer": "^1.1.11",