delore-crm-core 1.0.7 → 1.0.8
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/db/models.js +2 -1
- package/package.json +1 -1
package/db/models.js
CHANGED
|
@@ -895,6 +895,7 @@ function getContentNumber(field) {
|
|
|
895
895
|
}
|
|
896
896
|
|
|
897
897
|
async function canDelete(tableName, id, companyId) {
|
|
898
|
+
const sequelize = require('delore-crm-core').sequelizeDB.getSequelize()
|
|
898
899
|
var sql = 'Select sum(sub) total from (';
|
|
899
900
|
|
|
900
901
|
var subSQL = '';
|
|
@@ -934,8 +935,8 @@ async function makeSQLTransf(tableName, idOri, idDes, companyId) {
|
|
|
934
935
|
}
|
|
935
936
|
|
|
936
937
|
async function canDelete2(tableName, id) {
|
|
938
|
+
const sequelize = require('delore-crm-core').sequelizeDB.getSequelize()
|
|
937
939
|
var sql = 'Select sum(sub) total from (';
|
|
938
|
-
|
|
939
940
|
var subSQL = '';
|
|
940
941
|
listTablesValidDel.forEach((table) => {
|
|
941
942
|
if (table.tableDelete === tableName) {
|