log idxpr
This commit is contained in:
@ -119,6 +119,8 @@ exports.createPOSAPold = (req, res) => {
|
||||
// console.log(resdata.data.length);
|
||||
// poadapter.sendResponse(statusCode,resdata, res);
|
||||
if (resdata.data.length > 0) {
|
||||
const idxpr = resdata.data[0]["idxpr"] ?? 0;
|
||||
|
||||
let comp_code = "1603";
|
||||
let doc_type = "POTL";
|
||||
let creat_date = req.body.createdate;
|
||||
@ -215,7 +217,7 @@ exports.createPOSAPold = (req, res) => {
|
||||
request(resuri, function (error, response) {
|
||||
logData.response_at = new Date();
|
||||
logData.response = error ? JSON.stringify(error) : response.body;
|
||||
sapadapter.queryInsertSapLog(resdata.data[0]["idxpr"] ?? 0, logData, "CREATE_PO");
|
||||
sapadapter.queryInsertSapLog(idxpr, logData, "CREATE_PO");
|
||||
|
||||
if (error) {
|
||||
// console.log(error);
|
||||
@ -719,6 +721,8 @@ exports.createHeaderPOSAP = (req, res) => {
|
||||
// console.log(resdata.data.length);
|
||||
// poadapter.sendResponse(statusCode,resdata, res);
|
||||
if (resdata.data.length > 0) {
|
||||
const idxpr = resdata.data[0]["idxpr"] ?? 0;
|
||||
|
||||
let identifyprojectnumber = resdata.data[0]["identifyprojectnumber"];
|
||||
let contractdescription = resdata.data[0]["contractdescription"];
|
||||
let contractperiodfrom = resdata.data[0]["contractperiodfrom"];
|
||||
@ -794,7 +798,7 @@ exports.createHeaderPOSAP = (req, res) => {
|
||||
request(resuri, function (error, response) {
|
||||
logData.response_at = new Date();
|
||||
logData.response = error ? JSON.stringify(error) : response.body;
|
||||
sapadapter.queryInsertSapLog(resdata.data[0]["idxpr"] ?? 0, logData, "CREATE_HEADER_SAP");
|
||||
sapadapter.queryInsertSapLog(idxpr, logData, "CREATE_HEADER_SAP");
|
||||
|
||||
if (error) {
|
||||
apireshandler.message = error.toString();
|
||||
|
||||
Reference in New Issue
Block a user