ETASCOM CRM V3 - Documentation API
Storybook
GitHub
Preparing search index...
app/(protected)/sales/invoices/hooks/use-invoices
useInvoiceMutations
Function useInvoiceMutations
useInvoiceMutations
(
onSuccess
?:
()
=>
void
,
)
:
{
create
:
UseMutationResult
<
any
,
Error
,
{
number
?:
string
;
clientId
:
string
;
salesOrderId
?:
string
;
invoiceDate
:
string
;
dueDate
?:
string
;
status
:
|
"DRAFT"
|
"SENT"
|
"CANCELLED"
|
"PAID"
|
"PARTIALLY_PAID"
|
"UNPAID"
|
"OVERDUE"
|
"CREDIT_NOTE"
;
subtotal
:
number
;
taxRate
:
number
;
taxAmount
:
number
;
totalAmount
:
number
;
currencyId
?:
string
;
globalTaxId
?:
string
;
notes
?:
string
;
lines
:
{
id
?:
string
;
description
:
string
;
quantity
:
number
;
unitPrice
:
number
;
totalPrice
:
number
;
taxId
?:
string
;
taxRate
:
number
;
taxAmount
:
number
;
notes
?:
string
;
finishedProductId
?:
string
;
}
[]
;
}
,
unknown
,
>
;
update
:
UseMutationResult
<
any
,
Error
,
{
id
:
string
;
number
?:
string
;
clientId
?:
string
;
salesOrderId
?:
string
;
invoiceDate
?:
string
;
dueDate
?:
string
;
status
?:
|
"DRAFT"
|
"SENT"
|
"CANCELLED"
|
"PAID"
|
"PARTIALLY_PAID"
|
"UNPAID"
|
"OVERDUE"
|
"CREDIT_NOTE"
;
subtotal
?:
number
;
taxRate
?:
number
;
taxAmount
?:
number
;
totalAmount
?:
number
;
currencyId
?:
string
;
globalTaxId
?:
string
;
notes
?:
string
;
lines
?:
{
id
?:
string
;
description
:
string
;
quantity
:
number
;
unitPrice
:
number
;
totalPrice
:
number
;
taxId
?:
string
;
taxRate
:
number
;
taxAmount
:
number
;
notes
?:
string
;
finishedProductId
?:
string
;
}
[]
;
}
,
unknown
,
>
;
delete
:
UseMutationResult
<
any
,
Error
,
string
,
unknown
>
;
convertOrderToInvoice
:
UseMutationResult
<
any
,
Error
,
{
salesOrderId
:
string
;
invoiceNumber
?:
string
;
invoiceDate
:
string
;
dueDate
?:
string
;
notes
?:
string
;
}
,
unknown
,
>
;
}
Parameters
Optional
onSuccess
:
()
=>
void
Returns
{
create
:
UseMutationResult
<
any
,
Error
,
{
number
?:
string
;
clientId
:
string
;
salesOrderId
?:
string
;
invoiceDate
:
string
;
dueDate
?:
string
;
status
:
|
"DRAFT"
|
"SENT"
|
"CANCELLED"
|
"PAID"
|
"PARTIALLY_PAID"
|
"UNPAID"
|
"OVERDUE"
|
"CREDIT_NOTE"
;
subtotal
:
number
;
taxRate
:
number
;
taxAmount
:
number
;
totalAmount
:
number
;
currencyId
?:
string
;
globalTaxId
?:
string
;
notes
?:
string
;
lines
:
{
id
?:
string
;
description
:
string
;
quantity
:
number
;
unitPrice
:
number
;
totalPrice
:
number
;
taxId
?:
string
;
taxRate
:
number
;
taxAmount
:
number
;
notes
?:
string
;
finishedProductId
?:
string
;
}
[]
;
}
,
unknown
,
>
;
update
:
UseMutationResult
<
any
,
Error
,
{
id
:
string
;
number
?:
string
;
clientId
?:
string
;
salesOrderId
?:
string
;
invoiceDate
?:
string
;
dueDate
?:
string
;
status
?:
|
"DRAFT"
|
"SENT"
|
"CANCELLED"
|
"PAID"
|
"PARTIALLY_PAID"
|
"UNPAID"
|
"OVERDUE"
|
"CREDIT_NOTE"
;
subtotal
?:
number
;
taxRate
?:
number
;
taxAmount
?:
number
;
totalAmount
?:
number
;
currencyId
?:
string
;
globalTaxId
?:
string
;
notes
?:
string
;
lines
?:
{
id
?:
string
;
description
:
string
;
quantity
:
number
;
unitPrice
:
number
;
totalPrice
:
number
;
taxId
?:
string
;
taxRate
:
number
;
taxAmount
:
number
;
notes
?:
string
;
finishedProductId
?:
string
;
}
[]
;
}
,
unknown
,
>
;
delete
:
UseMutationResult
<
any
,
Error
,
string
,
unknown
>
;
convertOrderToInvoice
:
UseMutationResult
<
any
,
Error
,
{
salesOrderId
:
string
;
invoiceNumber
?:
string
;
invoiceDate
:
string
;
dueDate
?:
string
;
notes
?:
string
;
}
,
unknown
,
>
;
}
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Storybook
GitHub
ETASCOM CRM V3 - Documentation API
Loading...