|
Lines 471-477
export default {
Link Here
|
| 471 |
{ value: true, description: $__("Active") }, |
471 |
{ value: true, description: $__("Active") }, |
| 472 |
{ value: false, description: $__("Inactive") }, |
472 |
{ value: false, description: $__("Inactive") }, |
| 473 |
], |
473 |
], |
| 474 |
value: true, |
474 |
defaultValue: true, |
| 475 |
}, |
475 |
}, |
| 476 |
{ |
476 |
{ |
| 477 |
name: "list_currency", |
477 |
name: "list_currency", |
|
Lines 503-509
export default {
Link Here
|
| 503 |
{ value: true, description: $__("Yes") }, |
503 |
{ value: true, description: $__("Yes") }, |
| 504 |
{ value: false, description: $__("No") }, |
504 |
{ value: false, description: $__("No") }, |
| 505 |
], |
505 |
], |
| 506 |
value: true, |
506 |
defaultValue: true, |
| 507 |
hideIn: ["List"], |
507 |
hideIn: ["List"], |
| 508 |
}, |
508 |
}, |
| 509 |
{ |
509 |
{ |
|
Lines 515-521
export default {
Link Here
|
| 515 |
{ value: true, description: $__("Include tax") }, |
515 |
{ value: true, description: $__("Include tax") }, |
| 516 |
{ value: false, description: $__("Don't include tax") }, |
516 |
{ value: false, description: $__("Don't include tax") }, |
| 517 |
], |
517 |
], |
| 518 |
value: true, |
518 |
defaultValue: true, |
|
|
519 |
hideIn: ["List"], |
| 520 |
}, |
| 521 |
{ |
| 522 |
name: "payment_method", |
| 523 |
group: $__("Ordering information"), |
| 524 |
type: "select", |
| 525 |
label: $__("Payment method"), |
| 526 |
avCat: "av_vendor_payment_methods", |
| 527 |
allowMultipleChoices: true, |
| 519 |
hideIn: ["List"], |
528 |
hideIn: ["List"], |
| 520 |
}, |
529 |
}, |
| 521 |
{ |
530 |
{ |
|
Lines 527-533
export default {
Link Here
|
| 527 |
{ value: true, description: $__("Include tax") }, |
536 |
{ value: true, description: $__("Include tax") }, |
| 528 |
{ value: false, description: $__("Don't include tax") }, |
537 |
{ value: false, description: $__("Don't include tax") }, |
| 529 |
], |
538 |
], |
| 530 |
value: true, |
539 |
defaultValue: true, |
| 531 |
hideIn: ["List"], |
540 |
hideIn: ["List"], |
| 532 |
}, |
541 |
}, |
| 533 |
{ |
542 |
{ |
|
Lines 743-748
export default {
Link Here
|
| 743 |
baseResource.setWarning(errors.join("<br>")); |
752 |
baseResource.setWarning(errors.join("<br>")); |
| 744 |
if (errors.length) return false; |
753 |
if (errors.length) return false; |
| 745 |
|
754 |
|
|
|
755 |
if (vendor.payment_method && vendor.payment_method.length) { |
| 756 |
vendor.payment_method = vendor.payment_method.join("|"); |
| 757 |
} else { |
| 758 |
vendor.payment_method = null; |
| 759 |
} |
| 760 |
|
| 746 |
if (vendorId) { |
761 |
if (vendorId) { |
| 747 |
baseResource.apiClient.update(vendor, vendorId).then( |
762 |
baseResource.apiClient.update(vendor, vendorId).then( |
| 748 |
success => { |
763 |
success => { |
|
Lines 781-786
export default {
Link Here
|
| 781 |
componentData.resource.value.discount = |
796 |
componentData.resource.value.discount = |
| 782 |
componentData.resource.value.discount.toFixed(1); |
797 |
componentData.resource.value.discount.toFixed(1); |
| 783 |
} |
798 |
} |
|
|
799 |
componentData.resource.payment_method = resource.payment_method |
| 800 |
? resource.payment_method.split("|") |
| 801 |
: []; |
| 784 |
} |
802 |
} |
| 785 |
if (caller === "show") { |
803 |
if (caller === "show") { |
| 786 |
let physicalAddress = ""; |
804 |
let physicalAddress = ""; |
|
Lines 790-795
export default {
Link Here
|
| 790 |
} |
808 |
} |
| 791 |
}); |
809 |
}); |
| 792 |
resource.physical = physicalAddress; |
810 |
resource.physical = physicalAddress; |
|
|
811 |
|
| 812 |
if (resource.payment_method) { |
| 813 |
const avs = |
| 814 |
componentData.instancedResource.authorisedValues |
| 815 |
.av_vendor_payment_methods; |
| 816 |
const paymentMethods = resource.payment_method.split("|"); |
| 817 |
let displayString = ""; |
| 818 |
paymentMethods.forEach((method, i) => { |
| 819 |
const isLastMethod = i + 1 === paymentMethods.length; |
| 820 |
const avMatch = avs.find(av => av.value === method); |
| 821 |
if (avMatch) { |
| 822 |
displayString += avMatch.description; |
| 823 |
if (!isLastMethod) displayString += ", "; |
| 824 |
} |
| 825 |
}); |
| 826 |
resource.payment_method = displayString; |
| 827 |
} |
| 793 |
} |
828 |
} |
| 794 |
}; |
829 |
}; |
| 795 |
|
830 |
|