BUG: Preorder transaction value date incorrect

So are you saying the payment transaction is also backdated??

The transaction document and the **transaction value ** are backdated, but the payment record itself is dated correctly so I am using that table as a reference point to update the two backdated tables.

Why cant you report on payments? You can get a total with it as well.

I am pretty sure this was by design and not a bug. Presale tickets were designed well after the accounting system was made. It was some time in v4.

EDIT: Hmm I see the issue though. The accounts screen would be wrong. So I think this is an oversight when Pre-Sale tickets were created. @VehbiEmiroglu you may want to look at that. When Pre-Sale tickets are converted to real tickets any account transactions or documents still use the original ticket date of the Pre-Sale ticket and it does not use the new Correct Date of when it was converted to a real ticket.

1 Like

Yep, as you say @Jesse, there might be round-about ways to pull some useful in reports but ultimately the incorrect dates for transaction values means that the account screens are a mess. It’s often helpful to look at the account screens in order to understand if there were any issues with the till cash out at the end of day… But with some values posted months in the past it’s a bit tricky right now.

I have run that sql update statement in my dev environment and everything looks good as far as I can see…

1 Like

If as you show the ‘sale’ transaction is created at the time of closing preorder its not really backdating. Your issue is updating ticket date isnt backdating account transaction. Although if this is the correct thing to do or not is a separate issue. Any system ice looked at accounts setup for usally doesnt allow date manipulation and sale goes in there and then. If you wernt changing dates and reported based on this it wouldnt matter.
This is part of the reason I have avoided preorder as find it slightly unpredictable and in theory accounts would be the correct way to handle what it was trying to make a simpler option for. If there were an easy way to have an itemised statement you wouldnt need preorder as could use accounts for similar result.

I can perhaps understand that the sales account might register the sale back in the date of the pre-order, but it makes no sense to record the payment as today, but the value of the payment in the past.

1 Like

Never looked at accounts tables.
It presumably is pulling the date from the account transaction document or i guess maybe the ticket date HOWEVER if you close, reopen and add more orders the account value transactions are updated not accumulated and after resetting ticket date the updated value date is not updated to ticket date so either the update doesnt touch the date or continues to refer to document date.
And in fact yes it does, just tested. If an open ticket has its document date manually updated in sql and is then paid the payment value date is the updated value.
In my opinion the issue is that the date in transaction values is current date as I would say it should be it is the original document date.
This then comes to a problem with things like date/historic adjustment.
If you update the document date do you then update all transaction values for the document dates?
If it were me personally I would have document date as initial ticket creation date and then each session of orders listed as addittional rows in transaction values with current date rather than updating a single transaction allong with payments obviously, that way your account loggin is full and complete. My 1ps worth anyway.

Yeah, I guess that transaction value date is the most important thing, I’ll reset my dev system any only update the transaction value dates and see if that is sufficient to get the correct results in the accounts screens and reports.

Yep…

I have just run the SQL script to update the values only and I have set it to automatically fire each time a ticket is paid and everything seems to be appearing correctly.

How do I know if this is something that will get accepted as an issue and will be resolved, or if i is by design and won’t be changed?

Vehbi will be the one to hear from but he stays really busy. The days of Emre popping in and doing quick fixes are gone. But Vehbi does a great job.

1 Like

Excuse me. Thanks for reporting. I will look and fix this ASAP.

1 Like

Hi @VehbiEmiroglu

Have you been able to implement a fix for this yet?

Hello,
I am facing a similar issue .

Can you tell me how did you configure the sql script to execute every time a payment is made.

Thanks

He would have likely executed a script containing the sql query as part of his automation flow.

Thanks,
I created the above scripts
And I have created an Execute script action.
Now how do I trigger the script through execute script action.

Cant remember the script action but easy way is just to use {CALL:X} expression;

{CALL:handlerName.functionName('vale1','value2')

SCRIPT%201 SCRIPT%202 script%20action script%20rules

Hello,
Sorry but i still confused. I dont have any programming background.

Handler for script are :
TD
TV

This is what i have at the moment.

Can you tell me where do i need to enter the text.

I am unable to close my account properly and its causing me serious problems.

Thank once again for your help :slight_smile:

OK

So I did it in a slightly different way (no idea of the merits of both).

The approach you have taken is to put raw SQL as the script. It is possible to call these SQL scripts, but I think they need a handler starting with @@@ and I think I have only seen them used in Custom Reports.

What I have done is use that SQL command within a JavaScript function (which is what is generally used within Automation>Scripts.

Therefore I have a script setup as follows:

You can see the handler and the function and we’ll need these in a second… But note, you could build additional logic within this one script (probably any associate or similar functionality), and we can call any single function later using the execute script action.

So, to call this particular script I added the following action to a Ticket Closed rule

image

I hope this helps… Like I said, this might not be the best way to do it, but it’s working for me while waiting for it to be fixed.

3 Likes

I’ll give it a try.

Thanks alot for your help.

I’ll let you know how it goes :smiley:

2 Likes

Thanks alot @mjb2000 . The script work :smiley: .

1 Like