{"id":20714,"date":"2020-09-16T10:09:56","date_gmt":"2020-09-16T10:09:56","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagex3\/?p=20714"},"modified":"2020-09-16T10:09:58","modified_gmt":"2020-09-16T10:09:58","slug":"payment-prepayment-deletion-through-the-custom-button-from-sales-order","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2020\/09\/16\/payment-prepayment-deletion-through-the-custom-button-from-sales-order\/","title":{"rendered":"Payment &#038; Prepayment deletion through the custom button from Sales Order"},"content":{"rendered":"<p style=\"text-align: justify;\">In Sage X3, we are working on payment integration from x3 to the third party payment gateway. Here, we are doing sale\/auth\/refund\/void transactions on the client\u2019s payment gateway through Sales Order\/Invoice transactions from X3. Here, we will provide prepayment &amp; payment deletion functionality through the void button.<\/p>\n<p>New Stuff:- <a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2020\/09\/15\/how-to-change-the-lots-expiration-date-for-multiple-sites-in-sage-x3\/\" target=\"_blank\" rel=\"noopener noreferrer\">How to change the LOT\u2019s expiration date (for multiple sites) in Sage X3<\/a><\/p>\n<p><strong>Prepayment &amp; Payment deletion in x3<\/strong><\/p>\n<p style=\"text-align: justify;\">As per the requirement analysis and the functionality provided, we are creating automated prepayment and payment in x3 on the click of sale button from Sales Order which will create Sale transaction in the payment gateway respectively. After the successful payment &amp; prepayment creation, if the user wants to cancel or refund the transaction created on payment gateway, the adverse effect in x3 will be deleting the payment &amp; prepayment created against the sales order.<\/p>\n<p><strong>Note:<\/strong><em>This will be only applicable if the respective payment and prepayment against the sales order is not posted in x3.<\/em><\/p>\n<p style=\"text-align: justify;\">If the payment is posted for the sales order in x3, then the user need to manually run account cancellation process from the payment entry in x3 to cancel\/refund the payment transaction in x3. There are many validations which we need to check while deleting the payment which are as follows:<\/p>\n<ul>\n<li>Payment and prepayment should exist for the particular sales order.<\/li>\n<li>Sales Order status should not be closed.<\/li>\n<li>Payment against the sales order should not been posted.<\/li>\n<li>Closing table whichever opened while deleting the payment and prepayment entry to avoid systematic error I.e. <strong style=\"font-size: inherit;\"><em>\u201cToo many tables opened in x3\u201d<\/em><\/strong><\/li>\n<\/ul>\n<p style=\"text-align: justify;\">In our analysis, we have found out there are few hurdles coming in the way while deleting the payment which we need to handle through code i.e to set default mask as sales order mask again to avoid different system errors.<\/p>\n<p>\u00a0<\/p>\n<p><strong>Working:<\/strong><\/p>\n<p><strong>Call AV_ANNULE2([L]CODE,FLGLOT) From SUBPAY3:<\/strong><\/p>\n<p>The above statement is written to call specific standard delete function from x3.<\/p>\n<p><strong>Delete [ZPYH] where NUM=ZPAYNUM<\/strong><\/p>\n<p>The above statement is written to delete payment entry from the payment table from x3.<\/p>\n<p><strong>Delete [ZDUD]\u00a0 where NUM=ZVCRNUM<\/strong><\/p>\n<p>The above statement is written to delete prepayment entry from the prepayment table from x3.<\/p>\n<p><strong>Gosub AP_ANNULE\u00a0 From SUBPAY3<\/strong><\/p>\n<p>The above statement is written to call the functions used after the deletion of the payment and prepayment entry from x3.<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>Gosub APRES_ANNULE From SUBPAY3<\/strong><\/p>\n<p>The above statement is written to call the functions used after the deletion of the payment and prepayment entry from x3.<\/p>\n<p>\u00a0<\/p>\n<p><strong>Note: <\/strong>We need to handle any system error occurred during the customization of deletion of payment and prepayment entry against the sales order\/invoice screen. Supposedly if we are opening masks or tables opened for our process then we need to close the tables and masks to avoid any type of crashing\/error in Sales order\/delivery\/invoice transactions.<\/p>\n<p style=\"text-align: justify;\">We can also provide the same functionality from sales delivery and invoice as well, whenever the user delete\/close the sales order and the payment with prepayment is created <strong>(payment not posted)<\/strong><\/p>\n<p><strong>Advantages:<\/strong><\/p>\n<p style=\"text-align: justify;\">Here, we are having the advantages :-<\/p>\n<ul>\n<li style=\"text-align: justify;\">We don\u2019t have to manually delete the payment &amp; prepayment entries or run any account cancellation document from payment entry<\/li>\n<li style=\"text-align: justify;\">All the functionalities runs from a single click from custom button to delete\/cancel\/refund transaction from Sales order\/delivery\/invoice.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">This blog is used for understanding the process of deletion of payment and prepayment from Sales Order through code before payment posting and without effecting standard functionalities or crashing the screen. This blog\u2019s functionality will provide users to delete payment and prepayment through sales order\/delivery\/invoice screen from a single click whenever the user want to cancel\/delete\/refund any sale transactions.<\/p>\n\n\n<h2 class=\"wp-block-heading\"><strong>About Us<\/strong><\/h2>\n\n\n\n<p>Greytrix \u2013 a globally recognized and one of the oldest Sage Development Partners is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development, and implementation competence.<\/p>\n\n\n\n<p id=\"block-28013e99-0882-44c6-b705-7b16c85053b2\">Greytrix&nbsp;has some unique integration solutions developed for&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-crm\/\">Sage CRM<\/a>&nbsp;with Sage ERPs&nbsp;namely&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/\">Sage X3<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-intacct\/\">Sage Intacct<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-100-erp\/\">Sage 100<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-500-erp\/\">Sage 500<\/a>,&nbsp;and&nbsp;<a href=\"https:\/\/www.greytrix.com\/sage-300-erp\/\">Sage 300<\/a>. We also offer best-in-class&nbsp;Sage ERP&nbsp;and&nbsp;Sage CRM&nbsp;customization and development services&nbsp;to&nbsp;Business&nbsp;Partners,&nbsp;End&nbsp;Users, and Sage PSG worldwide. Greytrix&nbsp;helps in&nbsp;the migration of Sage CRM from&nbsp;Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes&nbsp;addons like&nbsp;&nbsp;Greytrix Business Manager,&nbsp;Sage CRM Project Manager,&nbsp;Sage CRM Resource Planner,&nbsp;Sage CRM Contract Manager,&nbsp;Sage CRM Event Manager,&nbsp;Sage CRM Budget Planner,&nbsp;Gmail Integration,&nbsp;Sage CRM Mobile Service Signature,&nbsp;Sage CRM CTI Framework.<\/p>\n\n\n\n<p id=\"block-4bc42a09-fb13-4598-8137-ce5f7b91ce28\">Greytrix is a recognized&nbsp;Sage Champion Partner&nbsp;for GUMU&#x2122; Sage X3 \u2013 Sage CRM integration listed on&nbsp;<a href=\"https:\/\/www.sage.com\/marketplace\/asb_ListingDetail?listingId=a1h24000007PC3aAAG\" target=\"_blank\" rel=\"noreferrer noopener\">Sage Marketplace<\/a>&nbsp;and Sage CRM \u2013 Sage Intacct integration listed on&nbsp;<a href=\"https:\/\/marketplace.intacct.com\/MPListing?lid=a2D0H000007kiHyUAI\" target=\"_blank\" rel=\"noreferrer noopener\">Sage Intacct Marketplace<\/a>. The&nbsp;<a href=\"https:\/\/www.greytrix.com\/gumu\/\" target=\"_blank\" rel=\"noreferrer noopener\">GUMU&#x2122; Cloud framework<\/a>&nbsp;by Greytrix forms the backbone of cloud integrations that are managed in real-time for the processing and execution of application programs at the click of a button.<\/p>\n\n\n\n<p id=\"block-76376301-1c3e-4250-8a09-727595a606f0\">For more information on our integration solutions, please contact us at&nbsp;<a href=\"mailto:sage@greytrix.com\">sage@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Sage X3, we are working on payment integration from x3 to the third party payment gateway. Here, we are doing sale\/auth\/refund\/void transactions on the client\u2019s payment gateway through Sales Order\/Invoice transactions from X3. Here, we will provide prepayment &amp; payment deletion functionality through the void button. New Stuff:- How to change the LOT\u2019s expiration\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2020\/09\/16\/payment-prepayment-deletion-through-the-custom-button-from-sales-order\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2796],"tags":[3092,3088,3089,3091,1822],"class_list":["post-20714","post","type-post","status-publish","format-standard","hentry","category-technical","tag-custom-delete","tag-delete-payment","tag-delete-payment-entry-in-x3","tag-payment-prepayment-delete","tag-sage-x3"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/20714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=20714"}],"version-history":[{"count":3,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/20714\/revisions"}],"predecessor-version":[{"id":20717,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/20714\/revisions\/20717"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=20714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=20714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=20714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}