biz9-logic 3.5.13 → 3.5.15

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/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='3.6.3'
1
+ VERSION='3.6.5'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -47,6 +47,13 @@ class DataItem {
47
47
  static get_biz = (biz9_config,item,options)=>{
48
48
  return get_biz_item_main(biz9_config,item,options);
49
49
  }
50
+ static get_biz_by_list = (biz9_config,list,options)=>{
51
+ let r_list = [];
52
+ for(let a=0;a<list.length;a++){
53
+ r_list.push(get_biz_item_main(biz9_config,list[a],options));
54
+ }
55
+ return r_list;
56
+ }
50
57
  }
51
58
  class BiZ_Url {
52
59
  static get_item=(biz9_config,data_type,id)=>{
@@ -168,8 +175,9 @@ class CMS {
168
175
  static Tab_Edit_Title_List = 'list';
169
176
  static Tab_Edit_Title_Value = 'value';
170
177
  static Tab_Edit_Title_Setting = 'setting';
178
+ static Tab_Edit_Title_Audio = 'audio';
179
+ static Tab_Edit_Title_Video = 'video';
171
180
  static Tab_Edit_Title_Note = 'note';
172
-
173
181
  static get_new_query_item_by_item = (item) => {
174
182
  return {
175
183
  id: item.id ? item.id : 0,
@@ -228,10 +236,19 @@ class CMS {
228
236
  break;
229
237
  case CMS.Tab_Edit_Title_Setting:
230
238
  return 'Settings';
239
+ break;
231
240
  case CMS.Tab_Edit_Title_Note:
232
241
  return 'Note';
242
+ break;
243
+ case CMS.Tab_Edit_Title_Audio:
244
+ return 'Audio';
245
+ break;
246
+ case CMS.Tab_Edit_Title_Video:
247
+ return 'Video';
248
+ break;
233
249
  default:
234
250
  return 'N/A';
251
+ break;
235
252
  }
236
253
  }
237
254
  static get_page_url = (url,tab_title,item,parent_item,top_item,parms) => {
@@ -253,7 +270,6 @@ class CMS {
253
270
  return url+r_url;
254
271
  }
255
272
  }
256
-
257
273
  module.exports = {
258
274
  DataType,
259
275
  DataItem,
package/main.js CHANGED
@@ -45,8 +45,6 @@ const get_biz_item_main=(biz9_config,item,options) =>{
45
45
  item.discount=parseFloat(0.00);
46
46
  }
47
47
  discount = item.old_cost - item.cost;
48
- console.log('aaaaaaa');
49
- console.log(discount);
50
48
  item.discount= parseInt(((discount / item.old_cost) * 100));
51
49
  if(isNaN(item.discount)){
52
50
  item.discount="0%";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "3.5.13",
3
+ "version": "3.5.15",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -28,7 +28,28 @@ const biz9_config ={
28
28
  describe("connect", () => {
29
29
  it("_connect", () => {
30
30
  series([
31
+ function(call) {
32
+ console.log('SET-ITEM-BIZ-BY-LIST-START');
33
+ let item_test_list = [];
34
+ let item_test = Test.get_item('dt_blank',0);
35
+ item_test.cost = String(Number.get_id())+'.55';
36
+ item_test.old_cost = String(Number.get_id())+'.20';
37
+ item_test.title ='_title_'+Number.get_id();
38
+
39
+ item_test_list.push(item_test);
31
40
 
41
+ let item_test_1 = Test.get_item('dt_blank',0);
42
+ item_test_1.cost = '5.55';
43
+ item_test_1.old_cost = '9.55';
44
+ item_test_1.title ='_title_'+Number.get_id();
45
+
46
+ item_test_list.push(item_test_1);
47
+
48
+ let item_list_biz = DataItem.get_biz_by_list(biz9_config,item_test_list,{get_date:false,get_count:false,get_biz_map:false,get_money:true});
49
+ console.log(item_list_biz);
50
+ console.log('SET-ITEM-BIZ-BY-LIST-SUCCESS');
51
+ //call();
52
+ },
32
53
  function(call) {
33
54
  console.log('SET-ITEM-BIZ-START');
34
55
  let item_test = Test.get_item('dt_blank',0);