@kipicore/dbcore 1.1.605 → 1.1.607
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/dist/constants/app.d.ts +2 -1
- package/dist/constants/app.js +1 -0
- package/dist/db/psql/migrations/20260620000005-add_remarks_to_po.d.ts +2 -0
- package/dist/db/psql/migrations/20260620000005-add_remarks_to_po.js +22 -0
- package/dist/db/psql/migrations/20260622000001-alter_po_numeric_fields.d.ts +2 -0
- package/dist/db/psql/migrations/20260622000001-alter_po_numeric_fields.js +58 -0
- package/dist/interfaces/rmsPurchaseOrderInterface.d.ts +2 -0
- package/dist/models/psql/rmsPurchaseOrderModel.d.ts +2 -0
- package/dist/models/psql/rmsPurchaseOrderModel.js +9 -0
- package/dist/models/psql/rmsStockModel.js +1 -1
- package/dist/models/psql/rmsStockTransactionModel.js +1 -1
- package/package.json +1 -1
package/dist/constants/app.d.ts
CHANGED
|
@@ -1507,7 +1507,8 @@ export declare enum RMS_APPROVAL_STATUS {
|
|
|
1507
1507
|
APPROVED = "APPROVED",
|
|
1508
1508
|
REJECTED = "REJECTED",
|
|
1509
1509
|
CANCELLED = "CANCELLED",
|
|
1510
|
-
PO_CREATED = "PO_CREATED"
|
|
1510
|
+
PO_CREATED = "PO_CREATED",
|
|
1511
|
+
GRN_CREATED = "GRN_CREATED"
|
|
1511
1512
|
}
|
|
1512
1513
|
export declare enum RMS_PRIORITY {
|
|
1513
1514
|
LOW = "LOW",
|
package/dist/constants/app.js
CHANGED
|
@@ -1818,6 +1818,7 @@ var RMS_APPROVAL_STATUS;
|
|
|
1818
1818
|
RMS_APPROVAL_STATUS["REJECTED"] = "REJECTED";
|
|
1819
1819
|
RMS_APPROVAL_STATUS["CANCELLED"] = "CANCELLED";
|
|
1820
1820
|
RMS_APPROVAL_STATUS["PO_CREATED"] = "PO_CREATED";
|
|
1821
|
+
RMS_APPROVAL_STATUS["GRN_CREATED"] = "GRN_CREATED";
|
|
1821
1822
|
})(RMS_APPROVAL_STATUS || (exports.RMS_APPROVAL_STATUS = RMS_APPROVAL_STATUS = {}));
|
|
1822
1823
|
var RMS_PRIORITY;
|
|
1823
1824
|
(function (RMS_PRIORITY) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
module.exports = {
|
|
3
|
+
up: async (queryInterface, Sequelize) => {
|
|
4
|
+
const tableInfo = await queryInterface.describeTable('rms_purchase_orders');
|
|
5
|
+
if (!tableInfo['remarks']) {
|
|
6
|
+
await queryInterface.addColumn('rms_purchase_orders', 'remarks', {
|
|
7
|
+
type: Sequelize.TEXT,
|
|
8
|
+
allowNull: true,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (!tableInfo['approval_remarks']) {
|
|
12
|
+
await queryInterface.addColumn('rms_purchase_orders', 'approval_remarks', {
|
|
13
|
+
type: Sequelize.TEXT,
|
|
14
|
+
allowNull: true,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
down: async (queryInterface, Sequelize) => {
|
|
19
|
+
await queryInterface.removeColumn('rms_purchase_orders', 'remarks');
|
|
20
|
+
await queryInterface.removeColumn('rms_purchase_orders', 'approval_remarks');
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
module.exports = {
|
|
3
|
+
up: async (queryInterface, Sequelize) => {
|
|
4
|
+
// rms_purchase_orders
|
|
5
|
+
await queryInterface.changeColumn('rms_purchase_orders', 'total_amount', {
|
|
6
|
+
type: Sequelize.DECIMAL(15, 2),
|
|
7
|
+
allowNull: true,
|
|
8
|
+
defaultValue: 0,
|
|
9
|
+
});
|
|
10
|
+
await queryInterface.changeColumn('rms_purchase_orders', 'tax_amount', {
|
|
11
|
+
type: Sequelize.DECIMAL(15, 2),
|
|
12
|
+
allowNull: true,
|
|
13
|
+
defaultValue: 0,
|
|
14
|
+
});
|
|
15
|
+
await queryInterface.changeColumn('rms_purchase_orders', 'discount_amount', {
|
|
16
|
+
type: Sequelize.DECIMAL(15, 2),
|
|
17
|
+
allowNull: true,
|
|
18
|
+
defaultValue: 0,
|
|
19
|
+
});
|
|
20
|
+
// rms_purchase_order_items
|
|
21
|
+
await queryInterface.changeColumn('rms_purchase_order_items', 'amount', {
|
|
22
|
+
type: Sequelize.DECIMAL(15, 2),
|
|
23
|
+
allowNull: true,
|
|
24
|
+
});
|
|
25
|
+
await queryInterface.changeColumn('rms_purchase_order_items', 'tax_amount', {
|
|
26
|
+
type: Sequelize.DECIMAL(15, 2),
|
|
27
|
+
allowNull: true,
|
|
28
|
+
defaultValue: 0,
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
down: async (queryInterface, Sequelize) => {
|
|
32
|
+
// Revert back to DECIMAL(10, 2)
|
|
33
|
+
await queryInterface.changeColumn('rms_purchase_orders', 'total_amount', {
|
|
34
|
+
type: Sequelize.DECIMAL(10, 2),
|
|
35
|
+
allowNull: true,
|
|
36
|
+
defaultValue: 0,
|
|
37
|
+
});
|
|
38
|
+
await queryInterface.changeColumn('rms_purchase_orders', 'tax_amount', {
|
|
39
|
+
type: Sequelize.DECIMAL(10, 2),
|
|
40
|
+
allowNull: true,
|
|
41
|
+
defaultValue: 0,
|
|
42
|
+
});
|
|
43
|
+
await queryInterface.changeColumn('rms_purchase_orders', 'discount_amount', {
|
|
44
|
+
type: Sequelize.DECIMAL(10, 2),
|
|
45
|
+
allowNull: true,
|
|
46
|
+
defaultValue: 0,
|
|
47
|
+
});
|
|
48
|
+
await queryInterface.changeColumn('rms_purchase_order_items', 'amount', {
|
|
49
|
+
type: Sequelize.DECIMAL(10, 2),
|
|
50
|
+
allowNull: true,
|
|
51
|
+
});
|
|
52
|
+
await queryInterface.changeColumn('rms_purchase_order_items', 'tax_amount', {
|
|
53
|
+
type: Sequelize.DECIMAL(10, 2),
|
|
54
|
+
allowNull: true,
|
|
55
|
+
defaultValue: 0,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -13,5 +13,7 @@ export interface IRmsPurchaseOrderAttributes extends IDefaultAttributes {
|
|
|
13
13
|
discountAmount: number;
|
|
14
14
|
approvalStatus: RMS_APPROVAL_STATUS;
|
|
15
15
|
fulfillmentStatus: RMS_PO_FULFILLMENT_STATUS;
|
|
16
|
+
approvalRemarks?: string | null;
|
|
17
|
+
remarks?: string | null;
|
|
16
18
|
status: string;
|
|
17
19
|
}
|
|
@@ -15,6 +15,8 @@ declare class RmsPurchaseOrderModel extends Model<IRmsPurchaseOrderAttributes, T
|
|
|
15
15
|
discountAmount: number;
|
|
16
16
|
approvalStatus: RMS_APPROVAL_STATUS;
|
|
17
17
|
fulfillmentStatus: RMS_PO_FULFILLMENT_STATUS;
|
|
18
|
+
approvalRemarks?: string | null;
|
|
19
|
+
remarks?: string | null;
|
|
18
20
|
status: string;
|
|
19
21
|
createdBy?: string | null;
|
|
20
22
|
updatedBy?: string | null;
|
|
@@ -104,6 +104,15 @@ RmsPurchaseOrderModel.init({
|
|
|
104
104
|
defaultValue: app_1.RMS_PO_FULFILLMENT_STATUS.PENDING,
|
|
105
105
|
field: 'fulfillment_status',
|
|
106
106
|
},
|
|
107
|
+
approvalRemarks: {
|
|
108
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
109
|
+
allowNull: true,
|
|
110
|
+
field: 'approval_remarks',
|
|
111
|
+
},
|
|
112
|
+
remarks: {
|
|
113
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
114
|
+
allowNull: true,
|
|
115
|
+
},
|
|
107
116
|
status: {
|
|
108
117
|
type: sequelize_1.DataTypes.STRING,
|
|
109
118
|
allowNull: true,
|
package/package.json
CHANGED