|
@@ -866,11 +866,17 @@
|
|
|
(newValue, oldValue) => {
|
|
|
let data = newValue.dataSource;
|
|
|
let total = 0;
|
|
|
+ let other = 0;
|
|
|
data.map((item) => {
|
|
|
- total += Number(item.taxAmount);
|
|
|
+ if (item.sourceType) {
|
|
|
+ total += Number(item.taxAmount) || 0;
|
|
|
+ } else {
|
|
|
+ other += Number(item.taxAmount) || 0;
|
|
|
+ }
|
|
|
});
|
|
|
formData.totalAmount = total;
|
|
|
getDiscountAmount();
|
|
|
+ formData.discountAmount = parseFloat(formData.discountAmount) + parseFloat(other);
|
|
|
if (data.length < 1) {
|
|
|
formData.discountHead = 0;
|
|
|
formData.discountAmount = '';
|