{"id":22688,"date":"2021-06-30T05:35:00","date_gmt":"2021-06-30T05:35:00","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagex3\/?p=22688"},"modified":"2021-06-30T05:42:23","modified_gmt":"2021-06-30T05:42:23","slug":"validation-on-purchase-invoice-screen","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2021\/06\/30\/validation-on-purchase-invoice-screen\/","title":{"rendered":"Validation on Purchase Invoice screen"},"content":{"rendered":"\n<p>As we know in Purchase Invoice screen, Supplier Document No and Supplier Invoice Date fields are mandatory. In&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\" data-type=\"URL\" data-id=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\" target=\"_blank\" rel=\"noreferrer noopener\">Sage X3<\/a>, while creating Purchase Invoice transaction, user can enter same No and Date for different invoice numbers. But one of our client requested to add a validation for the Purchase Invoice where, if the Supplier, Supplier Invoice date and Gross amount (Invoice-tax) are same but supplier doc number is different then an alert notification should be displayed on the screen.<\/p>\n\n\n\n<p>For Example: &#8211; A purchase Invoice is created against the vendor: V03941 with supplier invoice no(Doc number): CHNCNT208-2021 and invoice Date: 09\/08\/20, and having gross amount: 168000<\/p>\n\n\n\n<p>Consider below screenshot for reference:<\/p>\n\n\n\n<p><strong>New Stuff:<\/strong> <a rel=\"noreferrer noopener\" href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2021\/06\/29\/how-to-enable-accounting-cancellation-option-on-purchase-invoice-screen\/\" target=\"_blank\">How to enable \u201cAccounting Cancellation\u201d option on Purchase Invoice Screen<\/a><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/PI-1-Supplier-Doc-No-and-Date.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/PI-1-Supplier-Doc-No-and-Date.jpg\" alt=\"[PI 1 - Supplier Doc No and Date]\"><\/a><\/center>\n<font size=\"2\"><center>[PI 1 &#8211; Supplier Doc No and Date]<\/center><\/font>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/PI-1-Invoice-tax.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/PI-1-Invoice-tax.jpg\" alt=\"[PI 1 - (Invoice-tax)]\"><\/a><\/center>\n<font size=\"2\"><center>[PI 1 &#8211; (Invoice-tax)]<\/center><\/font>\n\n\n\n<p><\/p>\n\n\n\n<p>If the user is trying to create new purchase invoice with the same supplier invoice date: 09\/08\/20, gross amount: 168000 but different invoice number: CHICNT390-2021 then the system should show a pop-up\/warning regarding the same.<\/p>\n\n\n\n<p>Consider below screenshot for reference:<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/PI-2-Supplier-Doc-No-and-Date.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/PI-2-Supplier-Doc-No-and-Date.jpg\" alt=\"[PI 2 - Supplier Doc No and Date]\"><\/a><\/center>\n<font size=\"2\"><center>[PI 2 &#8211; Supplier Doc No and Date]<\/center><\/font>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/PI-2-Invoice-tax.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/PI-2-Invoice-tax.jpg\" alt=\"[PI 2 - (Invoice-tax)]\"><\/a><\/center>\n<font size=\"2\"><center>[PI 2 &#8211; (Invoice-tax)]<\/center><\/font>\n\n\n\n<p>For this purpose, we did a customization on Purchase Invoice screen. Refer below code:<\/p>\n\n\n\n<p>######################################################################<\/p>\n\n\n\n<p>If !clalev([ZPIH]) : Local File PINVOICE[ZPIH] : Endif<br>FOR [F:ZPIH] WHERE [F:ZPIH]NUM&lt;>[M:PIH0]NUM and [F:ZPIH]BPRVCR&lt;>&#8221;&#8221; and [F:ZPIH]BPRVCR=[M:PIH1]BPRVCR and [F:ZPIH]BPRDAT=[M:PIH1]BPRDAT AND [F:ZPIH]AMTNOT=[M:PIH4]TOTLINAMT                                                                                                                                               <\/p>\n\n\n\n<p>if [M:PIH1]BPRVCR = [F:ZPIH]BPRVCR AND [M:PIH0]BPR = [F:ZPIH]BPR and [F:ZPIH]BPRDAT=[M:PIH1]BPRDAT AND [F:ZPIH]AMTNOT=[M:PIH4]TOTLINAMT            <\/p>\n\n\n\n<p>             INFBOX &#8220;Supplier Document Number, Supplier Inv Date and Amount already exist for Invoice No : &#8221; +               [F:ZPIH]NUM<br>                        OK = 0<br>                        GOK = 0<br>                        GPE = 1<br>                        mkstat=2<br>                        break <\/p>\n\n\n\n<p>              endif<\/p>\n\n\n\n<p>NEXT<\/p>\n\n\n\n<p>######################################################################<\/p>\n\n\n\n<p>Add the above code in VERIF_MOD and VERIF_CRE events on SPEPIH script.<\/p>\n\n\n\n<p>After adding the above code if user try to create new purchase invoice with the same supplier invoice date, gross amount but different supplier doc number then the system will show a pop-up\/warning regarding the same and It will restrict user to create purchase invoice.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/Warning-message.jpg\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; align: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/Warning-message.jpg\" alt=\"Warning message]\"><\/a><\/center>\n<font size=\"2\"><center>Warning message]<\/center><\/font>\n\n\n\n<p>Hence with the help of this customization, we can restrict a Purchase Invoice creation on the basis of Supplier Document No, Supplier Invoice Date and Gross Amount.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-text-color has-link-color wp-elements-c5e1638fe0db781fd132d689b469078c\" style=\"color:#c71d22\"><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>As we know in Purchase Invoice screen, Supplier Document No and Supplier Invoice Date fields are mandatory. In&nbsp;Sage X3, while creating Purchase Invoice transaction, user can enter same No and Date for different invoice numbers. But one of our client requested to add a validation for the Purchase Invoice where, if the Supplier, Supplier Invoice\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2021\/06\/30\/validation-on-purchase-invoice-screen\/\">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":[13,8],"tags":[1564,3327,3328,2357,2394],"class_list":["post-22688","post","type-post","status-publish","format-standard","hentry","category-integration","category-sage-erp-x3","tag-purchase-invoice","tag-supplier-doc-no","tag-supplier-inv-date","tag-validation","tag-warning"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/22688","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=22688"}],"version-history":[{"count":16,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/22688\/revisions"}],"predecessor-version":[{"id":22712,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/22688\/revisions\/22712"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=22688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=22688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=22688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}