taxtank-core 0.28.80 → 0.28.82
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 +12 -2
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/transaction/transaction.collection.js +5 -2
- package/esm2015/lib/forms/sole/sole-invoice.form.js +5 -2
- package/fesm2015/taxtank-core.js +8 -2
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/transaction/transaction.collection.d.ts +1 -0
- package/package.json +1 -1
|
@@ -7962,7 +7962,7 @@
|
|
|
7962
7962
|
* Cash position is equal to Total Amount because income is positive and expense is negative,
|
|
7963
7963
|
*/
|
|
7964
7964
|
get: function () {
|
|
7965
|
-
return this.
|
|
7965
|
+
return this.grossAmount;
|
|
7966
7966
|
},
|
|
7967
7967
|
enumerable: false,
|
|
7968
7968
|
configurable: true
|
|
@@ -7983,6 +7983,13 @@
|
|
|
7983
7983
|
enumerable: false,
|
|
7984
7984
|
configurable: true
|
|
7985
7985
|
});
|
|
7986
|
+
Object.defineProperty(TransactionCollection.prototype, "grossAmount", {
|
|
7987
|
+
get: function () {
|
|
7988
|
+
return this.items.reduce(function (sum, transaction) { return sum + transaction.grossAmount; }, 0);
|
|
7989
|
+
},
|
|
7990
|
+
enumerable: false,
|
|
7991
|
+
configurable: true
|
|
7992
|
+
});
|
|
7986
7993
|
TransactionCollection.prototype.getByChartAccountsCategories = function (categories) {
|
|
7987
7994
|
return new TransactionCollection(this.items.filter(function (transaction) { return categories.includes(transaction.chartAccounts.category); }));
|
|
7988
7995
|
};
|
|
@@ -19120,7 +19127,10 @@
|
|
|
19120
19127
|
// we need invoice template only for new invoices
|
|
19121
19128
|
if (!invoice.id) {
|
|
19122
19129
|
(_this.commonData).addControl('template', new forms.FormControl(_this.defaultTemplate));
|
|
19123
|
-
|
|
19130
|
+
// user can have no template, but he can add it from this form
|
|
19131
|
+
if (_this.defaultTemplate) {
|
|
19132
|
+
_this.updateTemplateRelatedFields(_this.defaultTemplate);
|
|
19133
|
+
}
|
|
19124
19134
|
}
|
|
19125
19135
|
// invoice.taxType is always NONE ('No Tax') when soleDetails.isGST === false
|
|
19126
19136
|
if (!_this.soleDetailsGST) {
|