@unimaze/billing 0.21.9 → 0.21.11

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.
@@ -129,10 +129,12 @@ var PaymentMethod = function (props) {
129
129
  if (!props.isActiveStep)
130
130
  return;
131
131
  debouncedValidateFields(fieldPaths, true);
132
+ }, [props.isActiveStep, JSON.stringify(props.formInstance.getFieldsValue(fieldPaths))]);
133
+ (0, react_1.useEffect)(function () {
132
134
  if (!props.formInstance.getFieldValue(["invoice", "paymentMeans", "domesticTransfer", "accountTypeNumber"])) {
133
135
  props.formInstance.setFieldValue(["invoice", "paymentMeans", "domesticTransfer", "accountTypeNumber"], "04");
134
136
  }
135
- }, [props.isActiveStep, JSON.stringify(props.formInstance.getFieldsValue(fieldPaths))]);
137
+ }, [props.formInstance.getFieldValue(["invoice", "paymentMeans", "type"])]);
136
138
  var domesticTransferFormFields = (react_1.default.createElement(react_1.default.Fragment, null,
137
139
  react_1.default.createElement(antd_1.Form.Item, null,
138
140
  react_1.default.createElement(antd_1.Row, { gutter: [8, 0] },
@@ -74,7 +74,7 @@ var calculateTaxableAmount = function (discountValue, quantity, unitPriceAmount,
74
74
  return 0;
75
75
  }
76
76
  var _discountValue = (0, lodash_1.toNumber)(discountValue);
77
- if ((0, lodash_1.isNumber)(_discountValue)) {
77
+ if (_discountValue && (0, lodash_1.isNumber)(_discountValue)) {
78
78
  if (discountType === "PERCENTAGE") {
79
79
  return quantity * unitPriceAmount * ((100 - _discountValue) / 100);
80
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unimaze/billing",
3
- "version": "0.21.9",
3
+ "version": "0.21.11",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",