fix: improve ticketNewPayment
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
0b5cc7d00f
commit
67b51d7833
|
@ -53,7 +53,7 @@ const filterBanks = {
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const initialData = ref({
|
const initialData = ref({
|
||||||
...$props.formData.value,
|
...$props.formData,
|
||||||
companyFk: user.value.companyFk,
|
companyFk: user.value.companyFk,
|
||||||
payed: Date.vnNew(),
|
payed: Date.vnNew(),
|
||||||
});
|
});
|
||||||
|
@ -147,21 +147,22 @@ async function getAmountPaid() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onSubmit(formData) {
|
async function onSubmit(formData) {
|
||||||
|
const clientFk = $props.clientId;
|
||||||
const {
|
const {
|
||||||
data: [{ email }],
|
data: [{ email }],
|
||||||
} = await axios.get('Clients', {
|
} = await axios.get('Clients', {
|
||||||
params: {
|
params: {
|
||||||
filter: JSON.stringify({ where: { id: $props.clientFk } }),
|
filter: JSON.stringify({ where: { id: clientFk } }),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data } = await axios.post(`Clients/${formData.clientFk}/createReceipt`, {
|
const { data } = await axios.post(`Clients/${clientFk}/createReceipt`, {
|
||||||
payed: formData.payed,
|
payed: formData.payed,
|
||||||
companyFk: formData.companyFk,
|
companyFk: formData.companyFk,
|
||||||
bankFk: formData.bankFk,
|
bankFk: formData.bankFk,
|
||||||
amountPaid: formData.amountPaid,
|
amountPaid: formData.amountPaid,
|
||||||
description: formData.description,
|
description: formData.description,
|
||||||
clientFk: $props.clientFk,
|
clientFk,
|
||||||
email,
|
email,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue