diff --git a/ax/SRC/AxFacilitor.js b/ax/SRC/AxFacilitor.js
index 86637f2..c4f8d43 100644
--- a/ax/SRC/AxFacilitor.js
+++ b/ax/SRC/AxFacilitor.js
@@ -14,7 +14,12 @@ function FCLT_Sync_START(){
F_PutSync(0);
}
function FCLT_Sync_END(){
+ if (AX_or_Tobias() == "A365"){
+ F_PutSync(2);
+ }
+ else{
F_PutSync(1);
+ }
}
// ----------------------------- AX functies -----------------------------------------
diff --git a/ax/SRC/Common.js b/ax/SRC/Common.js
index f870df7..c10e447 100644
--- a/ax/SRC/Common.js
+++ b/ax/SRC/Common.js
@@ -527,10 +527,10 @@ function api2_AX365 (v_Url, v_API, v_req, v_type, v_soapAction)
{
//MARX#57502: AX Adapter robuuster maken: Waarschijnlijk timeout-error
__Log("api2_AX365 failed/timeout: " + e.description,1);
- if (G_abort_http_error == 1)
- {
- MARXQUIT();
- }
+ //if (G_abort_http_error == 1)
+ //{
+ // MARXQUIT();
+ //}
return "";
}
@@ -562,7 +562,7 @@ function api2_AX365 (v_Url, v_API, v_req, v_type, v_soapAction)
__Log(txt,1);
//Voor AX2012 moet Dispose dit niet worden aangeroepen, hangt dan!
//api2AX_Dispose(v_Url, xmlhttp);
- return {};
+ return "";
}
}
else
@@ -588,27 +588,27 @@ function api2_AX365 (v_Url, v_API, v_req, v_type, v_soapAction)
return txt;
}
else{
- __Log("api2_AX365: Token problem, maximum van 3 pogingen zijn allemaal mislukt" ,1);
- if (G_abort_http_error == 1)
- {
- MARXQUIT();
- }
+ __Log("api2_AX365: Token problem, maximum van 3 pogingen zijn allemaal mislukt" ,1);
+ //if (G_abort_http_error == 1)
+ //{
+ // MARXQUIT();
+ //}
return ""
}
}
else{
- if (G_abort_http_error == 1)
- {
- MARXQUIT();
- }
+ //if (G_abort_http_error == 1)
+ //{
+ // MARXQUIT();
+ //}
return ""
}
}
- if (G_abort_http_error == 1)
- {
- MARXQUIT();
- }
+ //if (G_abort_http_error == 1)
+ //{
+ // MARXQUIT();
+ //}
return ""
}
}
diff --git a/ax/SRC/F_GetFacturen.js b/ax/SRC/F_GetFacturen.js
index c517657..a194eef 100644
--- a/ax/SRC/F_GetFacturen.js
+++ b/ax/SRC/F_GetFacturen.js
@@ -414,7 +414,7 @@ function A365_Xtractor2AX(v_resp, i, v_deelxml, v_factuur_key)
node_attachment[0].appendChild(newEle);
__Log("XML element added to XML",3);
}
- }
+ }
}
var XMLResult = "" + v_deelxml.xml;
@@ -432,11 +432,25 @@ function A365_Xtractor2AX(v_resp, i, v_deelxml, v_factuur_key)
var v_soapAction = "PreInvoiceService/addPreInvoiceFromXtractor";
var v_resp = apiAX(v_API, v_req, v_type, v_soapAction);
- //if (v_resp.search("true") != -1) {
- // WriteText2File(G_ax_succeededfolder, xtractFile, "xml", v_req, 1, 1);
- //} else {
- // WriteText2File(G_ax_rejectedfolder, xtractFile, "xml", v_req, 1, 1);
- //}
- return v_resp;
+ var l_marx_api = "ACTION_REF_KEY";
+ var l_import_action = "";
+ var l_xml = "";
+ var l_extra_omschr = "";
+ if (v_resp.search("true") != -1) {
+ l_import_action = "FIN_FACTUUR_POST_SUCCESS";
+ l_extra_omschr = "";
+ __Log("AX365 factuurverwerking succesvol",3);
+
+ } else {
+ l_import_action = "FIN_FACTUUR_POST_FAIL";
+ l_extra_omschr = v_resp.substr(0, 4000);
+ __Log("AX365 factuurverwerking NIET succesvol",1);
+ }
+ if (l_import_action != ""){
+ l_xml = "" + l_import_action + "" + "" + v_factuur_key + "" + "" + l_extra_omschr + "";
+ l_xml = "" + l_xml + "";
+ api_F_PutXML(l_xml, l_marx_api);
+ }
+ return v_resp;
}