@veloceapps/sdk 8.0.0-4 → 8.0.0-6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1142,6 +1142,22 @@ class FlowUpdateService {
1142
1142
  }
1143
1143
  }
1144
1144
  break;
1145
+ case 'COST':
1146
+ {
1147
+ const charge = lineItem.chargeItems.find(charge => (charges || {})[charge.chargeId]?.main);
1148
+ if (charge) {
1149
+ charge.netCost = update.newValue;
1150
+ }
1151
+ }
1152
+ break;
1153
+ case 'MARGIN_PERCENT':
1154
+ {
1155
+ const charge = lineItem.chargeItems.find(charge => (charges || {})[charge.chargeId]?.main);
1156
+ if (charge) {
1157
+ charge.marginPercent = update.newValue;
1158
+ }
1159
+ }
1160
+ break;
1145
1161
  default:
1146
1162
  throw new Error(`Not suppored AttributeType for LineItem update: ${update.attributeType}`);
1147
1163
  }