mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
fix: convert sale estimate to invoice.
This commit is contained in:
@@ -26,15 +26,16 @@ export default class SaleInvoiceSubscriber {
|
||||
* Marks the sale estimate as converted from the sale invoice once created.
|
||||
*/
|
||||
@On(events.saleInvoice.onCreated)
|
||||
public async handleMarkEstimateConvert({
|
||||
public async handleMarkEstimateConvertOnceInvoiceCreated({
|
||||
tenantId,
|
||||
saleInvoice,
|
||||
saleInvoiceDTO,
|
||||
saleInvoiceId,
|
||||
}) {
|
||||
if (saleInvoice.fromEstimateId) {
|
||||
this.saleEstimatesService.convertEstimateToInvoice(
|
||||
if (saleInvoiceDTO.fromEstimateId) {
|
||||
await this.saleEstimatesService.convertEstimateToInvoice(
|
||||
tenantId,
|
||||
saleInvoice.fromEstiamteId,
|
||||
saleInvoiceDTO.fromEstimateId,
|
||||
saleInvoiceId
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user