progressive contract number

Discuss here how to configure hoteldruid and better use its features.

Moderator: marco

Post Reply
p3rseus
Posts: 11
Joined: Wed Jan 09, 2008 12:58 pm

progressive contract number

Post by p3rseus »

i try to locate the javascript (i guess it's javascript) that produce the progressive contract number. i would like to change it to have instead of 1, 2 , 3 something like 0001 0002 for official invoice or to start at 1000 instead of. if you can help me on this one marco it would be very appreciated.
marco
Posts: 1332
Joined: Tue Jul 05, 2005 6:00 pm
Location: Roma, Italia

Post by marco »

The code is in php in the visualizza_contratto.php file, anyway I suggest you to upgrade because in the latest php-residence version it already works that way.

Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
p3rseus
Posts: 11
Joined: Wed Jan 09, 2008 12:58 pm

thank you but

Post by p3rseus »

i have 1.0.1 version and it start at 1 with me. i will check the code but if you can give me a hint.
tazilein
Posts: 19
Joined: Fri May 18, 2007 1:30 pm

Post by tazilein »

I use 1.0.1 and in my template the contract_progressive number starts with 1 not 0001
tazilein
Posts: 19
Joined: Fri May 18, 2007 1:30 pm

Post by tazilein »

Another issue that seems problematic to me: If I use contract_progressive number the contract is automatically created as soon as I say View Document "Bill".

If I say View "Bill" a second time, then a second bill is created. that is wrong and dangerous if you want to use the bills for the fiscal authorities
p3rseus
Posts: 11
Joined: Wed Jan 09, 2008 12:58 pm

found a way to do it

Post by p3rseus »

the portion of code used to produce the 4 zero number in the document name can be reproduce in the same page to make the same number in the progressive contract variable i can post the modification here but i would prefer marco acknowledge first
marco
Posts: 1332
Joined: Tue Jul 05, 2005 6:00 pm
Location: Roma, Italia

Post by marco »

I thought you were referring to the number in the filename, not in the document. In the next version there should be a condition to "truncate" a document variable to a given length, or if it's shorter to add a default character (0 in this case) to reach that length.
For now viewing the document to be saved is the same as creating it, if you want to view it a second time you should open the saved one (with ftp if it's on the server). The number is given based on the higher numeber available in the saved files, so if you delete the last created file the number goes back, or if you create a file with number 1000 it will create the next with 1001 (if no other file with a higher number is present). This way you can also upload files (with appropriate filename) for invoices not coming from reservations.

Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
p3rseus
Posts: 11
Joined: Wed Jan 09, 2008 12:58 pm

temporary invoice

Post by p3rseus »

if you want to view the bill of a client without producing a new numbered one just create a template called temporary invoice with no progressive contract number and no save contract option checkbox checked so you can always display an invoice before producing an official numbered one
tazilein
Posts: 19
Joined: Fri May 18, 2007 1:30 pm

Post by tazilein »

Thanks for the answers. Unfortunately in my case that is no solution. We are 4 persons that are involved and every person should be able to create a bill (and this bill should be saved on the server). As it is an obligation in austria to have progressive numbers on our bills I cannot have the risk to create an invoice for the same reservation a second time.

My proposal: add a field on the sql-table for every reservation where the filename of the created bill on the server is saved. If that field is empty a new bill with a new number will be created. If there is a number in the field then the document will be showed and you can choose to delete the bill or change it or just print a second copy of the bill.
marco
Posts: 1332
Joined: Tue Jul 05, 2005 6:00 pm
Location: Roma, Italia

Post by marco »

I'll add this to the TODO list. Are you using the last_payment variable in invoices documents or just the reservation total price?

Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
deus3x
Posts: 9
Joined: Fri Nov 16, 2007 9:40 pm

this is what i did

Post by deus3x »

i've created 4 templates:
- temporary invoice with reservation total price
- final invoice with progressive contract number and reservation total price
- temporary credit invoice with last payment (when you need to recredit a client)
- final credit invoice with progressive contract number and last payment variable

the temporary display TEMPORARY mention is just to show a client how the final invoice will be.

however, my employee made some mistakes and i think it would be great to change the way you produce a payment. he produced a final invoice several time and forgot to change the booking as all paid or partially paid so there was no payment method variable displayed on it. i did that thinking that choosing to produce an invoice would lead to the payment method page and make the system register the payment. is there anyway to make this possible quickly because i think this payment process needs to be fullproof (i shouldn't erase final invoices from the system for legal reaons..)
Post Reply