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/dist/js-gei.es.js +22 -22
- package/dist/js-gei.umd.js +2 -2
- package/package.json +1 -1
- package/src/Structure/InvoiceObj.ts +4 -5
- package/src/main.ts +11 -7
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ import { HelpersTables } from "../Evaluator/HelpersTables";
|
|
|
6
6
|
|
|
7
7
|
export class InvoiceObj {
|
|
8
8
|
rootLevel:TableLevel|null=null;
|
|
9
|
-
|
|
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
|
-
|
|
20
|
+
|
|
21
21
|
obj:any,
|
|
22
22
|
clientinfo:any
|
|
23
23
|
)
|
|
24
24
|
{
|
|
25
|
-
|
|
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,
|
|
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 = "
|
|
15
|
+
var method = "EOL.GetClientInfoForLib";
|
|
16
16
|
|
|
17
|
-
var params = {
|
|
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,
|
|
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 = (
|
|
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(
|
|
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,
|
|
310
|
+
getClientInfoFromServer(url,cb);
|
|
307
311
|
|
|
308
312
|
}
|
|
309
313
|
else
|