Great Plains Customization – Programming Auto-apply in Accounts Receivable - myoddPc

Computer Information - myOddPc

Great Plains Customization – Programming Auto-apply in Accounts Receivable

Microsoft Great Plains is one of three Microsoft Business Solutions mid-market ERP products: Great Plains, Solomon, Navision. Considering that Great Plains is now very good candidate for integration with POS application, such as Microsoft Retail Management System or RMS and Client Relation Systems, such as Microsoft CRM – there is common need in Great Plains customizations and integrations, especially on the level of MS SQL Server transact SQL queries and stored procedures.In this small article we’ll show you how to create auto-apply utility, when you integrate huge number of sales transactions and payments. We will be working with RM20101 – Receivables Open File and RM20201 – Receivables Apply Open File.Let’s see SQL code:declare @curpmtamt numeric(19,5)declare @curinvamt numeric(19,5)declare @curpmtnum varchar(20)declare @curinvnum varchar(20)declare @curinvtype intdeclare @curpmttype intdeclare @maxid intdeclare @counter int-- Create a temporary tablecreate table #temp([ID] int identity(1,1) primary key,CUSTNMBR varchar(15),INVNUM varchar(20),INVTYPE int,PMTNUM varchar(20),PMTTYPE int,INVAMT numeric(19,5),PMTAMT numeric(19,5),AMTAPPLIED numeric(19,5))create index IDX_INVNUM on #temp (INVNUM)create index IDX_PMTNUM on #temp (PMTNUM)-- Insert unapplied invoices and paymentsinsert into #temp(CUSTNMBR,INVNUM,INVTYPE,PMTNUM,PMTTYPE,INVAMT,PMTAMT,AMTAPPLIED)selectCUSTNMBR = a.CUSTNMBR,INVNUM = b.DOCNUMBR,INVTYPE = b.RMDTYPAL,PMTNUM = a.DOCNUMBR,PMTTYPE = a.RMDTYPAL,INVAMT = b.CURTRXAM,PMTAMT = a.CURTRXAM,AMTAPPLIED = 0from RM20101 ajoin RM20101 b on (a.CUSTNMBR = b.CUSTNMBR)join RM00101 c on (a.CUSTNMBR = c.CUSTNMBR)wherea.RMDTYPAL in (7, 8, 9) andb.RMDTYPAL in (1, 3) anda.CURTRXAM 0 andb.CURTRXAM 0order bya.custnmbr,b.DOCDATE,a.DOCDATE,a.DOCNUMBR,b.DOCNUMBR-- Iterate through each recordselect @maxid = max([ID])from #tempselect @counter = 1while @counter = @curpmtamt) and (@curpmtamt>0) and (@curinvamt>0)-- if the invoice amount is greater or the same as the payment amountbeginselect @curinvamt = @curinvamt - @curpmtamt -- invoice amount remaining-- update with the amount that is applied to the current invoice from-- the current paymentupdate #tempsetAMTAPPLIED = @curpmtamtwhere[ID] = @counter-- update with amount of invoice remainingupdate #tempsetINVAMT = @curinvamtwhereINVNUM = @curinvnum andINVTYPE = @curinvtype-- update with amount of payment remainingupdate #tempsetPMTAMT = 0wherePMTNUM = @curpmtnum andPMTTYPE = @curpmttypeendelse if (@curinvamt 0) and (@curinvamt>0)-- if the invoice amount is lesser to the payment amountbeginselect @curpmtamt = @curpmtamt - @curinvamt -- payment amount remaining-- update with the amount that is applied to the current invoice from-- the current paymentupdate #tempsetAMTAPPLIED = @curinvamtwhere[ID] = @counter-- update with amount of invoice remainingupdate #tempsetINVAMT = 0whereINVNUM = @curinvnum andINVTYPE = @curinvtype-- update with amount of payment remainingupdate #tempsetPMTAMT = @curpmtamtwherePMTNUM = @curpmtnum andPMTTYPE = @curpmttypeend-- go to the next recordselect @counter = @counter + 1end-- update the RM Open table with the correct amountsupdateRM20101setCURTRXAM = b.INVAMTfromRM20101 ajoin #temp b on (a.DOCNUMBR = b.INVNUM and a.RMDTYPAL = b.INVTYPE)updateRM20101setCURTRXAM = b.PMTAMTfromRM20101 ajoin #temp b on (a.DOCNUMBR = b.PMTNUM and a.RMDTYPAL = b.PMTTYPE)-- create the RM Apply record or update if records already existupdateRM20201setDATE1 = convert(varchar(10), getdate(), 101),GLPOSTDT = convert(varchar(10), getdate(), 101),APPTOAMT = APPTOAMT + a.AMTAPPLIED,ORAPTOAM = ORAPTOAM + a.AMTAPPLIED,APFRMAPLYAMT = APFRMAPLYAMT + a.AMTAPPLIED,ActualApplyToAmount = APFRMAPLYAMT + a.AMTAPPLIEDfrom#temp ajoin RM20101 b on (b.DOCNUMBR = a.INVNUM and b.RMDTYPAL = a.INVTYPE)join RM20101 c on (c.DOCNUMBR = a.PMTNUM and c.RMDTYPAL = a.PMTTYPE)join RM20201 d on (d.APFRDCTY = a.PMTTYPE andd.APFRDCNM = a.PMTNUM andd.APTODCTY = a.INVTYPE andd.APTODCNM = a.INVNUM)wherea.AMTAPPLIED 0insert into RM20201(CUSTNMBR,DATE1,GLPOSTDT,POSTED,APTODCNM,APTODCTY,APTODCDT,ApplyToGLPostDate,CURNCYID,CURRNIDX,APPTOAMT,ORAPTOAM,APFRDCNM,APFRDCTY,APFRDCDT,ApplyFromGLPostDate,FROMCURR,APFRMAPLYAMT,ActualApplyToAmount)selectCUSTNMBR = a.CUSTNMBR,DATE1 = convert(varchar(10), getdate(), 101),GLPOSTDT = convert(varchar(10), getdate(), 101),POSTED = 1,APTODCNM = a.INVNUM,APTODCTY = a.INVTYPE,APTODCDT = b.DOCDATE,ApplyToGLPostDate = b.GLPOSTDT,CURNCYID = b.CURNCYID,CURRNIDX = '',APPTOAMT = a.AMTAPPLIED,ORAPTOAM = a.AMTAPPLIED,APFRDCNM = a.PMTNUM,APFRDCTY = a.PMTTYPE,APFRDCDT = c.DOCDATE,ApplyFromGLPostDate = c.GLPOSTDT,FROMCURR = c.CURNCYID,APFRMAPLYAMT = a.AMTAPPLIED,ActualApplyToAmount = a.AMTAPPLIEDfrom#temp ajoin RM20101 b on (b.DOCNUMBR = a.INVNUM and b.RMDTYPAL = a.INVTYPE)join RM20101 c on (c.DOCNUMBR = a.PMTNUM and c.RMDTYPAL = a.PMTTYPE)wherea.AMTAPPLIED 0 andnot exists (select 1from RM20201 dwhere d.APFRDCTY = a.PMTTYPE andd.APFRDCNM = a.PMTNUM andd.APTODCTY = a.INVTYPE andd.APTODCNM = a.INVNUM)drop table #tempAbout The AuthorAndrew Karasev is Chief Technology Officer in Alba Spectrum Technologies – USA nationwide Great Plains, Microsoft CRM customization company, with offices in Chicago, San Francisco, Los Angeles, San Diego, Phoenix, Houston, Miami, Atlanta, New York, Madrid, Brazil, Moscow ( http://www.albaspectrum.com), you can reach Andrew 1-866-528-0577, he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer; akarasev@albaspectrum.com

Andrew Karasev

Sony PSP - Not Just For Games

Zen and the Art of Buying Computer Parts
The Ugly Face Of Technology
Wind Turbine Lights to Protect Birds
Robotic Manufacturing Lighting
Is that software really free?
Tips on Finding the Best CD Duplication Services
Making the Most of Digital Camera Memory Cards
Microsoft Dynamics GP & CRM in Transportation & Logistics
Computer Dos and Donts
Sony PSP - Not Just For Games

SyncUp – A File/Folder Synchronizer For Windows

Basic Tips and tricks for Windows XP
Buying the Perfect Computer – The FIRST Time
Dirty Little Computer Viruses and How To Protect Yourself
10 Secrets to a Healthy Computer and a Happier You
8 Simple Ways to Defend Against Evil Doers Both Online and Off
Microsoft CRM Programming Secrets – Tips For Developers
Microsoft Great Plains Integration with Legacy Systems – Overview For Developer
Microsoft RMS – Great Plains Integration – Overview For IT Specialist
Removing Incoming Email in MS Exchange, C# Example
SyncUp – A File/Folder Synchronizer For Windows

Articles by the same author

Microsoft CRM Programming Secrets – Tips For Developers
Microsoft Great Plains Integration with Legacy Systems – Overview For Developer
Microsoft RMS – Great Plains Integration – Overview For IT Specialist
Microsoft Great Plains Upgrade – Version 8.0 Overview for IT Director/Controller
Microsoft Great Plains Implementation – Overview for IT Director/Controller
Microsoft Great Plains Integration with Microsoft Access – Overview for Developer
Microsoft Great Plains Reporting – Overview for Developer
Crystal Reports for Microsoft Great Plains – Overview for Developer
How to Upgrade Dexterity Customization – Tips for IT Manager
IT Department Skills to Support Microsoft Great Plains and Microsoft CRM
SQL: Querying Microsoft Great Plains – Overview for Database Administrator/Developer
Microsoft CRM Custom Design & Development: SDK, C#, SQL, Exchange, Integration, Crystal Reports
Upgrading Great Plains Dexterity Customization – switching to new technologies: SQL, Crystal, eConne
Microsoft Great Plains Dynamics on Pervasive SQL.
2000 Data Repair – Overview For DBAs

Microsoft Great Plains - Typical Problems And Fixes – Overview For IT Administrators
Microsoft CRM Implementation & Remote Support
Crystal Reports For Microsoft RMS – Overview For Developer/Report Designer
Great Plains Customization Upgrade– Overview For CIO/IT Director
Microsoft Great Plains Project Accounting – Overview For IT Director/Controller
Microsoft Great Plains Multicurrency – Overview For Implementation Consultant
Microsoft CRM – Consulting in the Post-Recession Time
Microsoft Business Solutions Products Selection: ERP, CRM, Retail Management
Microsoft Great Plains Integration Manager – Working With Text File
Great Plains Sales Order Processing and Invoicing Modules – Tips For Consultants
Microsoft Great Plains: Manufacturing or Bill of Materials - Overview for IT Specialist
International Support - Microsoft Great Plains VAR/Partner Selection – Overview for V.

P. IT

Microsoft Great Plains Partner Selection:

Overview

Crystal Reports - Microsoft SQL Server
Microsoft CRM Customization
Great Plains Customization – Programming Auto-apply in Accounts Receivable
Microsoft CRM or Siebel
Microsoft Navision Integration with Microsoft RMS - Overview for IT Specialist
Microsoft CRM Customization: Integration with Third Party SQL Application/Database
Microsoft Great Plains Integrations – Retail Management Sample
Microsoft Great Plains Remote Support - Overview
Microsoft Great Plains: Interest Calculation Example – Stored Procedure for Crystal Report
Microsoft CRM Customization Secrets – Second Edition
Microsoft Business Solutions Customization Options - Overview for Programmer
Microsoft Great Plains Installation – Overview for IT Director/Controller
Microsoft Great Plains Integration Manager – Advanced Techniques
Microsoft Great Plains - Microsoft RMS Integration – overview
Microsoft Great Plains Integrations - Tips for Developer
Microsoft Great Plains Customization and Development – Overview for Programmer
Microsoft CRM Customization - Processing In/Out-Going Email Messages
Microsoft Great Plains Dexterity Customizations
Microsoft CRM – Typical Customizations
EDI: Electronic Document Interchange for Microsoft Great Plains – Overview for Software Developer/Pr
Microsoft C# vs. VB.

Net

Microsoft Great Plains GL: General Ledger – Overview For Consultant
Microsoft Great Plains Inventory Control – Overview For Consultant
Navision Sales Module & Reporting: Jet Reports, C/ODBC, XBRL, Business Analytics – highlights
Microsoft CRM in Latin America: Implementation, Customization, Support – Overview for Consultant
Microsoft CRM: Implementation, Customization, Support – Consultant Overview
Microsoft CRM Implementation – Fundamental CRM Principles Revision
Microsoft Great Plains 8.0 Brazilian Version – Overview For International Consultant
Microsoft CRM Integration With Microsoft Office Documents – Overview For System Integrator
Implementing Microsoft CRM: setup and configuration – notes for IT specialist
Microsoft Great Plains version 8.
5: Upgrade, Customization, VBA, Crystal Reports - Highlights

Microsoft Great Plains - Payroll & HR Inexpensive Solution? Not Any More
Great Plains Custom Development: Dexterity, VBA, SQL, Crystal, eConnect – Overview For Programmer
Great Plains Dexterity Programming – Overview For Developer
Crystal Reports - Geterogeneus databases: SQL Server, Oracle, Unidata, Btrieve – Tips For Developer
Great Plains Dynamics/eEnterprise Upgrade – Things to Consider and FAQ
Microsoft Great Plains Data Conversion – Overview For Developer
Great Plains Accounting Migration to Microsoft Great Plains - Overview for IT Specialist
Microsoft Business Solutions VAR/Partner Selection – Overview for IT Director/Manager/Controller
Microsoft Great Plains on Ctree or Pervasive SQL – What to Do – Tips for IT Manager
Great Plains Dexterity History and Programming Overview
Microsoft Great Plains Upgrade – Things to Consider and FAQ
Reporting Tools for Microsoft Great Plains – Overview For Developers
Microsoft CRM Modification – Overview for IT Specialist
Microsoft Great Plains Implementation: Collection Management – Overview For Consultant
Microsoft Great Plains Security Setup - Overview For Consultant
Great Plains Dexterity Customization Options – Overview For Developers
Great Plains DOS Support – Notes for Consultant
Integrating Microsoft Great Plains Accounting/ERP: RMS, CRM, eCommerce, Lotus Domino – overview
eCommerce development for Microsoft Great Plains: tools and highlights for programmer
Microsoft Great Plains eCommerce: overview for developer
Microsoft Great Plains e-Commerce – additional considerations for programmer
Microsoft Great Plains eCommerce – Stored Procedures Approach
Microsoft Small Business Manager Customization Options - Overview
Microsoft Small Business Manager eCommerce – Overview
Microsoft CRM Development
Microsoft Great Plains as ERP and Microsoft CRM as CRM
Microsoft CRM Implementation - US Market Lessons
Microsoft Business Solutions Partner – How to Launch New IT Consulting Practice
Great Plains Dynamics on Pervasive/Ctree support – overview for consultant
Microsoft Great Plains customization – Freight Forwarding/Transportation industry example
Microsoft Great Plains Distribution, Barcoding, Consignment – overview for consultant
Microsoft Great Plains Implementation: Verticals - Wholesale Order Entry center – overview
Microsoft Great Plains international implementation – USA / Mexico – overview for consultant
Microsoft Retail Management System (RMS) SQL Customization – Overview for Programmer
Microsoft Great Plains Implementation for Large Corporation – Overview for VP IT
Microsoft CRM Integration with Microsoft Retail Management System (RMS) – Overview
Microsoft Great Plains: Data Conversion & Migration Scenarios – Overview for Consultant
Microsoft Great Plains Implementation & Customization: Computer Parts Retailer Example
Microsoft Great Plains Accounting/ERP Implementation – Finance Industry Customization Example
Microsoft CRM and Great Plains Implementation: Freight Forwarding Business Automation Example
Microsoft Great Plains Customization: Project Organization – International Business Example
Microsoft Great Plains implementation: Restaurants Supply Chain Management Example
Microsoft Great Plains Food Processing – Implementation & Customization Highlights
Microsoft Great Plains Furniture & Fixtures – Implementation & Customization Highlights
Microsoft Great Plains Jewelry – Implementation & Customization Overview
Microsoft Great Plains Beverage Production & Distribution – Implementation & Customization Highlight
Microsoft Great Plains Chemicals & Paint Industry Implementation & Customization Notes
Microsoft Great Plains Oil & Gas – Implementation & Customization Highlights
Microsoft Great Plains in Construction & Building – Implementation & Customization Highlights
Microsoft Great Plains Logistics & Warehouse Management – Implementation & Customization Highlights
Reporting for Microsoft Great Plains/Dynamics/eEnterprise: RW – ReportWriter – Tips for Developer
SQL scripts for Project Accounting: Microsoft Great Plains series – overview for developer
Manufacturing Solutions for Microsoft Great Plains – Overview for Consultant
Microsoft Great Plains in Metal Distribution: Implementation & Customization – Consultant Overview
Great Plains Bill of Materials Setup & Customization for Process Manufacturing – Overview
Manufacturing Outsourcing: Microsoft Great Plains Implementation, Customization & Reporting
Bill of Lading – Custom Reporting for Microsoft Great Plains – Overview for Consultant
Freight Forwarding ERP: Microsoft Business Solutions Great Plains customization & setup – overview
Selecting Microsoft Great Plains Partner/VAR/Reseller: ERP Implementation & Customization – Overview
Microsoft CRM Conversation Gateway: VoIP - Implementation & Customization
Build Your First Computer from Hardware Scratches
Implementing ERP for Large Publicly Traded Corporation – Microsoft Great Plains
Microsoft Great Plains Implementation in Russia – Overview for Consultant
Recovering Microsoft Great Plains Customization – Tips for IT Director
Microsoft Great Plains: If You are Orphan Client – What to Do and FAQ
Great Plains Dexterity – Microsoft Great Plains Customization Overview
Microsoft CRM Messaging through Lotus Domino eMail Server - Balanced Solution
ERP Software Financing: the Future? – Overview for Company Owner
Microsoft Great Plains: Offshore Customization & Development – Overview for Consultant
Microsoft Great Plains: Service Business Customization & Integration Example
Microsoft eCommerce Web-development: Great Plains eConnect .

Net – Highlights for Programmer

Microsoft Great Plains Integration Manager: Using Continuum – Overview for Developer
MultiNational Corporation ERP Implementation – Microsoft Business Solutions Great Plains
Cross-Platform Custom Software Development & Integration – IT Strategy for Large Corporation
Microsoft Great Plains Customization Tools Evolution – Overview for Consultant
eConnect: eCommerce Development for Microsoft Great Plains
Corporate ERP of the Next decade: Microsoft/Unix/Java – Coexistence & Harmony?
ERP Consulting 2010: Future Business Model and Alternatives
Microsoft Great Plains Subcontracting – Overview for Microsoft Business Solutions Partner
Microsoft CRM Implementation & Customization: MS CRM Fax Gateway
IT Strategy for Large Corporation: ERP/MRP/CRM, Unix/Linux/Windows, Microsoft/Java
Microsoft Great Plains: Government & Non-Profit Organization – Workflow Implementation
Microsoft CRM: Data Conversion – Import from Act!
IT Strategy for Midsize Business: Microsoft vs. Java, Great Plains & CRM
ERP Consulting: Microsoft Great Plains Partner Future Directions
Corporate ERP Selection: Microsoft Great Plains
Microsoft Great Plains: carpet, textile, fabric, felt distributor – implementation overview
Microsoft Great Plains: exchange & brokerage – implementation notes
Corporate ERP: Standard vs. Rich functionality – Microsoft Great Plains
Microsoft Great Plains: Annual Enhancement Program – How To Be Re-Enrolled
Corporate ERP: Microsoft Great Plains For The Plant In Brazil – Overview For CIO
Selecting Corporate ERP: Microsoft Business Solutions Great Plains – Estimation Parameters
Microsoft Great Plains Customization Recovery & Upgrade for Large Corporation
Great Plains Dexterity Development: FAQ
ERP Consulting – New Horizons
SQL Administrator Skills Required to Support Microsoft Great Plains
Microsoft Great Plains: Large Scale Implementation
Microsoft CRM Implementation for Large Corporation – overview
ERP Implementation: Success Factors
ERP Remote Support: Microsoft Great Plains Analysis – Pluses & Minuses
ERP for Large Corporation – New Selling Strategy
Lotus Notes Domino and Microsoft CRM Integration
Microsoft CRM Data Conversion FAQ
Microsoft Great Plains: Customization Upgrade & Recovery – Visual Studio VB 6.0
Great Plains Dexterity: Customizations & Source Code Programming
Microsoft Great Plains: Getting New Users Licenses – Annual Service Plan FAQ
Microsoft CRM for Large Corporation – Security
Microsoft Great Plains & CRM in Transportation & Logistics – Overview
Microsoft CRM for Corporate Business – Working Offline
Microsoft CRM USA Nationwide Remote Support
Microsoft Great Plains: Dexterity vs. eConnect – FAQ
Microsoft Great Plains Implementation for Midsize & Large Corporation: Lockbox Processing
Microsoft Axapta, Navision or Great Plains: ERP Selection for Large Corporation
Microsoft Moves to Small Business Accounting/Retail Market – Stakes and Thoughts
Microsoft Great Plains – Licensing & Product Versions
Microsoft Great Plains Nationwide Remote Support
Microsoft Great Plains Customization Tools – Overview
Microsoft Great Plains, Navision, Axapta – Selection Considerations
Microsoft CRM Data Import FAQ
Corporate Accounting System: Microsoft Great Plains – Overview
Microsoft Great Plains Payroll Module Customization Scenarios
ERP System of the Future: Database, Business Logic and Interface
Microsoft CRM Lotus Notes Domino Connector FAQ
Microsoft CRM Integration with IBM Lotus Notes Domino – Machinery Dealership Example
Microsoft CRM Integration with Lotus Notes Domino: Messaging Connector – Future Directions
Microsoft Great Plains Worldwide Help & Support
Microsoft Dynamics GP – New Customization, Development, Integration, & Reporting Opportunities
Microsoft Dynamics GP: Auto Dealership Implementation
Microsoft Dynamics GP – Remote Support
User Training: Microsoft Dynamics GP – Interface Unification
Oracle E-Business Suite Customization & Integration: New Directions
Oracle E-Business Suite Development: New Technologies
Microsoft Dynamics GP – Renovated Microsoft Business Solutions Great Plains ERP
Microsoft Dynamics CRM Customization & Integration Tools Review
Microsoft Dynamics GP & CRM in Transportation & Logistics

Disclaimer

Please note that this website is for information only. Whilst every care has been taken to provide accurate information you should always seek the advice of a professional before attempting any repairs or making any purchase(s).
You need to take special care to ensure that the information given applies your system.

Myspace Backgrounds
Plenty of myspace backgrounds to choose from

Groovy Sudoku
Get your Daily Sudoku game at GroovySudoku.com
marker About Us | Site Map | Privacy Policy | Contact Us | ©2005-2006