geer-builder 1.2.650 → 1.2.652
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.
|
@@ -44,19 +44,22 @@
|
|
|
44
44
|
<th v-if="payment_method.payment_method_id != 'gc_points'" class="text-right">Price</th>
|
|
45
45
|
<th v-else class="text-right">GC Price</th>
|
|
46
46
|
<th class="text-right">Discount</th>
|
|
47
|
+
<th class="text-right" v-if="total_merchant_discount > 0">Merchant Discount</th>
|
|
47
48
|
<th class="text-right">Line Sub Total</th>
|
|
48
49
|
<th class="text-right">Line Total</th>
|
|
49
50
|
</tr>
|
|
50
51
|
</thead>
|
|
51
52
|
<tbody v-for="(merch, i) in orders" :key="i">
|
|
52
53
|
<tr v-for="(prod, x) in merch.products" :key="x">
|
|
53
|
-
<!-- {{prod}} -->
|
|
54
|
+
<!-- {{prod.product}} -->
|
|
54
55
|
<td>{{ prod.product_name ? prod.product_name : prod.product_sku }}</td>
|
|
55
56
|
<td class="text-right">{{ prod.quantity }}</td>
|
|
56
57
|
<td v-if="payment_method.payment_method_id != 'gc_points'" class="text-right">{{ $_formatNumber(prod.selling_price, { decimal: 2}) }} </td>
|
|
57
58
|
<td v-else class="text-right">{{ $_formatNumber(prod.gc_price, { decimal: 2}) }} </td>
|
|
58
59
|
<td v-if="payment_method.payment_method_id != 'gc_points'" class="text-right">{{ $_formatNumber(Number(prod.order_discount_total), { decimal: 2}) }} <span>({{ prod.discount_merge_percent }}%)</span></td>
|
|
59
60
|
<td v-else class="text-right">{{ $_formatNumber(0) }} <span>({{ prod.discount_percent }}%)</span></td>
|
|
61
|
+
<td v-if="prod.product.hasOwnProperty('merchant_discount_applied') && prod.product.merchant_discount_applied" class="text-right">{{$_formatNumber(prod.product.merchant_percentage_discount , { decimal: 2 } ) }}</td>
|
|
62
|
+
<td v-else class="text-right">{{ $_formatNumber(0) }} <span>({{ 0 }}%)</span></td>
|
|
60
63
|
<td class="text-right">{{$_formatNumber(prod.item_sub_total , { decimal: 2 } ) }}</td>
|
|
61
64
|
<td class="text-right">{{$_formatNumber(prod.item_total , { decimal: 2 } ) }}</td>
|
|
62
65
|
</tr>
|
|
@@ -67,6 +70,10 @@
|
|
|
67
70
|
<div class="col-6">
|
|
68
71
|
</div>
|
|
69
72
|
<div class="col-6 text-right q-mt-lg">
|
|
73
|
+
<div class="row" v-if="total_merchant_discount > 0">
|
|
74
|
+
<div class="col-7 label">Merchant Discount</div>
|
|
75
|
+
<div class="col-5 value">{{ $_formatNumber(total_merchant_discount, { decimal: 2}) }}</div>
|
|
76
|
+
</div>
|
|
70
77
|
<div class="row">
|
|
71
78
|
<div class="col-7 label">Sub Total</div>
|
|
72
79
|
<div class="col-5 value">{{ $_formatNumber(sub_total, { decimal: 2}) }}</div>
|
|
@@ -172,6 +179,10 @@
|
|
|
172
179
|
<div class="col-12">
|
|
173
180
|
</div>
|
|
174
181
|
<div class="col-12 text-left q-mt-lg">
|
|
182
|
+
<div class="row bordered" v-if="total_merchant_discount > 0">
|
|
183
|
+
<div class="col-7 label">Merchant Discount</div>
|
|
184
|
+
<div class="col-5 value text-right">{{ $_formatNumber(total_merchant_discount, { decimal: 2}) }}</div>
|
|
185
|
+
</div>
|
|
175
186
|
<div class="row bordered">
|
|
176
187
|
<div class="col-7 label">Sub Total</div>
|
|
177
188
|
<div class="col-5 value text-right">{{ $_formatNumber(sub_total, { decimal: 2}) }}</div>
|
|
@@ -202,10 +213,27 @@ export default {
|
|
|
202
213
|
mixins: [GlobalMixins],
|
|
203
214
|
data: () =>
|
|
204
215
|
({
|
|
216
|
+
total_merchant_discount: 0,
|
|
205
217
|
settings : "",
|
|
206
218
|
}),
|
|
207
219
|
async mounted()
|
|
208
220
|
{
|
|
221
|
+
setTimeout(() => {
|
|
222
|
+
if(this.orders)
|
|
223
|
+
{
|
|
224
|
+
for(let i of this.orders)
|
|
225
|
+
{
|
|
226
|
+
for(let x of i.products)
|
|
227
|
+
{
|
|
228
|
+
if(x.product.hasOwnProperty('merchant_discount_applied') && x.product.merchant_discount_applied)
|
|
229
|
+
{
|
|
230
|
+
this.total_merchant_discount += x.product.merchant_discounted_price;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}, 1000);
|
|
236
|
+
|
|
209
237
|
this.settings= await this.$_getData('public_settings');
|
|
210
238
|
}
|
|
211
239
|
}
|
|
@@ -101,12 +101,12 @@ export default {
|
|
|
101
101
|
props: ['sale_id', 'hide_bottom', 'proc_id'],
|
|
102
102
|
async mounted()
|
|
103
103
|
{
|
|
104
|
-
console.log(this.proc_id, 'proc id');
|
|
105
104
|
this.ipay88_backend_url = `https://asia-northeast1-${config.projectId}.cloudfunctions.net/memberBackendIpayResponse`;
|
|
106
105
|
this.dragonpay_backend = `https://asia-northeast1-${config.projectId}.cloudfunctions.net/memberDragonpayResponse`;
|
|
107
106
|
this.ipay88_response_url = location.href;
|
|
108
107
|
this.public_settings = await this.$_getData('public_settings');
|
|
109
108
|
await this.$bind('sale', this.db_checkout_request.doc(this.sale_id));
|
|
109
|
+
console.log(this.sale);
|
|
110
110
|
if(this.public_settings && this.public_settings.hasOwnProperty('ipay88_details'))
|
|
111
111
|
{
|
|
112
112
|
this.merchant_code = this.public_settings.ipay88_details.merchant_code;
|
|
@@ -78,7 +78,6 @@ import DB_USER from '../../models/DB_USER';
|
|
|
78
78
|
import DB_GCASH_REQUEST from '../../models/DB_GCASH_REQUEST';
|
|
79
79
|
import {formatDate} from '../../utilities/DateUtils';
|
|
80
80
|
import {formatNumber} from '../../utilities/NumberUtils';
|
|
81
|
-
import { fill } from '../../../documentation/src/references/nav.js';
|
|
82
81
|
|
|
83
82
|
|
|
84
83
|
export default {
|