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 user = state.getUser();
|
||||
const initialData = ref({
|
||||
...$props.formData.value,
|
||||
...$props.formData,
|
||||
companyFk: user.value.companyFk,
|
||||
payed: Date.vnNew(),
|
||||
});
|
||||
|
@ -147,21 +147,22 @@ async function getAmountPaid() {
|
|||
}
|
||||
|
||||
async function onSubmit(formData) {
|
||||
const clientFk = $props.clientId;
|
||||
const {
|
||||
data: [{ email }],
|
||||
} = await axios.get('Clients', {
|
||||
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,
|
||||
companyFk: formData.companyFk,
|
||||
bankFk: formData.bankFk,
|
||||
amountPaid: formData.amountPaid,
|
||||
description: formData.description,
|
||||
clientFk: $props.clientFk,
|
||||
clientFk,
|
||||
email,
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue