@infrab4a/connect-angular 4.4.1-beta.2 → 4.4.1-beta.3
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.
|
@@ -1191,8 +1191,8 @@ class CouponService {
|
|
|
1191
1191
|
if (type === CouponTypes.ABSOLUTE) {
|
|
1192
1192
|
lineItemsDiscount = lineItems.map((item) => {
|
|
1193
1193
|
const totalItemPercentage = item.pricePaid / subTotal;
|
|
1194
|
-
const discountItem =
|
|
1195
|
-
console.log(item.name, subTotal, 'absolute', couponDiscount, totalItemPercentage, discountItem);
|
|
1194
|
+
const discountItem = couponDiscount * totalItemPercentage;
|
|
1195
|
+
console.log(item.name, item.pricePaid, subTotal, 'absolute', couponDiscount, totalItemPercentage, discountItem);
|
|
1196
1196
|
return {
|
|
1197
1197
|
...item,
|
|
1198
1198
|
discount: discountItem,
|
|
@@ -1203,7 +1203,7 @@ class CouponService {
|
|
|
1203
1203
|
else {
|
|
1204
1204
|
lineItemsDiscount = lineItems.map((item) => {
|
|
1205
1205
|
const discountItem = item.pricePaid * (couponDiscount / 100);
|
|
1206
|
-
console.log(item.name, 'percentage', couponDiscount, discountItem);
|
|
1206
|
+
console.log(item.name, item.pricePaid, 'percentage', couponDiscount, discountItem);
|
|
1207
1207
|
return {
|
|
1208
1208
|
...item,
|
|
1209
1209
|
discount: discountItem,
|