0

Help needed with invoicing

Hi, it's been a while since l have posted but have come across a problem l don't know how to rectify. 
l have an Invoice table linked to a Customer table, and in my Customer table l have set up a customer called "Shop Sale".
"Shop Sale" customers are radom walk ins who purchase items from my store as opposed to a Customer who might have multiple sales over a long period of time and might have other tables linked.
The situation l am having is that a Sale created in January with a date and invoice number can suddenly change to the date of the last sale made, ie, today's date. I have a "Report" table with a view including date parameters and totals and am wondering if when using it somehow changes all "Shop Sales" to one date. 
this is causing a lot of issues as l have to go back and change all the invoice dates back to original invoice date. 
any advice would be very helpful. 
Also, is their anyone out there who is using and is able to help me and lives in Melbourne Australia?

3 replies

null
    • Fred
    • 3 yrs ago
    • Reported - view

    Hi Michael -

     

    Do you have any trigger code or do you only notice this when you go to your Reports dashboard?

     

    What is the code you have in your Reports table view?

    • Central Park Furnishings
    • Michael_McKenna
    • 3 yrs ago
    • Reported - view

    Hi Fred, on the customer table l do have a script in a button to automatically open a "Shop Sale" invoice and which auto fills the date. The script for button is 

    let newRec:=(create Invoices);

    newRec.(Customer:=133);

    popupRecord(newRec)

    l did have an auto fill date code as well but removed yesterday, thinking this could be part of the problem. 
    I have a trigger on create in Invoice 

    'Invoice ID := text(record(Counters,1).Result);

    let c:=record (Counters,1).Counter +1;

    job_:="Job-" + format(c,"0000");

    'Type of Sale ' := null

     

    The counter works perfectly and this code was given to me by Sean from a Webinar. 

    The code for reports is one l got from a YouTube Nioxus Class

    let xBeg := 'Beg Date';

    ler xEnd := 'End Date';

    sum(( select Invoices) ['Date of Invoice'>=xBeg and 'Date of Invoice' <= xEnd].'Total inc GST')

    that covers all scripts and triggers. 
    hope this helps. 
    'regards MIchael 

    • Fred
    • 3 yrs ago
    • Reported - view

    You reference an auto fill date code but didn't post it. Since you removed it have you had any issues?

     

    The other code you posted don't seem to touch any date fields so I don't see anything there.

Content aside

  • 2 yrs agoLast active
  • 3Replies
  • 533Views
  • 1 Following