{"id":22718,"date":"2021-06-30T08:07:21","date_gmt":"2021-06-30T08:07:21","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagex3\/?p=22718"},"modified":"2021-06-30T08:08:34","modified_gmt":"2021-06-30T08:08:34","slug":"how-to-get-total-transaction-amount-of-supplier-for-current-fiscal-year","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2021\/06\/30\/how-to-get-total-transaction-amount-of-supplier-for-current-fiscal-year\/","title":{"rendered":"How to get total transaction amount of supplier for current fiscal year"},"content":{"rendered":"\n<p>In <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>, only posted transactions will be considered for accounting effects. Here in this blog we had a requirment from a client that , there should be a field on the header of purchase invoice screen, in which total transaction amount of the Supplier should be displayed for current fiscal year according to the PAN No of the Supplier.<\/p>\n\n\n\n<p>For e.g., if a supplier 1 has XYZ PAN No. and supplier 2 also has XYZ PAN No., then same total transaction amount will be displayed in the Purchase invoice screen for supplier 1 as well as supplier 2.<\/p>\n\n\n\n<p>To fullfil user&#8217;s requirment follow below steps:<\/p>\n\n\n\n<p>Step 1: Add &#8220;Total invoice Amt for current fiscal yr &#8220;(ZINVAMT) field into (PINVOICE)table and (header) screen<\/p>\n\n\n\n<p><strong>New Stuff: <\/strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2021\/06\/30\/validation-on-purchase-invoice-screen\/\" data-type=\"URL\" data-id=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2021\/06\/30\/validation-on-purchase-invoice-screen\/\" target=\"_blank\">Validation on Purchase Invoice screen<\/a><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/table-1024x464.png\" 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\/table-1024x464.png\" alt=\"[Table]\"><\/a><\/center>\n<font size=\"2\"><center>[Table]<\/center><\/font>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/screen-1024x416.png\" 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\/screen-1024x416.png\" alt=\"[Screen]\"><\/a><\/center>\n<font size=\"2\"><center>[Screen]<\/center><\/font>\n\n\n\n<p>Step 2: Add below code into SPEPIH script<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">####################################################################################<\/h6>\n\n\n\n<p>Local DECIMAL A<br>Local DECIMAL B<br>Local DECIMAL C<\/p>\n\n\n\n<p>Local Char REQUEST1(255)(8)<br>REQUEST1(0) = &#8221; SELECT SUM(AMTATI_0) FROM &#8220;+nomap+&#8221;.PINVOICE P &#8220;<br>REQUEST1(1) = &#8221; LEFT OUTER JOIN &#8220;+nomap+&#8221;.BPSUPPLIER BPS ON BPS.BPSNUM_0=P.BPR_0 &#8220;<br>REQUEST1(2) = &#8221; LEFT OUTER JOIN &#8220;+nomap+&#8221;.BPSUPPLIER BPS1 ON BPS1.BPSNUM_0='&#8221;+NUM$([M:PIH0]BPR)+&#8221;&#8216;&#8221;<br>REQUEST1(3) = &#8221; WHERE BPS.XX1P4PANNO_0=BPS1.XX1P4PANNO_0 AND P.STA_0= &#8216;3&#8217; AND P.ACCDAT_0 BETWEEN DateFromParts((CASE WHEN MONTH(&#8216;&#8221;+[M:PIH0]ACCDAT+&#8221;&#8216;) IN(1,2,3) THEN (YEAR(&#8216;&#8221;+[M:PIH0]ACCDAT+&#8221;&#8216;)-1) ELSE YEAR(&#8216;&#8221;+[M:PIH0]ACCDAT+&#8221;&#8216;) END),04,01) and &#8216;&#8221;+[M:PIH0]ACCDAT+&#8221;&#8216; &#8220;<br>REQUEST1(4) = &#8221; GROUP BY BPS1.XX1P4PANNO_0&#8243;<br>FOR (DECIMAL DTEXTE_0) FROM &#8220;5&#8221; Sql REQUEST1 As [YCHD]<br>A =[YCHD]DTEXTE_0<br>NEXT<\/p>\n\n\n\n<p>C=A-B<br>[M:PIH0]ZINVAMT=C<br>AFFZO[M:PIH0]ZINVAMT<\/p>\n\n\n\n<p>######################################################################<\/p>\n\n\n\n<p>Step 3: Compile SPEPIH script<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2021\/06\/output-1024x340.png\" 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\/output-1024x340.png\" alt=\"[Output]\"><\/a><\/center>\n<font size=\"2\"><center>[Output]<\/center><\/font>\n\n\n\n<p>Now after validation of script, when user will create new purchase invoice, the total transaction amount of the posted invoices created against the supplier for the current fiscal year according to PAN No gets calculated and displayed in the ZINVAMT field as shown in above screenshot.<\/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>In Sage X3, only posted transactions will be considered for accounting effects. Here in this blog we had a requirment from a client that , there should be a field on the header of purchase invoice screen, in which total transaction amount of the Supplier should be displayed for current fiscal year according to the\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2021\/06\/30\/how-to-get-total-transaction-amount-of-supplier-for-current-fiscal-year\/\">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":[3330,3188,1564,2211,3329],"class_list":["post-22718","post","type-post","status-publish","format-standard","hentry","category-integration","category-sage-erp-x3","tag-current-fiscal-year","tag-field-addition","tag-purchase-invoice","tag-supplier","tag-total-transaction-amount"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/22718","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=22718"}],"version-history":[{"count":5,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/22718\/revisions"}],"predecessor-version":[{"id":22728,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/22718\/revisions\/22728"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=22718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=22718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=22718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}