|
Lines 523-529
export default {
Link Here
|
| 523 |
{ value: true, description: $__("Active") }, |
523 |
{ value: true, description: $__("Active") }, |
| 524 |
{ value: false, description: $__("Inactive") }, |
524 |
{ value: false, description: $__("Inactive") }, |
| 525 |
], |
525 |
], |
| 526 |
value: true, |
526 |
defaultValue: true, |
| 527 |
}, |
527 |
}, |
| 528 |
{ |
528 |
{ |
| 529 |
name: "list_currency", |
529 |
name: "list_currency", |
|
Lines 555-561
export default {
Link Here
|
| 555 |
{ value: true, description: $__("Yes") }, |
555 |
{ value: true, description: $__("Yes") }, |
| 556 |
{ value: false, description: $__("No") }, |
556 |
{ value: false, description: $__("No") }, |
| 557 |
], |
557 |
], |
| 558 |
value: true, |
558 |
defaultValue: true, |
| 559 |
hideIn: ["List"], |
559 |
hideIn: ["List"], |
| 560 |
}, |
560 |
}, |
| 561 |
{ |
561 |
{ |
|
Lines 567-573
export default {
Link Here
|
| 567 |
{ value: true, description: $__("Include tax") }, |
567 |
{ value: true, description: $__("Include tax") }, |
| 568 |
{ value: false, description: $__("Don't include tax") }, |
568 |
{ value: false, description: $__("Don't include tax") }, |
| 569 |
], |
569 |
], |
| 570 |
value: true, |
570 |
defaultValue: true, |
| 571 |
hideIn: ["List"], |
571 |
hideIn: ["List"], |
| 572 |
}, |
572 |
}, |
| 573 |
{ |
573 |
{ |
|
Lines 579-585
export default {
Link Here
|
| 579 |
{ value: true, description: $__("Include tax") }, |
579 |
{ value: true, description: $__("Include tax") }, |
| 580 |
{ value: false, description: $__("Don't include tax") }, |
580 |
{ value: false, description: $__("Don't include tax") }, |
| 581 |
], |
581 |
], |
| 582 |
value: true, |
582 |
defaultValue: true, |
|
|
583 |
hideIn: ["List"], |
| 584 |
}, |
| 585 |
{ |
| 586 |
name: "payment_method", |
| 587 |
group: $__("Ordering information"), |
| 588 |
type: "select", |
| 589 |
label: $__("Payment method"), |
| 590 |
avCat: "av_vendor_payment_methods", |
| 591 |
allowMultipleChoices: true, |
| 583 |
hideIn: ["List"], |
592 |
hideIn: ["List"], |
| 584 |
}, |
593 |
}, |
| 585 |
{ |
594 |
{ |
|
Lines 794-799
export default {
Link Here
|
| 794 |
baseResource.setWarning(errors.join("<br>")); |
803 |
baseResource.setWarning(errors.join("<br>")); |
| 795 |
if (errors.length) return false; |
804 |
if (errors.length) return false; |
| 796 |
|
805 |
|
|
|
806 |
if (vendor.payment_method && vendor.payment_method.length) { |
| 807 |
vendor.payment_method = vendor.payment_method.join("|"); |
| 808 |
} else { |
| 809 |
vendor.payment_method = null; |
| 810 |
} |
| 811 |
|
| 797 |
if (vendorId) { |
812 |
if (vendorId) { |
| 798 |
baseResource.apiClient.update(vendor, vendorId).then( |
813 |
baseResource.apiClient.update(vendor, vendorId).then( |
| 799 |
success => { |
814 |
success => { |
|
Lines 832-837
export default {
Link Here
|
| 832 |
componentData.resource.value.discount = |
847 |
componentData.resource.value.discount = |
| 833 |
componentData.resource.value.discount.toFixed(1); |
848 |
componentData.resource.value.discount.toFixed(1); |
| 834 |
} |
849 |
} |
|
|
850 |
componentData.resource.payment_method = resource.payment_method |
| 851 |
? resource.payment_method.split("|") |
| 852 |
: []; |
| 835 |
} |
853 |
} |
| 836 |
if (caller === "show") { |
854 |
if (caller === "show") { |
| 837 |
let physicalAddress = ""; |
855 |
let physicalAddress = ""; |
|
Lines 841-846
export default {
Link Here
|
| 841 |
} |
859 |
} |
| 842 |
}); |
860 |
}); |
| 843 |
resource.physical = physicalAddress; |
861 |
resource.physical = physicalAddress; |
|
|
862 |
|
| 863 |
if (resource.payment_method) { |
| 864 |
const avs = |
| 865 |
componentData.instancedResource.authorisedValues |
| 866 |
.av_vendor_payment_methods; |
| 867 |
const paymentMethods = resource.payment_method.split("|"); |
| 868 |
let displayString = ""; |
| 869 |
paymentMethods.forEach((method, i) => { |
| 870 |
const isLastMethod = i + 1 === paymentMethods.length; |
| 871 |
const avMatch = avs.find(av => av.value === method); |
| 872 |
if (avMatch) { |
| 873 |
displayString += avMatch.description; |
| 874 |
if (!isLastMethod) displayString += ", "; |
| 875 |
} |
| 876 |
}); |
| 877 |
resource.payment_method = displayString; |
| 878 |
} |
| 844 |
} |
879 |
} |
| 845 |
}; |
880 |
}; |
| 846 |
|
881 |
|