WoollyinWalesIT / jomres

Jomres Core, the online booking engine and portal for Joomla and Wordpress
https://www.jomres.net
GNU General Public License v2.0
40 stars 36 forks source link

Assign manually invoice id and date #388

Closed mauriciosalguero closed 2 years ago

mauriciosalguero commented 5 years ago

Jomres currently generates and invoice number incremetally and a date atuomatically everytime a booking is made wheter the booking is valid or cancelled for any reason.

The invoice system should to allow the property owner to generate the invoice number ONLY on demmand, that means, that only when the owner decides to print that invoice then the system will assign the incremental ID and the date chosen by the owner (not the default system date).

Why is this change needed:

  1. This change is required due our tax regulation agency requiring that:

1.1. Only valid (payment proccessed) invoices should be indexed. 1.2. The date of the invoice should match the invoice ID accordingly. This means that invoice ID XX02 date should never be older than invoice ID XX01

  1. Corporate VIP guests usually don't pay the same day the booking is made as their company books directly with us but they require that the invoices related to their employees should be sent by the end of the month to be proccessed as one single payment or sometimes they ask to delay the invoice until the next month.

  2. For accountability purposes, only accepted bookings should generate an invoice number. Cancelled bookings, guest that never showed up (with pending deposits) or gray bookings (last minute bookings paid in cash) may still appear with the booking ID for the record but not with invoice ID or invoice date.

jomres commented 5 years ago

What country is this for?

JuanGarciaG commented 5 years ago

What Mauricio says is true, if it is not done in this way Jomres billing is not useful (at least in Spain). I think the easiest thing is to keep the invoice table as it is, but instead of invoices, which are "pro forma invoices" or "orders". When the client pays their stay or leaves the establishment we can dump that "order" in a legal invoice (in another different table).

I hope it helps you, Vince.

A greeting.

mauriciosalguero commented 5 years ago

Hello Vicent, This billing system is required for Colombia.

Property owners must register and print a batch of invoices starting with, for instance, xx00000 and ending in xx99999, and only when they run out of physical invoices they're allowed to register the new batch starting with xxA0000 - xxA99999 or xAx0000 -xAx99999 etc.

As physical copies cannot be synced with Jomres invoices ID, the owner must manually asign invoice ID to match the current physical invoice ID, that way, The new invoice ID should be treated as a common string instead of incremental integer or something, leaving only booking ID as the only locked and incremental field for payment gateways and property records.

Thanks in advance.

jomres commented 5 years ago

So, an easier solution then would be for me to make it possible for you to modify the invoice number after it has been created?

mauriciosalguero commented 5 years ago

So, an easier solution then would be for me to make it possible for you to modify the invoice number after it has been created?

Yes, that would work. Just make sure to remove Invoice No. from the booking invoice printout template and leave Booking No., instead as invoice header. I think invoice Number is only useful if the buyer ask for it after the payment proccess or if site owner prints it.

Thanks again for your help.