mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +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();
|
||||
|
||||
router.post(
|
||||
'/',
|
||||
this.estimateValidationSchema,
|
||||
'/', [
|
||||
...this.estimateValidationSchema,
|
||||
],
|
||||
this.validationResult,
|
||||
asyncMiddleware(this.newEstimate.bind(this)),
|
||||
this.handleServiceErrors,
|
||||
@@ -85,6 +86,7 @@ export default class SalesEstimatesController extends BaseController {
|
||||
|
||||
check('note').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.text('note');
|
||||
table.text('terms_conditions');
|
||||
|
||||
table.text('send_to_email');
|
||||
table.integer('user_id').unsigned().index();
|
||||
table.timestamps();
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ export interface ISaleEstimate {
|
||||
termsConditions: string,
|
||||
userId: number,
|
||||
entries: IItemEntry[],
|
||||
|
||||
sendToEmail: string,
|
||||
createdAt?: Date,
|
||||
};
|
||||
export interface ISaleEstimateDTO {
|
||||
@@ -22,6 +22,7 @@ export interface ISaleEstimateDTO {
|
||||
entries: IItemEntry[],
|
||||
note: string,
|
||||
termsConditions: string,
|
||||
sendToEmail: string,
|
||||
};
|
||||
|
||||
export interface ISalesEstimatesFilter extends IDynamicListFilterDTO {
|
||||
|
||||
@@ -120,7 +120,9 @@ export default class SaleEstimateService {
|
||||
});
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ export default class PaymentReceivesSubscriber {
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle
|
||||
* Handle revert invoices payment amount once payment receive deleted.
|
||||
*/
|
||||
@On(events.paymentReceive.onDeleted)
|
||||
async handleInvoiceDecrementPaymentAmount({ tenantId, paymentReceiveId, oldPaymentReceive }) {
|
||||
|
||||
Reference in New Issue
Block a user