geer-builder 1.2.951 → 1.2.953

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.
@@ -42,6 +42,12 @@
42
42
  <div>Payment: <b>{{this.order_info.payment_method.manual_pay_choice.bank_label}}</b></div>
43
43
  <div>Account Name: <b>{{this.order_info.payment_method.manual_pay_choice.account_name}}</b></div>
44
44
  <div>Account Number: <b>{{this.order_info.payment_method.manual_pay_choice.account_number}}</b></div>
45
+ <template v-if="resolved_additional_accounts.length > 0">
46
+ <div v-for="(extra, idx) in resolved_additional_accounts" :key="idx" style="margin-top:5px;">
47
+ <div>Account Name: <b>{{extra.account_name}}</b></div>
48
+ <div>Account Number: <b>{{extra.account_number}}</b></div>
49
+ </div>
50
+ </template>
45
51
  <div>Order Total: <b>{{ public_settings.main_currency }} {{$_formatNumber(this.order_info.orders.order_total, { decimal: 2})}} {{ public_settings.hasOwnProperty('adspro_cashin_conversion_rate') ? `(PHP ${this.order_info.orders.order_total * public_settings.adspro_cashin_conversion_rate})` : '' }}</b></div>
46
52
  </div>
47
53
  </div>
@@ -110,6 +116,44 @@ export default {
110
116
 
111
117
  // this.getaAccountList();
112
118
  },
119
+ computed:
120
+ {
121
+ resolved_additional_accounts()
122
+ {
123
+ var choice = this.order_info && this.order_info.payment_method
124
+ ? this.order_info.payment_method.manual_pay_choice
125
+ : null;
126
+ if (!choice) return [];
127
+
128
+ var main_account_number = choice.account_number;
129
+ var accounts = [];
130
+
131
+ // Source 1: additional_account saved on the order
132
+ if (choice.additional_account && choice.additional_account.length > 0)
133
+ {
134
+ accounts = choice.additional_account;
135
+ }
136
+ // Source 2: fallback to public_settings.manual_payment_additional_account filtered by bank_id
137
+ else if (this.public_settings
138
+ && this.public_settings.manual_payment_additional_account
139
+ && this.public_settings.manual_payment_additional_account.length > 0)
140
+ {
141
+ var bank_id = choice.bank_id;
142
+ accounts = this.public_settings.manual_payment_additional_account.filter(function(acc) {
143
+ return acc.bank_id === bank_id;
144
+ });
145
+ }
146
+
147
+ // Remove duplicates: exclude accounts with same account_number as the main account
148
+ var seen = {};
149
+ seen[main_account_number] = true;
150
+ return accounts.filter(function(acc) {
151
+ if (seen[acc.account_number]) return false;
152
+ seen[acc.account_number] = true;
153
+ return true;
154
+ });
155
+ }
156
+ },
113
157
  methods:
114
158
  {
115
159
  getPictures(val)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.951",
3
+ "version": "1.2.953",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {