biz9-logic 4.8.270 → 4.8.272

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.
Files changed (3) hide show
  1. package/biz9_config +1 -1
  2. package/index.js +14 -15
  3. package/package.json +1 -1
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='7.5.0'
1
+ VERSION='7.5.2'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -218,7 +218,7 @@ class Page_Logic {
218
218
  class Order_Logic {
219
219
  static get_new = (cart) => {
220
220
  let order = DataItem.get_new(DataType.ORDER,0,{
221
- order_number:Order_Logic.get_new_order_number(),
221
+ order_number:FieldType.ORDER_NUMBER + Num.get_id(99999),
222
222
  parent_data_type:cart.parent_data_type,
223
223
  user_id:cart.user_id,
224
224
  cart_number:cart.cart_number,
@@ -250,17 +250,19 @@ class Order_Logic {
250
250
  });
251
251
  return order;
252
252
  };
253
-
254
- static get_new_order_number = () => {
255
- return FieldType.ORDER_NUMBER + Num.get_id(99999);
256
- };
257
- static get_new_transaction_id = () => {
258
- return FieldType.TRANSACTION_ID + Num.get_id(99999);
253
+ static get_new_order_payment = (order_number,payment_method,payment_amount) => {
254
+ return DataItem.get_new(DataType.ORDER_PAYMENT,0,
255
+ {
256
+ order_number:order_number,
257
+ payment_method:payment_method,
258
+ payment_amount:payment_amount,
259
+ transaction_id:FieldType.TRANSACTION_ID + Num.get_id(99999)
260
+ });
259
261
  };
260
262
  }
261
263
  class Cart_Logic {
262
264
  static get_new = (parent_data_type) => {
263
- return DataItem.get_new(DataType.CART,0,{cart_number:Cart_Logic.get_new_cart_number(),parent_data_type:parent_data_type,grand_total:0,cart_item_list:[]});
265
+ return DataItem.get_new(DataType.CART,0,{cart_number:FieldType.CART_NUMBER + Num.get_id(99999),parent_data_type:parent_data_type,grand_total:0,cart_item_list:[]});
264
266
  };
265
267
  static get_new_cart_item = (parent_data_type,parent_id,cart_number,quanity) =>{
266
268
  return DataItem.get_new(DataType.CART_ITEM,0,{parent_data_type:parent_data_type,parent_id:parent_id,cart_number:cart_number,quanity:quanity,cart_sub_item_list:[]});
@@ -268,9 +270,6 @@ class Cart_Logic {
268
270
  static get_new_cart_sub_item = (parent_data_type,parent_id,cart_number,quanity) =>{
269
271
  return DataItem.get_new(DataType.CART_SUB_ITEM,0,{parent_data_type:parent_data_type,parent_id:parent_id,cart_number:cart_number,quanity:quanity});
270
272
  };
271
- static get_new_cart_number = () => {
272
- return FieldType.CART_NUMBER + Num.get_id(99999);
273
- };
274
273
  }
275
274
  class Product_Logic {
276
275
  static get_test = (title,option) =>{
@@ -814,10 +813,10 @@ class FieldType {
814
813
  static PAYMENT_PLAN_TYPE_3="3 Payments";
815
814
  static PAYMENT_PLAN_TYPE_4="4 Payments";
816
815
 
817
- static PAYMENT_TYPE_STRIPE="Stripe";
818
- static PAYMENT_TYPE_CASH="Cash";
819
- static PAYMENT_TYPE_OTHER="Other";
820
- static PAYMENT_TYPE_TEST="Test";
816
+ static PAYMENT_METHOD_STRIPE="Stripe";
817
+ static PAYMENT_METHOD_CASH="Cash";
818
+ static PAYMENT_METHOD_OTHER="Other";
819
+ static PAYMENT_METHOD_TEST="Test";
821
820
 
822
821
  static APP_TYPE_MOBILE="Mobile";
823
822
  static APP_TYPE_WEBSITE="Website";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.270",
3
+ "version": "4.8.272",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"