@@ -142,7 +142,7 @@ patch(PosOrder.prototype, {
142
142
waitForPushOrder ( ) {
143
143
return (
144
144
Object . keys ( this . uiState . couponPointChanges || { } ) . length > 0 ||
145
- this . _get_reward_lines ( ) . length ||
145
+ this . _getRewardLines ( ) . length ||
146
146
super . waitForPushOrder ( ...arguments )
147
147
) ;
148
148
} ,
@@ -175,13 +175,13 @@ patch(PosOrder.prototype, {
175
175
176
176
return [ ...nonRewardLines , ...rewardLines ] ;
177
177
} ,
178
- _get_reward_lines ( ) {
178
+ _getRewardLines ( ) {
179
179
if ( this . lines ) {
180
180
return this . lines . filter ( ( line ) => line . is_reward_line ) ;
181
181
}
182
182
return this . lines ;
183
183
} ,
184
- _get_regular_order_lines ( ) {
184
+ _getRegularOrderLines ( ) {
185
185
if ( this . lines ) {
186
186
return this . lines . filter ( ( line ) => ! line . is_reward_line && ! line . refunded_orderline_id ) ;
187
187
}
@@ -230,7 +230,7 @@ patch(PosOrder.prototype, {
230
230
if ( ! this . lines . length ) {
231
231
return ;
232
232
}
233
- const rewardLines = this . _get_reward_lines ( ) ;
233
+ const rewardLines = this . _getRewardLines ( ) ;
234
234
if ( ! rewardLines . length ) {
235
235
return ;
236
236
}
@@ -334,7 +334,7 @@ patch(PosOrder.prototype, {
334
334
const balance = loyaltyCard . points ;
335
335
won += points - this . _getPointsCorrection ( program ) ;
336
336
if ( coupon_id !== 0 ) {
337
- for ( const line of this . _get_reward_lines ( ) ) {
337
+ for ( const line of this . _getRewardLines ( ) ) {
338
338
if ( line . coupon_id . id === coupon_id ) {
339
339
spent += line . points_cost ;
340
340
}
@@ -680,7 +680,7 @@ patch(PosOrder.prototype, {
680
680
* @param {* } rule
681
681
*/
682
682
_computeNItems ( rule ) {
683
- return this . _get_regular_order_lines ( ) . reduce ( ( nItems , line ) => {
683
+ return this . _getRegularOrderLines ( ) . reduce ( ( nItems , line ) => {
684
684
let increment = 0 ;
685
685
if ( rule . any_product || rule . validProductIds . has ( line . product_id . id ) ) {
686
686
increment = line . getQuantity ( ) ;
@@ -1223,7 +1223,7 @@ patch(PosOrder.prototype, {
1223
1223
reward . reward_product_ids . map ( ( reward ) => reward . id ) . includes ( product . id ) &&
1224
1224
reward . reward_product_ids . map ( ( reward ) => reward . id ) . includes ( line . getProduct ( ) . id )
1225
1225
) {
1226
- if ( this . _get_reward_lines ( ) == 0 ) {
1226
+ if ( this . _getRewardLines ( ) == 0 ) {
1227
1227
if ( line . getProduct ( ) === product ) {
1228
1228
available += line . getQuantity ( ) ;
1229
1229
}
@@ -1385,7 +1385,7 @@ patch(PosOrder.prototype, {
1385
1385
this . uiState . disabledRewards ,
1386
1386
this . uiState . codeActivatedProgramRules ,
1387
1387
Object . keys ( this . uiState . couponPointChanges ) ,
1388
- this . _get_reward_lines ( ) ,
1388
+ this . _getRewardLines ( ) ,
1389
1389
] ;
1390
1390
return array . some ( ( elem ) => elem . length > 0 ) ;
1391
1391
} ,
0 commit comments