diff --git a/src/FileCabinet/SuiteScripts/POSReturn/HC_SC_CreatePOSReturn.js b/src/FileCabinet/SuiteScripts/POSReturn/HC_SC_CreatePOSReturn.js index 8f300cf..e2b37c6 100644 --- a/src/FileCabinet/SuiteScripts/POSReturn/HC_SC_CreatePOSReturn.js +++ b/src/FileCabinet/SuiteScripts/POSReturn/HC_SC_CreatePOSReturn.js @@ -66,7 +66,7 @@ define(['N/sftp', 'N/record', 'N/error', 'N/search', 'N/file'], function (sftp, var list = connection.list({ path: '/' }); - + for (var i = 0; i < list.length; i++) { if (!list[i].directory) { var fileName = list[i].name; @@ -84,9 +84,12 @@ define(['N/sftp', 'N/record', 'N/error', 'N/search', 'N/file'], function (sftp, // Parse the Return Authorization JSON file var returnAuthorizationDataList = JSON.parse(contents); var errorList = []; + var returnErrorMap = []; for (var dataIndex = 0; dataIndex < returnAuthorizationDataList.length; dataIndex++) { var orderId = returnAuthorizationDataList[dataIndex].order_id; + var shopifyOrderId = returnAuthorizationDataList[dataIndex].shopify_order_id; + var externalId = returnAuthorizationDataList[dataIndex].hc_external_id; var posReturnTotal = returnAuthorizationDataList[dataIndex].pos_return_total; var hcReturnId = returnAuthorizationDataList[dataIndex].hc_return_id; var itemList = returnAuthorizationDataList[dataIndex].items; @@ -96,6 +99,19 @@ define(['N/sftp', 'N/record', 'N/error', 'N/search', 'N/file'], function (sftp, var itemDiscount = returnAuthorizationDataList[dataIndex].item_discount; try { if (orderId) { + // Search for the Sales Order by internal ID and get the status + var salesOrderStatus = search.create({ + type: search.Type.SALES_ORDER, + filters: [['internalid', 'is', orderId]], + columns: ['status'] + }) + .run() + .getRange({ start: 0, end: 1 }) + .map(function (result) { + return result.getValue('status'); + })[0]; + } + if (orderId && salesOrderStatus !== 'pendingFulfillment' && salesOrderStatus !== 'pendingApprove') { // Initialize Return Authorization from Sales Order var returnAuthorizationRecord = record.transform({ fromType: record.Type.SALES_ORDER, @@ -114,7 +130,15 @@ define(['N/sftp', 'N/record', 'N/error', 'N/search', 'N/file'], function (sftp, fieldId: 'orderstatus', value: "B" }); - + + if (externalId) { + // Set External Id + returnAuthorizationRecord.setValue({ + fieldId: 'externalid', + value: externalId + }); + } + returnAuthorizationRecord.setValue({ fieldId: 'custbody_hc_pos_return_id', value: hcReturnId @@ -124,93 +148,78 @@ define(['N/sftp', 'N/record', 'N/error', 'N/search', 'N/file'], function (sftp, sublistId: 'item' }); - var removeListline = []; - for (var j = 0; j < lineCount; j++) { - var matchFound = false; - var itemid = returnAuthorizationRecord.getSublistValue({ + // Remove line item + for (var j = lineCount - 1; j >= 0; j--) { + returnAuthorizationRecord.removeLine({ sublistId: 'item', - fieldId: 'item', line: j + }); + } + + for (var itemIndex = 0; itemIndex < itemList.length; itemIndex++) { + var productId = itemList[itemIndex].product_id; + var returnquantity = itemList[itemIndex].quantity; + var returnamount = itemList[itemIndex].amount; + var returnlineid = itemList[itemIndex].external_order_line_id; + var locationid = itemList[itemIndex].location_id; + var returnReason = itemList[itemIndex].return_reason; + + returnAuthorizationRecord.selectNewLine({ + sublistId: 'item', }); - var externallineid = returnAuthorizationRecord.getSublistValue({ + returnAuthorizationRecord.setCurrentSublistValue({ sublistId: 'item', - fieldId: 'custcol_hc_order_line_id', - line: j + fieldId: 'item', + value: productId }); - - for (var itemIndex = 0; itemIndex < itemList.length; itemIndex++) { - var productId = itemList[itemIndex].product_id; - var returnquantity = itemList[itemIndex].quantity; - var returnamount = itemList[itemIndex].amount; - var returnlineid = itemList[itemIndex].external_order_line_id; - var locationid = itemList[itemIndex].location_id; - var returnReason = itemList[itemIndex].return_reason; - - // If return item match with sales order item - if (productId === itemid && returnlineid === externallineid) { - matchFound = true; - returnAuthorizationRecord.selectLine({ - sublistId: 'item', - line: j - }); - returnAuthorizationRecord.setCurrentSublistValue({ - sublistId: 'item', - fieldId: 'quantity', - value: returnquantity - }); - - // Custom price level - returnAuthorizationRecord.setCurrentSublistValue({ - sublistId: 'item', - fieldId: 'price', - value: "-1" - }); + returnAuthorizationRecord.setCurrentSublistValue({ + sublistId: 'item', + fieldId: 'quantity', + value: returnquantity + }); - returnAuthorizationRecord.setCurrentSublistValue({ - sublistId: 'item', - fieldId: 'amount', - value: returnamount - }); + // Custom price level + returnAuthorizationRecord.setCurrentSublistValue({ + sublistId: 'item', + fieldId: 'price', + value: "-1" + }); - // Set return reason memo - if (returnReason !== null) { - returnAuthorizationRecord.setCurrentSublistValue({ - sublistId: 'item', - fieldId: 'custcol_hc_retrun_reason', - value: returnReason - }); - } + returnAuthorizationRecord.setCurrentSublistValue({ + sublistId: 'item', + fieldId: 'amount', + value: returnamount + }); - if (locationid !== "") { - returnAuthorizationRecord.setCurrentSublistValue({ - sublistId: 'item', - fieldId: 'location', - value: locationid - }); - } + returnAuthorizationRecord.setCurrentSublistValue({ + sublistId: 'item', + fieldId: 'custcol_hc_order_line_id', + value: returnlineid + }); - returnAuthorizationRecord.commitLine({ - sublistId: 'item' - }); - } + // Set return reason memo + if (returnReason !== null) { + returnAuthorizationRecord.setCurrentSublistValue({ + sublistId: 'item', + fieldId: 'custcol_hc_retrun_reason', + value: returnReason + }); } - if (!matchFound) { - removeListline.push(j); - } - } - // Remove line item are not in return - if (removeListline.length > 0) { - for (var k = removeListline.length - 1; k >= 0; k--) { - var removeitem = removeListline[k] - returnAuthorizationRecord.removeLine({ + if (locationid !== "") { + returnAuthorizationRecord.setCurrentSublistValue({ sublistId: 'item', - line: removeitem + fieldId: 'location', + value: locationid }); } - } + + returnAuthorizationRecord.commitLine({ + sublistId: 'item' + }); + } if (itemDiscount.length != 0) { for (var itemDiscountIndex = 0; itemDiscountIndex < itemDiscount.length; itemDiscountIndex++) { @@ -310,7 +319,9 @@ define(['N/sftp', 'N/record', 'N/error', 'N/search', 'N/file'], function (sftp, }); } - if (offsetLineValue != 0) { + if (offsetLineValue && offsetLineValue != 0) { + var offsetLineAmount = offsetLineValue.toFixed(2); + returnAuthorizationRecord.selectNewLine({ sublistId: 'item', }); @@ -327,7 +338,7 @@ define(['N/sftp', 'N/record', 'N/error', 'N/search', 'N/file'], function (sftp, returnAuthorizationRecord.setCurrentSublistValue({ sublistId: 'item', fieldId: 'amount', - value: offsetLineValue + value: offsetLineAmount }); returnAuthorizationRecord.setCurrentSublistValue({ @@ -470,19 +481,50 @@ define(['N/sftp', 'N/record', 'N/error', 'N/search', 'N/file'], function (sftp, log.debug("Customer Refund created for credit memo with ID: " + creditMemoId + ", Customer Refund ID: " + customerRefundId); } } + } else { + if (salesOrderStatus == 'pendingFulfillment' || salesOrderStatus == 'pendingApprove') { + log.debug("RMA cannot be created as the order is in Pending Fulfillment or Pending Approval status"); + var errorInfo = shopifyOrderId + ',' + "RMA cannot be created as the order is in Pending Fulfillment or Pending Approval status : " + ',' + fileName + '\n'; + var returnMap = returnAuthorizationDataList[dataIndex] + returnErrorMap.push(returnMap); + errorList.push(errorInfo); + + } else { + log.debug("Order is not found to create loop return"); + var errorInfo = shopifyOrderId + ',' + "Order is not found to create pos return : " + ',' + fileName + '\n'; + var returnMap = returnAuthorizationDataList[dataIndex] + returnErrorMap.push(returnMap); + errorList.push(errorInfo); + } } } catch (e) { log.error({ title: 'Error in processing POS order ' + orderId, details: e }); - var errorInfo = orderId + ',' + e.message + '\n'; + var errorInfo = orderId + ',' + e.message + ',' + fileName + '\n'; errorList.push(errorInfo); } } + + if (returnErrorMap.length !== 0) { + log.debug("return map create") + var returnJSON = JSON.stringify(returnErrorMap); + var date = new Date(); + var jsonFile = file.create({ + name: date + '-POSReturnRetry.json', + fileType: file.Type.JSON, + contents: returnJSON, + }); + + connection.upload({ + directory: '/', + file: jsonFile + }); + } if (errorList.length !== 0) { - var fileLines = 'orderId,errorMessage\n'; + var fileLines = 'orderId,errorMessage,fileName\n'; fileLines = fileLines + errorList; var date = new Date(); diff --git a/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerDeposit.js b/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerDeposit.js index 995909d..6528340 100644 --- a/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerDeposit.js +++ b/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerDeposit.js @@ -89,6 +89,7 @@ define(['N/search', 'N/record', 'N/error', 'N/sftp', 'N/file'], function (search var orderId = orderDataList[dataIndex].order_id; var totalAmount = orderDataList[dataIndex].total_amount; var shopifyPaymentMethodId = orderDataList[dataIndex].payment_method; + var externalId = orderDataList[dataIndex].external_id; try { if (totalAmount > 0 && orderId) { @@ -110,6 +111,13 @@ define(['N/search', 'N/record', 'N/error', 'N/sftp', 'N/file'], function (search customerDeposit.setValue({fieldId: 'payment', value: totalAmount}); customerDeposit.setValue({fieldId: 'trandate', value: new Date(date)}); customerDeposit.setValue({fieldId: 'paymentmethod', value: shopifyPaymentMethodId}); + if (externalId) { + // Set CD External Id + customerDeposit.setValue({ + fieldId: 'externalid', + value: externalId + }); + } var customerDepositId = customerDeposit.save(); log.debug("customer deposit is created with id " + customerDepositId); @@ -120,12 +128,13 @@ define(['N/search', 'N/record', 'N/error', 'N/sftp', 'N/file'], function (search title: 'Error in creating customer deposit records for sales order ' + orderId, details: e, }); - var errorInfo = orderId + ',' + e.message + '\n'; + + var errorInfo = orderId + ',' + e.message + ',' + fileName + '\n'; errorList.push(errorInfo); } } if (errorList.length !== 0) { - var fileLines = 'orderId,errorMessage\n'; + var fileLines = 'orderId,errorMessage,fileName\n'; fileLines = fileLines + errorList; var date = new Date(); diff --git a/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerDepositAndRefund.js b/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerDepositAndRefund.js new file mode 100644 index 0000000..c47ab50 --- /dev/null +++ b/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerDepositAndRefund.js @@ -0,0 +1,254 @@ +/** + * @NApiVersion 2.1 + * @NScriptType ScheduledScript + */ +define(['N/search', 'N/record', 'N/error', 'N/sftp', 'N/file'], function (search, record, error, sftp, file) { + function execute(context) { + try { + //Get Custom Record Type SFTP details + var customRecordSFTPSearch = search.create({ + type: 'customrecord_ns_sftp_configuration', + columns: [ + 'custrecord_ns_sftp_server', + 'custrecord_ns_sftp_userid', + 'custrecord_ns_sftp_port_no', + 'custrecord_ns_sftp_host_key', + 'custrecord_ns_sftp_guid', + 'custrecord_ns_sftp_default_file_dir' + ] + + }); + var sftpSearchResults = customRecordSFTPSearch.run().getRange({ + start: 0, + end: 1 + }); + + var sftpSearchResult = sftpSearchResults[0]; + + var sftpUrl = sftpSearchResult.getValue({ + name: 'custrecord_ns_sftp_server' + }); + + var sftpUserName = sftpSearchResult.getValue({ + name: 'custrecord_ns_sftp_userid' + }); + + var sftpPort = sftpSearchResult.getValue({ + name: 'custrecord_ns_sftp_port_no' + }); + + var hostKey = sftpSearchResult.getValue({ + name: 'custrecord_ns_sftp_host_key' + }); + + var sftpKeyId = sftpSearchResult.getValue({ + name: 'custrecord_ns_sftp_guid' + }); + + var sftpDirectory = sftpSearchResult.getValue({ + name: 'custrecord_ns_sftp_default_file_dir' + }); + + sftpDirectory = sftpDirectory + 'salesorder'; + sftpPort = parseInt(sftpPort); + + var connection = sftp.createConnection({ + username: sftpUserName, + secret: sftpKeyId, + url: sftpUrl, + port: sftpPort, + directory: sftpDirectory, + hostKey: hostKey + }); + log.debug("Connection established successfully with SFTP server!"); + + var list = connection.list({ + path: '/CD-CR/' + }); + + for (var i=0; i 0) { + log.debug("File downloaded successfully !" + fileName); + var contents = downloadedFile.getContents(); + + //Parse the JSON file + var orderDataList = JSON.parse(contents); + var errorList = []; + + for (var dataIndex = 0; dataIndex < orderDataList.length; dataIndex++) { + var orderId = orderDataList[dataIndex].order_id; + var totalAmount = orderDataList[dataIndex].total_amount; + var externalId = orderDataList[dataIndex].external_id; + var statusId = orderDataList[dataIndex].status_id; + var parentRefId = orderDataList[dataIndex].parent_ref_id; + var shopifyPaymentMethodId = orderDataList[dataIndex].payment_method; + + try { + // Create a customer deposit + if (totalAmount > 0 && orderId && statusId === 'PAYMENT_SETTLED') { + var fieldLookUp = search.lookupFields({ + type: search.Type.SALES_ORDER, + id: orderId, + columns: ['lastmodifieddate'] + }); + var date = fieldLookUp.lastmodifieddate; + + var customerDeposit = record.create({ + type: record.Type.CUSTOMER_DEPOSIT, + isDynamic: false, + defaultValues: { + salesorder: orderId + } + }); + + customerDeposit.setValue({fieldId: 'payment', value: totalAmount}); + customerDeposit.setValue({fieldId: 'trandate', value: new Date(date)}); + customerDeposit.setValue({fieldId: 'paymentmethod', value: shopifyPaymentMethodId}); + if (externalId) { + customerDeposit.setValue({fieldId: 'externalid', value: externalId}); + } + + var customerDepositId = customerDeposit.save(); + log.debug("customer deposit is created with id " + customerDepositId); + } + // Create a customer refund + if (totalAmount > 0 && orderId && statusId === 'PAYMENT_REFUNDED') { + var depositInternalId = ''; + // Create search to find customer deposit associated with Parent Ref Id of customer Refund + if (parentRefId) { + var customerDepositSearch = search.create({ + type: search.Type.CUSTOMER_DEPOSIT, + filters: [ + ['externalId', 'is', parentRefId] + ], + columns: ['internalid'] + }) + // Run the search + var searchResults = customerDepositSearch.run().getRange({ start: 0, end: 1 }); + + // If customer deposit found, retrieve its internal ID + if (searchResults && searchResults.length > 0) { + depositInternalId = searchResults[0].getValue({ name: 'internalid' }); + } + + log.debug("customer deposit id " + depositInternalId); + } else { + // Create search to find customer deposit associated with the sales order + var customerDepositSearch = search.create({ + type: search.Type.CUSTOMER_DEPOSIT, + filters: [ + ['createdfrom', 'is', orderId], + 'and', + ['paymentmethod', 'is', shopifyPaymentMethodId] + ], + columns: [ + search.createColumn({ + name: 'internalid', + sort: search.Sort.DESC + }) + ] + }); + // Run the search + var searchResults = customerDepositSearch.run().getRange({ start: 0, end: 1 }); + + // If customer deposit found, retrieve its internal ID + if (searchResults && searchResults.length > 0) { + depositInternalId = searchResults[0].getValue({ name: 'internalid' }); + } + } + // If customer deposit found, retrieve its internal ID + if (depositInternalId) { + var customerRefundRecord = record.transform({ + fromType: record.Type.CUSTOMER_DEPOSIT, + fromId: depositInternalId, + toType: record.Type.CUSTOMER_REFUND, + isDynamic: false + }); + + customerRefundRecord.setValue({fieldId: 'paymentmethod', value: shopifyPaymentMethodId}); + if (externalId) { + customerRefundRecord.setValue({fieldId: 'externalid', value: externalId}); + } + customerRefundRecord.setSublistValue({ + sublistId: 'deposit', + fieldId: 'amount', + value: totalAmount, + line: 0 + }); + + var customerRefundId = customerRefundRecord.save(); + log.debug("customer refund is created with id " + customerRefundId); + } else { + log.debug("Customer Deposit Not Found Unable to process a customer refund because the Parent Reference Number provided is invalid or missing " , orderId); + var errorInfo = orderId + ',' + "Customer Deposit Not Found Unable to process a customer refund because the Parent Reference Number provided is invalid or missing" + ',' + fileName + '\n'; + errorList.push(errorInfo); + } + } + + } catch (e) { + log.error({ + title: 'Error in creating customer deposit and customer refund records for sales order ' + orderId, + details: e, + }); + var errorInfo = orderId + ',' + e.message + ',' + fileName + '\n'; + errorList.push(errorInfo); + } + } + if (errorList.length !== 0) { + var fileLines = 'orderId,errorMessage,fileName\n'; + fileLines = fileLines + errorList; + + var date = new Date(); + var errorFileName = date + '-ErrorCustomerDepositAndRefund.csv'; + var fileObj = file.create({ + name: errorFileName, + fileType: file.Type.CSV, + contents: fileLines + }); + + connection.upload({ + directory: '/CD-CR/error/', + file: fileObj + }); + } + // Archive the file + connection.move({ + from: '/CD-CR/' + fileName, + to: '/CD-CR/archive/' + fileName + }) + log.debug('File moved!'); + } + } catch (e) { + log.error({ + title: 'Error in creating customer deposit and customer refund records for sales order', + details: e, + }); + } + } + } + + } catch (e) { + log.error({ + title: 'Error in creating customer deposit and customer refund records for sales order', + details: e, + }); + throw error.create({ + name: "Error in creating customer deposit and customer refund records for sales order ", + message: e + }); + } + } + return { + execute: execute + }; + }); \ No newline at end of file diff --git a/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerRefund.js b/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerRefund.js index 33721ef..27c9526 100644 --- a/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerRefund.js +++ b/src/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerRefund.js @@ -89,34 +89,54 @@ define(['N/search', 'N/record', 'N/error', 'N/sftp', 'N/file'], function (search var orderId = orderDataList[dataIndex].order_id; var refundAmount = orderDataList[dataIndex].refund_amount; var shopifyPaymentMethodId = orderDataList[dataIndex].refund_payment_method; + var externalId = orderDataList[dataIndex].external_id; + var parentRefId = orderDataList[dataIndex].parent_ref_id; try { if (refundAmount > 0 && orderId) { var depositInternalId = ''; - - // Create search to find customer deposit associated with the sales order - var customerDepositSearch = search.create({ - type: search.Type.CUSTOMER_DEPOSIT, - filters: [ - ['createdfrom', 'is', orderId], - 'and', - ['paymentmethod', 'is', shopifyPaymentMethodId] - ], - columns: [ - search.createColumn({ - name: 'internalid', - sort: search.Sort.DESC - }) - ] - }); + if (parentRefId) { + var customerDepositSearch = search.create({ + type: search.Type.CUSTOMER_DEPOSIT, + filters: [ + ['externalId', 'is', parentRefId] + ], + columns: ['internalid'] + }) + // Run the search + var searchResults = customerDepositSearch.run().getRange({ start: 0, end: 1 }); - // Run the search - var searchResults = customerDepositSearch.run().getRange({ start: 0, end: 1 }); + // If customer deposit found, retrieve its internal ID + if (searchResults && searchResults.length > 0) { + depositInternalId = searchResults[0].getValue({ name: 'internalid' }); + } + + log.debug("customer deposit id " + depositInternalId); + } else { + // Create search to find customer deposit associated with the sales order + var customerDepositSearch = search.create({ + type: search.Type.CUSTOMER_DEPOSIT, + filters: [ + ['createdfrom', 'is', orderId], + 'and', + ['paymentmethod', 'is', shopifyPaymentMethodId] + ], + columns: [ + search.createColumn({ + name: 'internalid', + sort: search.Sort.DESC + }) + ] + }); + // Run the search + var searchResults = customerDepositSearch.run().getRange({ start: 0, end: 1 }); - // If customer deposit found, retrieve its internal ID - if (searchResults && searchResults.length > 0) { - depositInternalId = searchResults[0].getValue({ name: 'internalid' }); - } + // If customer deposit found, retrieve its internal ID + if (searchResults && searchResults.length > 0) { + depositInternalId = searchResults[0].getValue({ name: 'internalid' }); + } + } + if (depositInternalId) { var customerRefundRecord = record.transform({ fromType: record.Type.CUSTOMER_DEPOSIT, @@ -132,6 +152,9 @@ define(['N/search', 'N/record', 'N/error', 'N/sftp', 'N/file'], function (search value: refundAmount, line: 0 }); + if (externalId) { + customerRefundRecord.setValue({fieldId: 'externalid', value: externalId}); + } var customerRefundId = customerRefundRecord.save(); log.debug("customer refund is created with id " + customerRefundId); @@ -142,12 +165,12 @@ define(['N/search', 'N/record', 'N/error', 'N/sftp', 'N/file'], function (search title: 'Error in creating customer refund records for sales order ' + orderId, details: e, }); - var errorInfo = orderId + ',' + e.message + '\n'; + var errorInfo = orderId + ',' + e.message + ',' + fileName + '\n'; errorList.push(errorInfo); } } if (errorList.length !== 0) { - var fileLines = 'orderId,errorMessage\n'; + var fileLines = 'orderId,errorMessage,fileName\n'; fileLines = fileLines + errorList; var date = new Date(); diff --git a/src/Objects/SalesOrder/customscript_create_cd_and_cr.xml b/src/Objects/SalesOrder/customscript_create_cd_and_cr.xml new file mode 100644 index 0000000..80da599 --- /dev/null +++ b/src/Objects/SalesOrder/customscript_create_cd_and_cr.xml @@ -0,0 +1,25 @@ + + + F + HC_SC_CreateCustomerDepositAndRefund + F + + T + [/SuiteScripts/SalesOrder/HC_SC_CreateCustomerDepositAndRefund.js] + + + T + DEBUG + TESTING + HC_SC_CreateCustomerDepositAndRefund + + + 1 + PT15M + 2024-11-12 + 08:00:00Z + + + + + \ No newline at end of file diff --git a/src/deploy.xml b/src/deploy.xml index 4e7f2da..b841a72 100644 --- a/src/deploy.xml +++ b/src/deploy.xml @@ -61,6 +61,8 @@ ~/FileCabinet/SuiteScripts/SalesOrder/HC_MR_ExportedGiftCardFulfillmentCSV.js ~/FileCabinet/SuiteScripts/POSReturn/HC_SC_CreatePOSReturn.js ~/FileCabinet/SuiteScripts/InventoryAdjustment/HC_MR_ExportedInventoryAdjustmentCSV.js + + ~/FileCabinet/SuiteScripts/SalesOrder/HC_SC_CreateCustomerDepositAndRefund.js @@ -165,6 +167,8 @@ ~/Objects/POSReturn/customscript_create_pos_return.xml ~/Objects/InventoryAdjustment/customscript_exp_inventory_adj.xml + ~/Objects/SalesOrder/customscript_create_cd_and_cr.xml + ~/Objects/CashSale/customsearch_hc_export_cashsales.xml ~/Objects/Customer/customsearch_hc_export_customer.xml