@sdflc/backend-helpers 1.0.97 → 1.0.99
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/build/BaseCore.js +11 -5
- package/build/Database.d.ts +1 -0
- package/build/Database.js +3 -0
- package/build/esm/BaseCore.js +11 -5
- package/build/esm/Database.d.ts +1 -0
- package/build/esm/Database.js +3 -0
- package/build/esm/interfaces/BaseCorePropsInterface.d.ts +1 -0
- package/build/interfaces/BaseCorePropsInterface.d.ts +1 -0
- package/package.json +1 -1
package/build/BaseCore.js
CHANGED
|
@@ -703,11 +703,17 @@ class BaseCore {
|
|
|
703
703
|
},
|
|
704
704
|
});
|
|
705
705
|
if (lastRecord.length > 0) {
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
}
|
|
710
|
-
|
|
706
|
+
if (this.config.orderNoAsDecimal === true) {
|
|
707
|
+
params.orderNo =
|
|
708
|
+
lastRecord[0]?.orderNo != null ? lastRecord[0]?.orderNo + constants_1.DEFAULT_ORDER_NO : constants_1.DEFAULT_ORDER_NO;
|
|
709
|
+
}
|
|
710
|
+
else {
|
|
711
|
+
const order = new utils_1.StrOrderHelpers({
|
|
712
|
+
start: lastRecord[0]?.orderNo || constants_1.DEFAULT_ORDER_NO,
|
|
713
|
+
step: constants_1.DEFAULT_ORDER_NO_STEP,
|
|
714
|
+
});
|
|
715
|
+
params.orderNo = order.increase();
|
|
716
|
+
}
|
|
711
717
|
}
|
|
712
718
|
}
|
|
713
719
|
}
|
package/build/Database.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ declare class Database {
|
|
|
14
14
|
runRawQuery(query: string, bindings: any): Promise<any>;
|
|
15
15
|
startTransaction(): Promise<unknown>;
|
|
16
16
|
setTransaction(trx: any): void;
|
|
17
|
+
getTransaction(): any;
|
|
17
18
|
commitTransaction(): Promise<void>;
|
|
18
19
|
rollbackTransaction(): Promise<void>;
|
|
19
20
|
doCalculated(item: any, calculatedFields: any[]): void;
|
package/build/Database.js
CHANGED
package/build/esm/BaseCore.js
CHANGED
|
@@ -697,11 +697,17 @@ class BaseCore {
|
|
|
697
697
|
},
|
|
698
698
|
});
|
|
699
699
|
if (lastRecord.length > 0) {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
}
|
|
704
|
-
|
|
700
|
+
if (this.config.orderNoAsDecimal === true) {
|
|
701
|
+
params.orderNo =
|
|
702
|
+
lastRecord[0]?.orderNo != null ? lastRecord[0]?.orderNo + DEFAULT_ORDER_NO : DEFAULT_ORDER_NO;
|
|
703
|
+
}
|
|
704
|
+
else {
|
|
705
|
+
const order = new StrOrderHelpers({
|
|
706
|
+
start: lastRecord[0]?.orderNo || DEFAULT_ORDER_NO,
|
|
707
|
+
step: DEFAULT_ORDER_NO_STEP,
|
|
708
|
+
});
|
|
709
|
+
params.orderNo = order.increase();
|
|
710
|
+
}
|
|
705
711
|
}
|
|
706
712
|
}
|
|
707
713
|
}
|
package/build/esm/Database.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ declare class Database {
|
|
|
14
14
|
runRawQuery(query: string, bindings: any): Promise<any>;
|
|
15
15
|
startTransaction(): Promise<unknown>;
|
|
16
16
|
setTransaction(trx: any): void;
|
|
17
|
+
getTransaction(): any;
|
|
17
18
|
commitTransaction(): Promise<void>;
|
|
18
19
|
rollbackTransaction(): Promise<void>;
|
|
19
20
|
doCalculated(item: any, calculatedFields: any[]): void;
|
package/build/esm/Database.js
CHANGED