taxtank-core 0.28.79 → 0.28.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/taxtank-core.umd.js +11 -2
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/services/http/sole/sole-invoice/sole-invoice.service.js +11 -3
- package/fesm2015/taxtank-core.js +10 -2
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/services/http/sole/sole-invoice/sole-invoice.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -12993,12 +12993,21 @@
|
|
|
12993
12993
|
return newInvoice;
|
|
12994
12994
|
}));
|
|
12995
12995
|
};
|
|
12996
|
+
SoleInvoiceService.prototype.update = function (invoice) {
|
|
12997
|
+
var _this = this;
|
|
12998
|
+
return _super.prototype.update.call(this, invoice).pipe(operators.map(function (updatedInvoice) {
|
|
12999
|
+
if (!updatedInvoice.isDraft()) {
|
|
13000
|
+
// @TODO vik use different event to reload transactions
|
|
13001
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.SOLE_INVOICE_PUBLISHED, updatedInvoice));
|
|
13002
|
+
}
|
|
13003
|
+
return updatedInvoice;
|
|
13004
|
+
}));
|
|
13005
|
+
};
|
|
12996
13006
|
SoleInvoiceService.prototype.updateStatus = function (invoice, status) {
|
|
12997
13007
|
var _this = this;
|
|
12998
13008
|
// @TODO use id only to avoid unexpected changes
|
|
12999
13009
|
return this.update(Object.assign({}, invoice, { status: status })).pipe(operators.map(function (updatedInvoice) {
|
|
13000
|
-
|
|
13001
|
-
if (invoice.isDraft()) {
|
|
13010
|
+
if (updatedInvoice.isPending()) {
|
|
13002
13011
|
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.SOLE_INVOICE_PUBLISHED, updatedInvoice));
|
|
13003
13012
|
}
|
|
13004
13013
|
return updatedInvoice;
|