This commit is contained in:
parent
2eca98d31d
commit
bf43893b05
|
@ -184,16 +184,6 @@ const onFetch = (data) => {
|
|||
balanceDueTotal.value = data.reduce((acc, { amount = 0 }) => acc + amount, 0);
|
||||
};
|
||||
|
||||
function getRange(value) {
|
||||
let date;
|
||||
if (locale.value === 'es') {
|
||||
const [day, month, year] = value.split('/');
|
||||
date = new Date(year, month - 1, day);
|
||||
} else date = new Date(value);
|
||||
|
||||
return dateRange(date);
|
||||
}
|
||||
|
||||
function exprBuilder(param, value) {
|
||||
switch (param) {
|
||||
case 'clientFk':
|
||||
|
@ -206,9 +196,9 @@ function exprBuilder(param, value) {
|
|||
case 'salesPersonFk':
|
||||
return { [`d.${param}`]: value };
|
||||
case 'date':
|
||||
return { 'd.created': { between: getRange(value) } };
|
||||
return { 'd.created': { between: dateRange(value) } };
|
||||
case 'defaulterSinced':
|
||||
return { 'd.defaulterSinced': { between: getRange(value) } };
|
||||
return { 'd.defaulterSinced': { between: dateRange(value) } };
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -162,7 +162,7 @@ const authors = ref();
|
|||
|
||||
<QItem class="q-mb-sm">
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
<VnInputDate
|
||||
:label="t('L. O. Date')"
|
||||
clearable
|
||||
is-outlined
|
||||
|
|
Loading…
Reference in New Issue