Sage 100

 View Only
Expand all | Collapse all

Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

  • 1.  Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 05-13-2019 04:30
      |   view attached
    @Jeff Schwenk asked me recently if the Perform Logic I shared several years ago for preventing duplicate invoices from A/P Invoice imports could be re-purposed for A/P Manual Check Entry​. In both cases by default, V/I treats an existing Invoice No on an import as an Adjustment instead of a duplicate to reject.

    So here is one I did for a client last year for A/P Manual Check Entry.
    Slightly different than the one A/P Invoice Data Entry.
    This worked for Jeff for 2019 Adv and 2018 Adv.
    Happy importing!

    In Import Job Maintenance click on Perform button and set it up like this:


    Create a folder called PFM under \Mas90 and place the attached Import_ManChk_ValidateInvoiceNo.txt there. 
    Note: You don't have to put it in PFM folder. That is just my own convention.
    When a dupe is found it will force the record to fail and it will appear in the Job Log.

    ------------------------------
    Alnoor Cassim

    Free Agent Developer and Consultant
    CallForHelp.biz
    Email: alnoor@callforhelp.biz
    Orange County, CA
    ------------------------------

    Attachment(s)



  • 2.  RE: Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 05-13-2019 09:26
    (I'm in the habit of setting up PL files in CM\Script, so I don't have to remember to copy them during migrations / upgrades... that folder is copied automatically, and all kinds of scripts are in one place).

    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 3.  RE: Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 05-14-2019 11:46
    I'm with @Kevin Moyes on placing any customization related files in CM\Script​.

    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 4.  RE: Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 05-14-2019 12:02
    That seems like a good practice. For me most of my customizations are actually mods where the Script folder is not in play so I'm accustomed already to a reinstallation process as part of an upgrade. It works for me.

    ------------------------------
    Alnoor Cassim

    Free Agent Developer and Consultant
    CallForHelp.biz
    Email: alnoor@callforhelp.biz
    Orange County, CA
    ------------------------------



  • 5.  RE: Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 01-02-2020 16:28
    I tried this one for my manual check VI job, using the same text file and perform logic but it is not working @Alnoor Cassim. ​I created a PFM folder under MAS90 but does the Command simply start with ..\PFM\.... or do I have to have the full path to the MAS90 directory? This is v2018 standard, BTW.

    ------------------------------
    Therese Logeais, Technology Integrators
    ------------------------------



  • 6.  RE: Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 01-02-2020 16:49
    ..\PFM\[Script Name] should work. I have gotten in the habit of using relative path names for my scripts and perform logic, makes upgrades and server moves much easier.

    Double check the extension of the actual file and the extension you are specifying in the path.

    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 7.  RE: Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 01-02-2020 17:01
    It's a .txt file and that is what is specified in the command line.

    ------------------------------
    Therese Logeais, Technology Integrators
    ------------------------------



  • 8.  RE: Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 01-02-2020 17:26
    Do you get any error messages?

    Can you include a screenshots of the file name in the PFM folder and the perform logic set up dialogue?

    Any chance NTFS permissions aren't set correctly on the PFM folder?

    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 9.  RE: Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 01-03-2020 15:39
    Edited by Alnoor Cassim 01-04-2020 02:36
    FYI - I remoted in with Therese to see what was going on. It turns out my "prefix" variables for APDivisionNo$ and VendorNo$ were out of scope and that's why it was always returning the InvoiceNo as not found (therefore not a duplicate) when running the CheckInvoiceHistory() method. For @Jeff Schwenk who I did this for originally, these variables were in scope. I presume the difference is in the Sage version. Therese's customer was on 2018 PU2, Jeff's was earlier I think.

    Anyway the right way to fix is add Perform Logic at an earlier point when the variables are in scope, assign them to a global variable, then use them in this main Perform. Instead I directly "replaced" VendorNo from the import file column. Putting it together this line is changed:

    retExists = coInvcHistHdr'CheckInvoiceHistory("00", IMP$[2], InvoiceNo$)

    The "00" means no divisions were used. The [2] refers to VendorNo being Column 2 in the source import file. This worked for Therese.

    ------------------------------
    Alnoor Cassim

    Accounting Systems, Inc. (ASI)
    Email: alnoor@asifocus.com
    Orange County, CA
    ------------------------------



  • 10.  RE: Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 01-03-2020 16:03
    Thanks again, @Alnoor Cassim!!​

    ------------------------------
    Therese Logeais, Technology Integrators
    ------------------------------



  • 11.  RE: Perform Logic to Prevent Duplicate Invoice on A/P Manual Check Entry

    Posted 02-07-2021 11:09
    Hmmm, moved client to v2020 a couple months back.  They haven't reported any issues but a good reseller would verify.

    ------------------------------
    Jeff Schwenk
    FORMER 90M Board Member
    Bottomline Software, Inc.
    Waynesboro VA
    540-221-4444
    ------------------------------