js-gei 1.1.2 → 1.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-gei",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Lightweight TypeScript library template using Vite",
5
5
  "main": "dist/js-gei.umd.js",
6
6
  "module": "dist/js-gei.es.js",
@@ -6,7 +6,7 @@ import { HelpersTables } from "../Evaluator/HelpersTables";
6
6
 
7
7
  export class InvoiceObj {
8
8
  rootLevel:TableLevel|null=null;
9
- Legislation:string;
9
+
10
10
  ObjectInfo:any;
11
11
  LeftObject:any=null;
12
12
  ExternalTables:any={};
@@ -17,12 +17,12 @@ public Mappings:any|null=null;
17
17
  public CodeListCache:any={};
18
18
  public InvoiceStructure:any={};
19
19
  public constructor(
20
- legislation:string,
20
+
21
21
  obj:any,
22
22
  clientinfo:any
23
23
  )
24
24
  {
25
- this.Legislation=legislation;
25
+
26
26
  this.LeftObject=obj;
27
27
  this.ObjectInfo=clientinfo?.OI??{};
28
28
  this.CodeListCache=clientinfo?.CodeList??{};
@@ -36,8 +36,7 @@ private prepareValues()
36
36
  const now=new Date();
37
37
  this._dicValues={
38
38
  "NOW":this.formatDateTime(now),
39
- "DATE" :this.formatDate(now),
40
- "LEGISLATION":this.Legislation
39
+ "DATE" :this.formatDate(now)
41
40
  };
42
41
  }
43
42
  public static isMultiple(table:string):boolean{
package/src/main.ts CHANGED
@@ -6,15 +6,15 @@ import {RpcClient} from './Lib/jsonrpc-2.0.js';
6
6
 
7
7
 
8
8
 
9
- export const getClientInfoFromServer = async (url:string,legislation:string,cb:any) =>{
9
+ export const getClientInfoFromServer = async (url:string,cb:any) =>{
10
10
  RpcClient.config = {};
11
11
 
12
12
  RpcClient.config.url = url+"/json.rpc";
13
13
  RpcClient.config.cors = true;
14
14
 
15
- var method = "GEI.GetClientLibObj";
15
+ var method = "EOL.GetClientInfoForLib";
16
16
 
17
- var params = { "Legislation": legislation, };
17
+ var params = { };
18
18
  RpcClient.call(method, params)
19
19
  .done(function (response: any) {
20
20
  if(cb!=null)
@@ -25,7 +25,7 @@ export const getClientInfoFromServer = async (url:string,legislation:string,cb:a
25
25
  })
26
26
  .post(getStdRpcContext());
27
27
  }
28
- export const getEditNewFromServer = async (url:string,legislation:string,cb:any) =>{
28
+ export const getEditNewFromServer = async (url:string,cb:any) =>{
29
29
  RpcClient.config = {};
30
30
 
31
31
  RpcClient.config.url = url+"/json.rpc";
@@ -66,11 +66,15 @@ export const generateXMLFromServer = async (url:string,legislation:string,versio
66
66
  }
67
67
 
68
68
 
69
- export const evaluateEdit = (legislation:string,editObj:any,clientInfoParsed:any) =>{
69
+ export const evaluateEdit = (editObj:any,clientInfoParsed:any) =>{
70
+ if(editObj["Invoice"]==null)
71
+ {
72
+ editObj["Invoice"]=editObj;
73
+ }
70
74
  var techObj = fromEditToTech(editObj);
71
75
  console.log("Tech obj:");
72
76
  console.log(techObj);
73
- var invoiceObj = new InvoiceObj(legislation,techObj, clientInfoParsed);
77
+ var invoiceObj = new InvoiceObj(techObj, clientInfoParsed);
74
78
  if(!invoiceObj.Evaluate())
75
79
  {
76
80
  console.log("Errors:");
@@ -303,7 +307,7 @@ export const getClientInfo = (url:string,legislation:string,callback:any) =>{
303
307
  console.error("Error getting client info from server:"+response.error.data);
304
308
  }
305
309
  }
306
- getClientInfoFromServer(url,legislation,cb);
310
+ getClientInfoFromServer(url,cb);
307
311
 
308
312
  }
309
313
  else