Merge pull request 'HOTFIX: maxium calls exceed' (!1490) from hotfix_customerBalance_newPayment into master
gitea/salix-front/pipeline/head This commit looks good Details
gitea/salix-front/pipeline/pr-master There was a failure building this commit Details

Reviewed-on: #1490
Reviewed-by: Carlos Satorres <carlossa@verdnatura.es>
This commit is contained in:
Javier Segarra 2025-02-25 08:06:02 +00:00
commit c07fd2d2a5
1 changed files with 6 additions and 7 deletions

View File

@ -77,24 +77,23 @@ onBeforeMount(() => {
function setPaymentType(accounting) {
if (!accounting) return;
accountingType.value = accounting.accountingType;
initialData.description = [];
initialData.payed = Date.vnNew();
isCash.value = accountingType.value.code == 'cash';
viewReceipt.value = isCash.value;
if (accountingType.value.daysInFuture)
initialData.payed.setDate(
initialData.payed.getDate() + accountingType.value.daysInFuture
initialData.payed.getDate() + accountingType.value.daysInFuture,
);
maxAmount.value = accountingType.value && accountingType.value.maxAmount;
if (accountingType.value.code == 'compensation')
return (initialData.description = '');
if (accountingType.value.receiptDescription)
initialData.description.push(accountingType.value.receiptDescription);
if (initialData.description) initialData.description.push(initialData.description);
initialData.description = initialData.description.join(', ');
let descriptions = [];
if (accountingType.value.receiptDescription)
descriptions.push(accountingType.value.receiptDescription);
if (initialData.description) descriptions.push(initialData.description);
initialData.description = descriptions.join(', ');
}
const calculateFromAmount = (event) => {