mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
fix: missed send_to_email column in sale estimate.
This commit is contained in:
@@ -23,8 +23,9 @@ export default class SalesEstimatesController extends BaseController {
|
|||||||
const router = Router();
|
const router = Router();
|
||||||
|
|
||||||
router.post(
|
router.post(
|
||||||
'/',
|
'/', [
|
||||||
this.estimateValidationSchema,
|
...this.estimateValidationSchema,
|
||||||
|
],
|
||||||
this.validationResult,
|
this.validationResult,
|
||||||
asyncMiddleware(this.newEstimate.bind(this)),
|
asyncMiddleware(this.newEstimate.bind(this)),
|
||||||
this.handleServiceErrors,
|
this.handleServiceErrors,
|
||||||
@@ -85,6 +86,7 @@ export default class SalesEstimatesController extends BaseController {
|
|||||||
|
|
||||||
check('note').optional().trim().escape(),
|
check('note').optional().trim().escape(),
|
||||||
check('terms_conditions').optional().trim().escape(),
|
check('terms_conditions').optional().trim().escape(),
|
||||||
|
check('send_to_email').optional().trim().escape(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ exports.up = function(knex) {
|
|||||||
table.string('estimate_number').index();
|
table.string('estimate_number').index();
|
||||||
table.text('note');
|
table.text('note');
|
||||||
table.text('terms_conditions');
|
table.text('terms_conditions');
|
||||||
|
table.text('send_to_email');
|
||||||
table.integer('user_id').unsigned().index();
|
table.integer('user_id').unsigned().index();
|
||||||
table.timestamps();
|
table.timestamps();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export interface ISaleEstimate {
|
|||||||
termsConditions: string,
|
termsConditions: string,
|
||||||
userId: number,
|
userId: number,
|
||||||
entries: IItemEntry[],
|
entries: IItemEntry[],
|
||||||
|
sendToEmail: string,
|
||||||
createdAt?: Date,
|
createdAt?: Date,
|
||||||
};
|
};
|
||||||
export interface ISaleEstimateDTO {
|
export interface ISaleEstimateDTO {
|
||||||
@@ -22,6 +22,7 @@ export interface ISaleEstimateDTO {
|
|||||||
entries: IItemEntry[],
|
entries: IItemEntry[],
|
||||||
note: string,
|
note: string,
|
||||||
termsConditions: string,
|
termsConditions: string,
|
||||||
|
sendToEmail: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface ISalesEstimatesFilter extends IDynamicListFilterDTO {
|
export interface ISalesEstimatesFilter extends IDynamicListFilterDTO {
|
||||||
|
|||||||
@@ -120,7 +120,9 @@ export default class SaleEstimateService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.logger.info('[sale_estimate] insert sale estimated success.');
|
this.logger.info('[sale_estimate] insert sale estimated success.');
|
||||||
await this.eventDispatcher.dispatch(events.saleEstimate.onCreated);
|
await this.eventDispatcher.dispatch(events.saleEstimate.onCreated, {
|
||||||
|
tenantId, saleEstimate, saleEstimateId: saleEstimate.id,
|
||||||
|
});
|
||||||
|
|
||||||
return saleEstimate;
|
return saleEstimate;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default class PaymentReceivesSubscriber {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle
|
* Handle revert invoices payment amount once payment receive deleted.
|
||||||
*/
|
*/
|
||||||
@On(events.paymentReceive.onDeleted)
|
@On(events.paymentReceive.onDeleted)
|
||||||
async handleInvoiceDecrementPaymentAmount({ tenantId, paymentReceiveId, oldPaymentReceive }) {
|
async handleInvoiceDecrementPaymentAmount({ tenantId, paymentReceiveId, oldPaymentReceive }) {
|
||||||
|
|||||||
Reference in New Issue
Block a user