VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Topic started by: Mr_Smurf on January 26, 2006, 17:38:48 pm

Title: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 26, 2006, 17:38:48 pm
Here is a Invoice/Receipt/DeliveryNote Addon.

It acts as a plugin for order.order_print and adds a new tab where you can create invoices, receipts and delivery notes in pdf.

I't has swedish and english language support.

You can grab the attached file.

If you have the old DeliveryNote addon installed you must unistall it first because it conflicts with the new version,
you can find instructions for uninstalling here http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=13325.new#new

Update 2006-01-30: New bugfixed release attached
Update 2006-02-01: New bugfixed release attached
Typo fixed in admin.install_delivery_sql.php #_{vm}_bills should be #__{vm}_bills

[attachment cleanup by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: 9100107 on January 27, 2006, 01:09:27 am
Do you install as a component...?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 27, 2006, 09:01:53 am
No, to get the integration needed with virtuemart you need to install it by hand.

Installation instructions are included...
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Beest on January 30, 2006, 14:53:36 pm
i have a problem with your delivery note addon for virtuemart, i get the error
Notice: Table 'joomladb.jos_vm_bills' doesn't exist after installing it.
the sql install file doesnt add that to the database and your files do need it.

i made that table myself now, not sure if it is ok but it does seem to work but there are no icons or links for an invoice, delivery note or receipt.
 
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 30, 2006, 14:56:41 pm
Ah, I seem to have forgot to add that table in the installationscript...

Run the following query in your db, it will create the table for you.

CREATE TABLE `jos_vm_bills` (
  `vendor_id` int(11) NOT NULL default '0',
  `bill_id` int(11) NOT NULL auto_increment,
  `delivery_id` int(11) NOT NULL default '0',
  `order_id` int(11) NOT NULL default '0',
  `obliterated` tinyint(1) NOT NULL default '0',
  `due_date` int(11) default NULL,
  `paid` tinyint(1) NOT NULL default '0',
  `is_invoice` tinyint(1) NOT NULL default '0',
  `delay_interest` decimal(10,2) NOT NULL default '0.00',
  `cdate` int(11) default NULL,
  `mdate` int(11) default NULL,
  PRIMARY KEY  (`vendor_id`,`bill_id`),
  KEY `idx_bills_delivery_id` (`delivery_id`),
  KEY `idx_bills_obliterated` (`obliterated`),
  KEY `idx_bills_is_invoice` (`is_invoice`)
) TYPE=MyISAM
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 30, 2006, 15:02:11 pm
I made that table myself now, not sure if it is ok but it does seem to work but there are no icons or links for an invoice, delivery note or receipt.

There should be a new tab right beside the "Order Status Change" and "Order History" tabs in order.order_print.

If you have another language than swedish or english you also need to edit your language file and add the following strings.

       var $_VM_DELIVERY_TAB_LBL = 'Delivery';
        var $_VM_DELIVERY_NOTE = 'Delivery Note';
        var $_VM_DELIVERY_RECEIPT = 'Receipt';
        var $_VM_DELIVERY_INVOICE = 'Invoice';
        var $_VM_DELIVERY_NUMBER = 'Deliveryno.';
        var $_VM_DELIVERY_EXTENT = 'Extent';
        var $_VM_DELIVERY_OBLITERATE = 'Obliterate';
        var $_VM_DELIVERY_OBLITERATED = 'Obliterated';
        var $_VM_DELIVERY_OBLITERATED_BY = 'Obliterated by';
        var $_VM_DELIVERY_STATE = 'State';
        var $_VM_DELIVERY_EXTENT_FULL = 'Full delivery';
        var $_VM_DELIVERY_EXTENT_PARTIAL = 'Partial delivery';
        var $_VM_DELIVERY_ADD = 'New delivery';
        var $_VM_DELIVERY_VALUE = 'Product value';
        var $_VM_DELIVERY_NOT_COMPLETE = 'Not all products are delivered!';
        var $_VM_DELIVERY_COMPLETE = 'All products are delivered.';
        var $_VM_DELIVERY_SKU = 'SKU';
        var $_VM_DELIVERY_NAME = 'Name';
        var $_VM_DELIVERY_DELIVER = 'Deliver';
        var $_VM_DELIVERY_DELIVERED = 'Delivered';
        var $_VM_DELIVERY_QUANTITY = 'Quantity';         
        var $_VM_DELIVERY_EDIT = "Change delivery";
        var $_VM_DELIVERY_CANCEL = "Cancel";
        var $_VM_DELIVERY_SAVE_CHANGES = "Save changes";
        var $_VM_DELIVERY_SAVE = "Save";
        var $_VM_DELIVERY_INVOICE_DUE = "Invoice is due";
        var $_VM_DELIVERY_SEND_INVOICE = "Create invoice";
        var $_VM_DELIVERY_PREPAIED = "Customer has prepaid the order.";
        var $_VM_DELIVERY_DAYS = "days";
        var $_VM_DELIVERY_DELAY_INTEREST = "Delay interest";
        var $_VM_DELIVERY_REALLY_OBLITERATE  = "Do you realy want to obliterate this delivery?";
        var $_VM_DELIVERY_PRINT_DATE_LBL = "Date";
        var $_VM_DELIVERY_PRINT_ORDER_DATE_LBL = "Orderdate";
        var $_VM_DELIVERY_PRINT_BILL_DATE_LBL = "Invoicedate";
        var $_VM_DELIVERY_PRINT_DUE_DATE_LBL = "Duedate";
        var $_VM_DELIVERY_PRINT_BILL_TERMS_LBL = "Terms of payment";
        var $_VM_DELIVERY_PRINT_OVERDUE_INTEREST_LBL = "Delay interest";
        var $_VM_DELIVERY_PRINT_DELNOTE_NUMBER_LBL = "Del.note no.";
        var $_VM_DELIVERY_PRINT_ORDER_NUMBER_LBL = "Order no.";
        var $_VM_DELIVERY_PRINT_BILL_NUMBER_LBL = "Bill no.";
        var $_VM_DELIVERY_PRINT_SHIP_TO_LBL = "Shipment address";
        var $_VM_DELIVERY_PRINT_BILL_TO_LBL = "Billing adress";
        var $_VM_DELIVERY_PRINT_PAGE_LBL = "Page";
        var $_VM_DELIVERY_PRINT_SHIPPING_CARRIER_LBL = 'Shipping Carrier';
        var $_VM_DELIVERY_PRINT_SHIPPING_MODE_LBL = 'Shipping Method';
        var $_VM_DELIVERY_PRINT_YOUR_REF_LBL = 'Your reference';
        var $_VM_DELIVERY_PRINT_OUR_REF_LBL = 'Our reference';
        var $_VM_DELIVERY_PRINT_SKU_LBL = 'SKU';
        var $_VM_DELIVERY_PRINT_DELIVERED_LBL = 'Del';
        var $_VM_DELIVERY_PRINT_QUANTITY_LBL = 'Qty';
        var $_VM_DELIVERY_PRINT_REMAINING_LBL = 'Rest';
        var $_VM_DELIVERY_PRINT_UNIT_PRICE_LBL = 'Price/Unit';
        var $_VM_DELIVERY_PRINT_TOTAL_PRICE_LBL = 'Price';
        var $_VM_DELIVERY_PRINT_PRODUCT_LBL = 'Product';
        var $_VM_DELIVERY_PRINT_VENDOR_ADDRES_LBL = 'Address';
        var $_VM_DELIVERY_PRINT_VENDOR_PHONE_LBL = 'Phone';
        var $_VM_DELIVERY_PRINT_VENDOR_Fax_LBL = 'Fax';
        var $_VM_DELIVERY_PRINT_VENDOR_EMAIL_LBL = 'E-mail';
        var $_VM_DELIVERY_PRINT_VENDOR_URL_LBL = 'Internet';
        var $_VM_DELIVERY_PRINT_SHIPPING_LBL = 'Shipping and Handling Fee';
        var $_VM_DELIVERY_PRINT_SUBTOTAL_LBL = 'Subtotal';
        var $_VM_DELIVERY_PRINT_TOTAL_LBL = 'Total';   
        var $_VM_DELIVERY_PRINT_COUPON_DISCOUNT_LBL  = 'Coupon Discount';
        var $_VM_DELIVERY_PRINT_DISCOUNT_LBL  = 'Discount';
        var $_VM_DELIVERY_PRINT_FEE_LBL = 'Fee';
        var $_VM_DELIVERY_PRINT_TAX_LBL = 'Tax';
        var $_VM_DELIVERY_PRINT_SIGNED_LBL = 'Signed';
        var $_VM_DELIVERY_PRINT_OBLITERATED_LBL = 'OBLITERATED';
        var $_VM_DELIVERY_PRINT_TO_PAY_LBL = 'To pay';
        var $_VM_DELIVERY_PRINT_INVOICE_INFO = 'Enter bill number (%s) when you pay this bill.';

Let me know if this works, because then I can upload a new version that works :)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Beest on January 30, 2006, 15:56:49 pm
the tab is there, delivery number now too, all that works, but there is no receipt, invoice or delivery note.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 30, 2006, 16:02:05 pm
Have you created a new delivery using the new delivery button?

The way it works is that you create a delivery.. and then you can choose if you want a receipt or invoce for that delivery.. :)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Beest on January 30, 2006, 16:11:17 pm
Have you created a new delivery using the new delivery button?

Yes i did, i selected create invoice but i dont get one.
see screenshot, there is nothing there under receipt, invoice and delivery note.

[edit]removed screenshot[/edit]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 30, 2006, 16:31:43 pm
Your site is not at / right? so /images will point to the wrong location..

Now I have added $mosConfig_live_site to the urls of those images..

Gunzip and replace the attached file..

[attachment cleanup by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Beest on January 30, 2006, 17:05:16 pm
that fixed it :)

at least the missing icon part, now when i click one firefox wants to save index3.php to disc instead of  showing a pdf file   :-\
that happens both with the old pdf files and those that came with this addon.
the frontend does show pdf files with the old files but that doesnt work anymore if i use the new files.

btw thanks for helping so fast :)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 30, 2006, 17:12:58 pm
Quote
at least the missing icon part, now when i click one firefox wants to save index3.php to disc instead of  showing a pdf file   Undecided
that happens both with the old pdf files and those that came with this addon.
the frontend does show pdf files with the old files but that doesnt work anymore if i use the new files.

Os and version of firefox?

When you are talking about new files, are you talking about the VirtueMart 1.0.2 release?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Beest on January 30, 2006, 17:25:42 pm
Os and version of firefox?

When you are talking about new files, are you talking about the VirtueMart 1.0.2 release?

winxp, firefox 1.5

virtuemart 1.0.2 is on the site, but i meant the new pdf files, those in pdf153.tgz
the ones that come with virtuemart do work on the frontend, the ones in pdf153.tgz do not.
neither of those work on the backend in the deliverynote addon.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 30, 2006, 17:41:55 pm
winxp, firefox 1.5

Ok, strange.. Works fine using Firefox 1.5 for MacOS X

virtuemart 1.0.2 is on the site, but i meant the new pdf files, those in pdf153.tgz
the ones that come with virtuemart do work on the frontend, the ones in pdf153.tgz do not.
neither of those work on the backend in the deliverynote addon.

You should not notice any difference in the frontend, because it is still using the old files.
It is ony my addon that is using the files from pdf153.

Is the pdf ok if you download (as index3.php) it and open it in a pdf-viewer?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Beest on January 30, 2006, 18:00:20 pm
You should not notice any difference in the frontend, because it is still using the old files.
It is ony my addon that is using the files from pdf153.

oh, i see, my mistake, i installed that wrong, i thought i had to overwrite the original fpdf files cause in the readme it said
Quote
A newer version of fpdf, the version shiped with VirtueMart is old an broken.
:-[
now all the files are in the right place (i think) :D
but firefox still wants to download that index3.php  :-\
Quote
Is the pdf ok if you download (as index3.php) it and open it in a pdf-viewer?
no its a 0 byte file, i have to say that this isnt the first time this happens on this pc, i'll try to do all this on another pc later.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 30, 2006, 18:06:22 pm
oh, i see, my mistake, i installed that wrong, i thought i had to overwrite the original fpdf files.

no its a 0 byte file, i have to say that this isnt the first time this happens on this pc, i'll try to do all this on another pc later.

that would explain it..

You should have both a pdf153 directory and a pdf directory in your classes dir..

The addon is looking for a directory named pdf153, and if not found the generation of pdf does not work..
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Beest on January 30, 2006, 19:45:59 pm
You should have both a pdf153 directory and a pdf directory in your classes dir..

The addon is looking for a directory named pdf153, and if not found the generation of pdf does not work..

Both are now there but still no pdf, pc at work still downloads the 0 byte index3.php and my pc here at home just displays a blank page. the only thing in it is
Code: [Select]
<script>document.location.href='index.php'</script>
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 30, 2006, 20:03:51 pm
Is the file com_virtuemart/html/templates/delivery/delivery_pdf.php installed?

If you copy link location from any of the pdf-icons and paste it in a new window and append &testmode=1 in the end of the url you shuld get alot of text saying things like:


$this->SetX(-107);
$this->SetFont('Arial','B',15);
$this->Ln(10);

etc...

If you get no output when you use testmode then it does not read the template at all.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Beest on January 30, 2006, 20:28:38 pm
Is the file com_virtuemart/html/templates/delivery/delivery_pdf.php installed?

oops, i guess one file didnt make it to the live site.
now i do get pdf files, all 46 bytes with the same content "<B>FPDF error: </B>Unsupported image type: gif"
i guess that is because of the shop logo, i'll change that into a jpeg when i get back to work and see if that fixes it.


edit:  i just added the gif code to the fpdf.php and put the gif.php file in the pdf153 directory, it all works now :)

thanks for all the help  :)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on January 31, 2006, 11:03:54 am
Good, I hope you will find this add-on useful.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: webgobe on February 02, 2006, 08:10:32 am
First of all, Mr_Smurf, you have a typo in the install file, #_{vm}_bills instead of #__{vm}_bills.
That's okay, I found it, corrected it.
Installed the latest version - read forum ;) and here I am!
I have the new tab, with the new fdelivery button and the header of the tab. I can click on new delivery ;) more, the dialogue appears, I have the chance to change the nr of items to be delivered and 2 checkboxes below:
Customer has prepaid the order.
Create invoice
The Invoice is due x days.     Delay interest x % boxes are grayed out, and I have two more choices: Cancel and Save. And here the fun begans: I can click on any og these, the result is the same: nothing changes.
I can even set the deliverables amount of any number I like, not even an error message is showing up.
I'm running VM 1.01 on top of the Joomla 1.04, site not installed in the webroot, but in a subdir, I tried to use the hack from a wide range of clients, on '98 and XP (IE, Mozilla, FireFox, Opera, whatewer you like). Databases are created, in place, all files patched, double-checked. And I'm not a beginner...
What I'm doing wrong?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 02, 2006, 09:03:17 am
The only thing I can think of right now is that the registration of the functions in the database has gone wrong..

When you click Cancel, do you return to the previous page?
When you ckick Save, where do you end up? And do you get any type of error message at all?

I have uploaded a new version of the installation package with the typo corrected :)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: webgobe on February 02, 2006, 09:28:39 am
Hmm, may have right, I will check that registration thing.
In both cases (Cancel and Save) I'm back directly from where I was when I opened the tab. Nothing happens.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 09, 2006, 00:22:09 am
Hmm, may have right, I will check that registration thing.
In both cases (Cancel and Save) I'm back directly from where I was when I opened the tab. Nothing happens.

Found the bug!

The bug is in fact in the order edit addon.. the form name in the order edit is the same as in the delivery addon.. The drawbacks of cut and paste ;)

If you rename the form in the edit order addon to editForm instead of deliveryForm things will magically start to work.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on February 09, 2006, 22:06:07 pm
Hi

nice module... ;D
Module working OK

Efter I install module I got folowing error on my adminpage

Quote
Line: 228
Char: 2
error: 'this.tab' is null or not an object
URL: /administrator/index2.php?page=order.order_print&limitstart=0&keyword=&order_id=2&option=com_virtuemart&Itemid=1
Code: 0


Comments please

2.
 I create new delivery note (invoice).
If I click on pdf icon opens new blank window. How I can see/print invoice?
Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 09, 2006, 22:21:30 pm
Hi

nice module... ;D
Module working OK

Efter I install module I got folowing error on my adminpage

Quote
Line: 228
Char: 2
error: 'this.tab' is null or not an object
URL: http://www.xxxxxxxx.com/administrator/index2.php?page=order.order_print&limitstart=0&keyword=&order_id=2&option=com_virtuemart&Itemid=1
Code: 0


Comments please

Regards
IQAPPS


What version of virtuemart?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on February 09, 2006, 22:36:23 pm
Hi

Hyperfast reply...  ;)

Joolma 1.0.7,virtuemart 1.0.2

Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 09, 2006, 22:45:38 pm
Hi

Hyperfast reply...  ;)

Joolma 1.0.7,virtuemart 1.0.2

Regards
IQAPPS

Does everyting work, and this is just an annoying javascript warining?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on February 09, 2006, 22:57:00 pm
Hi

Quote
Does everyting work, and this is just an annoying javascript warining?

Yes it is only javascrip warning.

2.
 I create new delivery note (invoice).
If I click on pdf icon opens new blank window. How I can see/print invoice?
Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 09, 2006, 23:04:07 pm
You should get a pdf-file...
have you installed the pdf template file in and the pdf153 directory?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on February 09, 2006, 23:15:20 pm
Hi
I checked  and I have copyed templates to templates. (CVS and delivery)
and in classes is ( CVS,delivery,pdf153,ps_delivery,ps_order_delivery)


Regards
Iqapps
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 09, 2006, 23:18:14 pm
cvs is not really needed.. i should have deleted them...

but what about the pdf153 directory?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on February 09, 2006, 23:19:00 pm
It is there. ;D
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 09, 2006, 23:23:25 pm
It is there. ;D

Then I have no idea what is wrong...
I must go to bed now.. I can help you debug tomorrow...
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 10, 2006, 23:13:48 pm
If gzip compression is enabled in the server so that all pages that the server sends out are gziped, then this addon will brake..

It will send out the pdf file uncompressed and the client will try do decompress it and fail.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: knurra on February 14, 2006, 07:04:28 am
Hey Mr_Smurf, Thanks for this addon it is absolutely great!
There is a couple of things I would like to change.

1,
The currency on my sites are Japanese Yen ( ¥ ), the HTML for it is ( &yen; ).
The Pdf does not display the ¥ symbol it displays &yen;
My question is how do I go about fixing this?

2,
I have many attributes on my products (customizable computers) and have therefore changed account.order_details.php, order.order_printdetails.php and  ps_checkout.php for a tidier look.
You can read about it here: http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=13399.0
My question is how can I do the same with this addon. All the attributes lines up in one row.
I want to get them one per row.

Thanks

Joakim
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 14, 2006, 08:51:52 am
1,
The currency on my sites are Japanese Yen ( ¥ ), the HTML for it is ( &yen; ).
The Pdf does not display the ¥ symbol it displays &yen;
My question is how do I go about fixing this?

The template file is using $CURRENCY_DISPLAY->getFullValue() to display prices.
You can replace the &yen; with ¥ using the str_replace function.

str_replace("&yen;","¥", $CURRENCY_DISPLAY->getFullValue($the_variable_containg_the price));

Quote
2,
I have many attributes on my products (customizable computers) and have therefore changed account.order_details.php, order.order_printdetails.php and  ps_checkout.php for a tidier look.
You can read about it here: http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=13399.0
My question is how can I do the same with this addon. All the attributes lines up in one row.
I want to get them one per row.

You can change this in the template file.
The function ContentRow recieves the attribute value from the database in the variable $attribute.
So you can split the attribute and make an array of individual attributes.
Then loop over the array and print all attributes as a new line.

You can use this code in your loop,

$this->Cell(30,5,'',0,0,'L');
$this->Cell(130,5,"(".$current_attribute.")",0,0,'L');
$this->Ln(5);
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: dbooth on February 16, 2006, 16:13:10 pm
I have followed the install instructions, but when I try and view an order I see the following error;

Warning: main(/var/www/html/administrator/components/com_virtuemart/classes/ps_order_delivery.php): failed to open stream: No such file or directory in /var/www/html/administrator/components/com_virtuemart/html/order.order_print.php on line 131

Fatal error: main(): Failed opening required '/var/www/html/administrator/components/com_virtuemart/classes/ps_order_delivery.php' (include_path='.:/usr/share/pear') in /var/www/html/administrator/components/com_virtuemart/html/order.order_print.php on line 131

Any ideas?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 16, 2006, 16:20:37 pm
Did you write

require_once(CLASSPATH.'ps_order_delivery.php');

in order.order_print.php?

And does the file /var/www/html/administrator/components/com_virtuemart/classes/ps_order_delivery.php exist?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: dbooth on February 16, 2006, 16:58:41 pm
Ah yes, /var/www/html/administrator/components/com_virtuemart/classes/ps_order_delivery.php didn't exist - must have missed the bit in the install notes that copied the contents of the classes folder.  Much obliged.

Can now see Delivery tab, however when Delivery tab is clicked the following error is shown;

Notice: Undefined variable: i in /var/www/html/administrator/components/com_virtuemart/classes/ps_order_delivery.php on line 215
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 16, 2006, 19:08:48 pm
add the line

$i = 0;

before the while loop on line 214
while ($db->next_record()) {

What php version are you using?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: dbooth on February 17, 2006, 10:32:18 am
Running PHP v4.3.9
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: stepino on February 19, 2006, 10:25:46 am
Hi,
I've installed this add-on and have two problems:

1) when creating new delivery I click on Save button and get this error

Notice: Undefined index: prepaid in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php on line 189

Notice: Undefined index: invoice in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php on line 190

2) Delivery notes are created ok, but receipts and invoices are broken

Can you help please?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 19, 2006, 22:11:46 pm
Hi,
I've installed this add-on and have two problems:

1) when creating new delivery I click on Save button and get this error

Notice: Undefined index: prepaid in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php on line 189

Notice: Undefined index: invoice in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php on line 190

2) Delivery notes are created ok, but receipts and invoices are broken

Can you help please?

Seems to be the lines

                        'paid = '.($d["prepaid"]?1:0).', '.
                        'is_invoice = '.($d["invoice"]?1:0).', '. 

Try to replace them with

                        'paid = '.(isset($d["prepaid"])?1:0).', '.
                        'is_invoice = '.(isset($d["invoice"])?1:0).', '. 

And se if it resoves the problem
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: stepino on February 19, 2006, 23:25:07 pm
I've replaced lines as you wrote and firs part of my proble is solved. Great!
But second one is still there.

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 20, 2006, 09:40:06 am
In the process of generating the pdf files the output buffer is flushed.
And all error messages are removed. :(

Configure your php to write error messages to a loggfile  (http://se.php.net/errorfunc) and then you can se what goes wrong.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: stepino on February 21, 2006, 10:50:02 am
[21-II-2006 07:55:32] PHP Notice:  Use of undefined constant order_id - assumed 'order_id' in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php on line 311

[21-II-2006 07:55:32] PHP Notice:  Use of undefined constant order_id - assumed 'order_id' in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php on line 486

[21-II-2006 07:55:32] PHP Notice:  Undefined index:  item_total in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php on line 558

[21-II-2006 07:55:32] PHP Notice:  Undefined index:  item_total in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php on line 559
Here are messages from log:

[21-II-2006 07:55:32] PHP Notice:  Undefined index:  item_total in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php on line 560

[21-II-2006 07:55:32] PHP Notice:  Undefined variable:  auth in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php on line 562

[21-II-2006 07:55:32] PHP Notice:  Use of undefined constant item - assumed 'item' in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php(514) : eval()'d code on line 204

[21-II-2006 07:55:32] PHP Notice:  Use of undefined constant sum - assumed 'sum' in c:\program files\easyphp1-8\www\eshop\administrator\components\com_virtuemart\classes\ps_delivery.php(514) : eval()'d code on line 205

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 21, 2006, 11:46:28 am
Ok.

Seems to be very simple problems that create these errors like $d[order_id] instead of $d["order_id"].
And it does not like when to do a += on a variable that has not been previously defined..

I wonder what php-config setting triggers these errors.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: macallf on February 22, 2006, 04:00:45 am
Hi Mr Smurf

Have installed as per your instructions but am getting these errors when saving.

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in E:\web\Joomla\administrator\components\com_virtuemart\classes\ps_delivery.php on line 35

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in E:\web\Joomla\administrator\components\com_virtuemart\classes\ps_delivery.php on line 104

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in E:\web\Joomla\administrator\components\com_virtuemart\classes\ps_delivery.php on line 218

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in E:\web\Joomla\administrator\components\com_virtuemart\classes\ps_delivery.php on line 290

I am using

Joomla 1.0.7
VM 1.0.2
Apache 2.05
PHP 5.1.2
MySQL 4.1.16

Windows XP

Also getting the same problems as stepino

Any help here much appreciated.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 22, 2006, 16:55:28 pm
I currently do not have access to any php5 installations so I can test :(
But it seems like it is my "exists_and_is_numeric" function that is not php5 compatible..
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: stepino on February 23, 2006, 00:17:48 am
macallf:
I'm using php4 and this is a part of my php.ini:

; Whether to enable the ability to force arguments to be passed by reference
; at function call time.  This method is deprecated and is likely to be
; unsupported in future versions of PHP/Zend.  The encouraged method of
; specifying which arguments should be passed by reference is in the function
; declaration.  You're encouraged to try and turn this option Off and make
; sure your scripts work properly with it in order to ensure they will work
; with future versions of the language (you will receive a warning each time
; you use this feature, and the argument will be passed by value instead of by
; reference).
allow_call_time_pass_reference = On
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: macallf on February 23, 2006, 01:13:56 am
macallf:
I'm using php4 and this is a part of my php.ini:

; Whether to enable the ability to force arguments to be passed by reference
; at function call time.  This method is deprecated and is likely to be
; unsupported in future versions of PHP/Zend.  The encouraged method of
; specifying which arguments should be passed by reference is in the function
; declaration.  You're encouraged to try and turn this option Off and make
; sure your scripts work properly with it in order to ensure they will work
; with future versions of the language (you will receive a warning each time
; you use this feature, and the argument will be passed by value instead of by
; reference).
allow_call_time_pass_reference = On

Thanks Stepino, but I already have that set to true. It makes no difference.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: jk4nik on February 23, 2006, 15:01:04 pm
@mr_smurf

thanks a lot for this hack is very important for me

ther is an error:

i explain it:

i have an order of quantity 1 (one)
when i do an invoice of 1 (one) and than i delete that, quantity in order remain 1 (one) but the remained quantity is -1 (minus one)
that quantity must return to 0 (zero)

ciao
jk
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: yeh920 on February 23, 2006, 17:24:26 pm
Hi,

This is just what I need. But -  how to install if I only have ftp-access to the server???

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on February 23, 2006, 22:04:10 pm
Hi

This mode generate a doc.pdf name.
It is possible to change this name to = (e.g. 09.pdf) order number and same for recepie and invoice.


Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 23, 2006, 22:07:32 pm
@mr_smurf

thanks a lot for this hack is very important for me

ther is an error:

i explain it:

i have an order of quantity 1 (one)
when i do an invoice of 1 (one) and than i delete that, quantity in order remain 1 (one) but the remained quantity is -1 (minus one)
that quantity must return to 0 (zero)

ciao
jk

I'll have a look at that bug..
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 23, 2006, 22:09:00 pm
Hi,

This is just what I need. But -  how to install if I only have ftp-access to the server???



You can download the files, update them localy and then upload them again.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 23, 2006, 22:10:41 pm
Hi

This mode generate a doc.pdf name.
It is possible to change this name to = (e.g. 09.pdf) order number and same for recepie and invoice.


Regards
IQAPPS

When I download it it gets named with order number and so on, what browser are you using?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on February 23, 2006, 22:47:04 pm
Hi

Internet Explorer 6.bla bla

Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: sesheridan on February 26, 2006, 06:59:07 am
Does this add on permit partial shipments?    How does that work with credit card processor?   Apparantly verisign only processes once shipment is made.    So are multiple partial submissions being made to  the cc processor or is the cc being charged upfront...

Thanks.  I am hoping this handles partials well.  I really need it. Got to the end of installation of VM with all the various changes, and thud:  I am told I need partial shipment consideration.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 26, 2006, 08:45:15 am
Does this add on permit partial shipments?    How does that work with credit card processor?   Apparantly verisign only processes once shipment is made.    So are multiple partial submissions being made to  the cc processor or is the cc being charged upfront...

It has partial shipment support, but it has no integration with the payment processor.. All payment stuff is handled by virtuemart at checkout.

I have never tried it with any type of cc processor because my shop is only using invoices, prepaid or cache on delivery.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: yeh920 on February 26, 2006, 11:30:37 am
I did manuallt changes to the language files and copied all the files to the server, also made the database changes. But there is no new tab...

Could it be that I did not fix order.order_print.php correctly?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 26, 2006, 11:37:07 am
I did manuallt changes to the language files and copied all the files to the server, also made the database changes. But there is no new tab...

Could it be that I did not fix order.order_print.php correctly?

Yes, Put the require call in the right place :)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: yeh920 on February 26, 2006, 12:39:49 pm
Where exactly should I put it?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on February 26, 2006, 12:43:09 pm
                        </table>
                        <?php
                        $tab->endTab();
                        require_once(CLASSPATH.'ps_order_delivery.php');
                        $tab->endPane();
                        ?>
                  </td>
                </tr>
          </table>       
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: yeh920 on February 26, 2006, 13:45:42 pm
Yes, it is there but still no tab?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: sesheridan on March 02, 2006, 04:22:55 am
The mod is great! 

I do wish that the email update to the customer would include the latest shipping info (either by link or a pdf attachment). Right now the email just refers to the purchase order link. 

(For partial shipping, I added the term "partial ship" to the status list and this shows in the email update)


Thanks. This mod is really useful.

(Ihavent gotten the pdf's to work yet, but I am going to try again)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: paolo on March 02, 2006, 10:27:25 am
I need to set manually the invoice number, I don't want it automatically...Anybody know how to do?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on March 02, 2006, 10:36:01 am
I have very limited spare time at the moment, so I currently don't have the time to fix bugs right away.
I will go through this thread next week and make a todo list of things I need to fix and then begin fixing hem..

When I'm finshed I will make new bugifx release.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on March 02, 2006, 10:38:59 am
I need to set manually the invoice number, I don't want it automatically...Anybody know how to do?

Do you want the counter to begin at a specific number or do you want to select number for each invoice?

The addon does not support changing invoice numbers but you can change the invoicenumber if you make the changes directly in the database.. But changing multible bill id:s everyday in the database is a really bad and timeconsuming way of doing it.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: paolo on March 02, 2006, 11:04:32 am
I would set manually the invoice number, typing my invoice number into a text field...I need about this hack to menage so good the invoices of a real store and the e-commerce store..is it possible?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on March 02, 2006, 11:15:00 am
It is possible but it requires som programming skill to do it..
I do not have the time to fix that for you right now, but if you know someone skilled to
fix it I can tell you where you need to put the changes.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: paolo on March 02, 2006, 14:01:03 pm
Many thanks Mr_Smurf , tell me where I can put the changes..  ;)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: knurra on March 08, 2006, 14:41:02 pm
Hi Mr_Smurf,
Thanks for the help on this one, I have been away for a cuple of weeks and not been able to work on it until yesterday. Getting the Yen currency Symbol to work was no problem however my PHP skills are not yet at the level to follow your instructions.
I have been trying many different things on my own but I am almost giving up so I thought I better ask you.
Quote
You can change this in the template file.
The function ContentRow recieves the attribute value from the database in the variable $attribute.
So you can split the attribute and make an array of individual attributes.
Then loop over the array and print all attributes as a new line.

You can use this code in your loop,

$this->Cell(30,5,'',0,0,'L');
$this->Cell(130,5,"(".$current_attribute.")",0,0,'L');
$this->Ln(5);

If you could please give me few hints that would be much apprecciated.
How do I split the attributes and make an array of them, where in the template file should I put that code?
I think I can figure out the loop by myself but if you want to help with that one as well then I am grateful.

Thank you in advance for your help. I am sure there are people other then me that this will be useful to.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: vdlkris on March 13, 2006, 02:26:00 am
Hi Mr_Smurf,

Thank you to put your energy in to this :)

When i try to insert the zip file correctly , changes the file names and...

when I try to open the virtuemart in the admin site I get this error :

Fatal error: Cannot instantiate non-existent class: vmlanguage in /home/nigoshop/public_html/components/com_virtuemart/virtuemart_parser.php on line 59

I have install it  normally correctly like the readme file told me , but..
For everything there is a solution  :)
I hope you can give it a hand ?

thanks anyway

kris

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on March 13, 2006, 09:49:05 am
Hi Mr_Smurf,

Thank you to put your energy in to this :)

When i try to insert the zip file correctly , changes the file names and...

when I try to open the virtuemart in the admin site I get this error :

Fatal error: Cannot instantiate non-existent class: vmlanguage in /home/nigoshop/public_html/components/com_virtuemart/virtuemart_parser.php on line 59

I have install it  normally correctly like the readme file told me , but..
For everything there is a solution  :)
I hope you can give it a hand ?

thanks anyway

kris



It looks like you have broken your language-file.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: vdlkris on March 13, 2006, 15:05:05 pm
Hi Mr_Smurf,

It seams not to work by me.... (I know its me  :'( )

I hope you can help me on this..

first of all my language is Dutch .

I replace the order.order_print.php file -) order.order_print.orig.php
than I upload from the zipfile order.order_print.php ( order.order_print.diff)

I get the follow error:
administrator/components/com_virtuemart/html/order.order_print.orig.php 2005-11-15 23:18:46.000000000 +0100 +++ administrator/components/com_virtuemart/html/order.order_print.php 2005-11-19 15:50:46.771347792 +0100 @@ -128,6 +128,7 @@
Fatal error: Call to a member function on a non-object in /home/****/public_html/administrator/components/com_virtuemart/html/order.order_print.php on line 6

I replace my dutch.php file -) dutch.orig.php
I upload dutch.php from english.diff and place the english_strings.txt into that file...
Fatal error: Cannot instantiate non-existent class: vmlanguage in /home/nigoshop/public_html/components/com_virtuemart/virtuemart_parser.php on line 59

Could you please advice me again

greeting, kris



Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on March 13, 2006, 16:08:55 pm
Hi vdlkris!

Check your PM

Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on March 14, 2006, 14:29:45 pm
Hi

Is it posible to decide image high and with in delivery_pdf.php header!? How to I mean.


Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: riesengross on March 15, 2006, 16:18:48 pm
Is there a solution to use it under Virtuemart 1.0.3? I installed correctly - hope so - but nothing happens... I think, it doesn't work under 1.0.3. I'm right?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on March 15, 2006, 16:29:07 pm
Hi

Quote
I think, it doesn't work under 1.0.3. I'm right?

NO! It's working. I installed on two sites.

Did you have delivey tab? Can you create invoce from order?

Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: riesengross on March 15, 2006, 18:53:02 pm
That's my problem, I have no Delivery Tab...

Here's my installation process:

I copied the classes in the right places, the same with the folder pdf and the folder templates...
I edited my language file...
I used the sql. update...

I merged order.order_print.diff with order.order_print.php manually... that means, around line 128 I inserted a line and the code... so my file looks here like this

</table>
<?php
$tab->endTab();
require_once(CLASSPATH.'ps_order_delivery.php');
$tab->endPane();
?>
</td>

Anything wrong?

What can I do? Every help or hint is welcome...

Thanks!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on March 15, 2006, 19:46:41 pm
Hi

Quote
I have no Delivery Tab...

Did you checked here?



[attachment cleanup by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: riesengross on March 15, 2006, 20:24:24 pm
Yepp... now I know, where the tab should be... and there's one, but very little small, if I click on it a windows appears, but there's nothing inside like the "red cross" and a very small switch... Any idea?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on March 15, 2006, 20:28:52 pm
My best guess is that you don't have the language strings for the addon in your language file..
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: riesengross on March 15, 2006, 20:34:03 pm
I found out... the language file was corrupted. Everything is o.k. now! Thanks for your help!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: riesengross on March 15, 2006, 21:01:11 pm
Last one... PDF was generated, but it can't be opened in Acrobat Reader. Acobat Reader gives an error: (Sorry but I must this translate from German) It seems that the file was part of an email and not decompressed while saving...

Any idea...

Mr Smurf, i will do a german translation of the language file, are you interested in this file?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on March 15, 2006, 21:07:57 pm
Last one... PDF was generated, but it can't be opened in Acrobat Reader. Acobat Reader gives an error: (Sorry but I must this translate from German) It seems that the file was part of an email and not decompressed while saving...

Any idea...

Can you explain a little more what happens?
Do you get a pdf file with no content or what?
Do you have gzip compression enabled on your server?

Quote
Mr Smurf, i will do a german translation of the language file, are you interested in this file?

Post it as an attachment in this thread :)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: riesengross on March 15, 2006, 21:25:43 pm
A PDF-File is generated, but I can't open, because the file-format is not supported. I added a generated file as attachment.

[attachment deleted by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on March 15, 2006, 21:29:36 pm
The content of the file is

"<B>FPDF error: </B>Unsupported image type: gif"

There is a gif addon for fpdf you can install (don't know the url) or you can replace your logo with a jpeg or png file.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: macallf on March 15, 2006, 21:31:02 pm
Have the same problem, pdf file generated but not viewable.

The pdf file is in fact a txt file containing error messages. This is the same as the previous post.

Have added the file.

Any enlightenment much appreciated.

Mark
Title: German Translation
Post by: riesengross on March 15, 2006, 22:07:40 pm
A little tribute to this community and this nice extension.
The German translation file for the text strings.

Have fun...

[attachment cleanup by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: sesheridan on March 15, 2006, 22:42:17 pm
Same pdf problem here
Title: Invoice/Receipt/DeliveryNote Addon (finished at last) little instructions
Post by: riesengross on March 15, 2006, 23:00:44 pm
Now everything is working, Mr Smurf did a excellent job.

But be careful.

1. Your Shop Logo must be a JPEG-File

2. If you are not sure how to use servercomands use the appended order.order_print.php file.
But be careful, it will only work, if you have a unchanged file of a clean virtuemart installation.

3. Otherwise you can make the modification of your order.order_print.php file following this instructions

Search for this lines:
         </table>
         <?php
         $tab->endTab();
         $tab->endPane();
         ?>
        </td>
      </tr>
     </table>
     <table class="adminlist">

Replace with this lines:
         </table>
         <?php
         $tab->endTab();
         require_once(CLASSPATH.'ps_order_delivery.php');
         $tab->endPane();
         ?>
        </td>
      </tr>
     </table>
     <table class="adminlist">

4. Include the language-files (like english_string.txt) in your VirtueMart language file found here:
/administrator/components/com_virtuemart/languages/

best before this lines at the end of the file

}
class phpShopLanguage extends vmLanguage { }

/** @global vmLanguage $VM_LANG */
$VM_LANG =& new vmLanguage();
?>

5. Place the other files according to the structure of Mr Smurfs original archive and unpack the pdf153-archiv before transmitting

That's it and everything will work.

Nice Job, Mr Smurf.

Hope this little instructions will help to use this excellent hack.

Have fun.

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: srijit on March 30, 2006, 09:11:32 am
does this work with the new VM 1.0.4 ?? i followed instructions, but i dont have a delivery tab. language file looks correct too.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on March 30, 2006, 09:31:33 am
I have not tested it with 1.0.4 but it should work..
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on March 30, 2006, 10:06:39 am
Hi

Quote
I have not tested it with 1.0.4 but it should work..

It's working on 1.0.4. Please check if you install is correct.

Mr_Smurf
Quote
The template file is using $CURRENCY_DISPLAY->getFullValue() to display prices.
You can replace the &yen; with ¥ using the str_replace function.

str_replace("&yen;","¥", $CURRENCY_DISPLAY->getFullValue($the_variable_containg_the price));[/quote]
Q. You write this. I have same problem with €.

Where I put this pice of code ?


Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on March 30, 2006, 10:17:22 am
In the template file, use it insted of $CURRENCY_DISPLAY->getFullValue()
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on March 30, 2006, 10:26:34 am
Hi

Tank you... :D

IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: srijit on March 30, 2006, 10:32:19 am
updated test store from VM 1.0.3 to VM 1.0.4 and added this hack. now after the confirm order button is pressed, i get an empty page.
An empty email with all values 0 is sent.
no orders are present in backend.
also i dont see the delivery tab  :o

any idea's why?? are they related??
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on March 30, 2006, 10:42:15 am
I will upgrade my test-store to 1.0.4 this weekend and se what is wrong.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: AmSt4ff on March 30, 2006, 11:44:15 am
I did everything what was in the readme file but it doen't work  ???
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: macallf on April 04, 2006, 17:01:10 pm
Hi

to those having problems with the invoice and receipt pdf's not being generated.

I have made a few changes to the files and now I get the pdf's, still a little bit more work to do but they are generated. I dont know if it is because I'm using PHP 5.

but in templates\delivery change delivery_pdf.php lines 204 & 205 change

Code: [Select]
$this->Cell(15,5,$CURRENCY_DISPLAY->getFullValue($price[item]),0,0,'C');
$this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($price[sum]),0,0,'R');

to

Code: [Select]
$this->Cell(15,5,$CURRENCY_DISPLAY->getFullValue($price['item']),0,0,'C');
$this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($price['sum']),0,0,'R');

in classes/ps_delivery.php change line 545

Code: [Select]
$price_with_tax = array();
$price_without_tax = array();
$price_tax = array();
$displayed_price = array();

to

Code: [Select]
$price_with_tax = array();
$price_without_tax = array();
$price_tax = array();
$displayed_price = array();
            $without_tax['item_total'] = 0;
            $with_tax['item_total'] = 0;
            $tax['item_total'] = 0;

and liine 566

Code: [Select]
if( $auth["show_price_including_tax"] )
to

Code: [Select]
if( @$auth["show_price_including_tax"] )
This is now generating the pdf's. :)

I hope this helps

Mark
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: dusk187 on April 05, 2006, 00:33:07 am
Quote
The template file is using $CURRENCY_DISPLAY->getFullValue() to display prices.
You can replace the &yen; with ¥ using the str_replace function.

str_replace("&yen;","¥", $CURRENCY_DISPLAY->getFullValue($the_variable_containg_the price));

xcuse me. can anybody tell me the correct place and syntax for this replacement. i cant get it to work.

thanks in advance! dusk
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: macallf on April 05, 2006, 00:49:25 am
The file is in \administrator\components\com_virtuemart\html\templates\delivery\delivery_pdf.php

any line that contains $CURRENCY_DISPLAY->getFullValue

e.g.

$this->Cell(15,5,str_replace("&pound;","£", $CURRENCY_DISPLAY->getFullValue($price['item'])),0,0,'C');
$this->Cell(20,5,str_replace("&pound;","£", $CURRENCY_DISPLAY->getFullValue($price['sum'])),0,0,'R');

these start about line 204 and this is my mod to show the £ symbo;l.

Hope this helps

Mark
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: dusk187 on April 05, 2006, 00:52:38 am
thank you very much!
I set the ) at the wrong place.

regards dusk
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: OSX_man on April 06, 2006, 12:33:28 pm
Hello guys!

I have a very little problem with this Addon. A very little  :)

I should get to change this line :
var $_VM_DELIVERY_PRINT_INVOICE_INFO = 'Enter bill number (%s) when you pay this bill.';

so that this would print the ORDER_NUMBER in the PDF-file nor the bill number. What should i change and where? I think that one change in the code is not enough... :-) Because i have allready tried... :-)

So in where I have to make changes and what? Something in ps_delivery.php, ps_order_delivery.php or fpdf.php

Sorry. I am a Novice with the PHP-coding.



Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on April 06, 2006, 12:54:14 pm
ps_delivery.php line 430

$html = str_replace('{VirtueMartInvocieInfo}',sprintf($VM_LANG->_VM_DELIVERY_PRINT_INVOICE_INFO,$dbb->f('bill_id')),$html);

Change it to

$html = str_replace('{VirtueMartInvocieInfo}',sprintf($VM_LANG->_VM_DELIVERY_PRINT_INVOICE_INFO,$dbo->f("order_id")),$html);
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: sesheridan on April 06, 2006, 19:06:46 pm
Mr Smurf:   A while ago we discussed a partial shipment email that would show what items were shipped.   Have you had a chance to code this?   It would be really great!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on April 06, 2006, 21:14:35 pm
Mr Smurf:   A while ago we discussed a partial shipment email that would show what items were shipped.   Have you had a chance to code this?   It would be really great!

Sorry, have not had the time...
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: OSX_man on April 10, 2006, 12:03:35 pm
Thanks for the help Mr_Smurf  :).

This modification works and fine.

Then the other thing and maybe again a stupid question, but like I said I am novice with PHP.
I should add still one notification row to PDF-bill. This row contains information about times when
our shop is open.

This row would be the next row after the INVOICE_INFO row. 

Again some modifications. ps_delivery.php, language file and something else?

I think You can help me........


Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: snazzyperry on April 17, 2006, 20:29:12 pm
can you have the file (with all the fixes) posted again please, instead of getting the old file and patching until it is corrected!!

Thanks,
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: rexel99 on April 27, 2006, 07:23:54 am
I Just came accross this add-on and would suit very well my needs, however like the last entry, I too would like to see a 'final' snapshot of the downloads and install instruction to make sure I get it all done right, it appears to be a bit of a nightmare at the moment through 8 pages of conversation...

While I am here, my purpose is a bit different, and was wondering (with this custom/pdf invoide) if there was a way to include custom fields from an order (like a nominated date/time) to include in the invoice/email?

Regards Rex.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: rxalex on May 13, 2006, 19:04:17 pm
Does this work with VM 1.05? and which copy can I use?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on May 13, 2006, 22:26:06 pm
Does this work with VM 1.05? and which copy can I use?

I have not verified it with 1.05.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: balzercomp on May 16, 2006, 17:39:57 pm
I installed it on VM 1.0.5 and it seems to work without a problem.
 
Could someone tell me how to send the created pdf as an e-mail?

Thanks

Gerald
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on May 16, 2006, 17:51:41 pm
The only way is to download it and attach it manually..
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: balzercomp on May 16, 2006, 19:54:31 pm
Thanks.

If I find a different solution, I'll tell this forum.

Thanks for this great enhancement.

Gerald
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on May 16, 2006, 19:56:49 pm
Thanks.

If I find a different solution, I'll tell this forum.

Thanks for this great enhancement.

Gerald

Feel free to modify the enhancement in any way you like.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: sesheridan on May 17, 2006, 23:44:55 pm
Mr. Smurf:

Just another request for listing items that are the subject of a partial shipment in the email generated by the addon.
I of course have no idea how to do it, but it sure would be very cool.   

Listing the items shipped would save a lot of phone calls with the customer who is wondering what was the subject of the partial shipment.


Thanks again
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on May 17, 2006, 23:50:33 pm
The addon does not gereate any emails, the pdf you can print or send with a manually sent email contains a list of the items that are shipped.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: sesheridan on May 18, 2006, 03:47:32 am
Thanks.  I am still having trouble getting the pdf to work.   Just  get the page cannot be found error.    I will have another go. Hopefully  see the partial list then...
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: mao on May 24, 2006, 13:00:43 pm
This addon is great, it's really what i'm looking for  ;D
I have only one problem... in the pdf I have '&euro;' instead of the character '€', and '&gt;' instead of character '>'...
any ideas for resolve this problem?  ???

Congratulations for the work and sorry for my english (i'm italian... :P)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: mao on May 24, 2006, 14:18:28 pm
This addon is great, it's really what i'm looking for ;D
I have only one problem... in the pdf I have '€' instead of the character '€', and '>' instead of character '>'...
any ideas for resolve this problem? ???

Congratulations for the work and sorry for my english (i'm italian... :P)

...solved!

inserted many
Code: [Select]
str_replace("&euro;","€", $CURRENCY_DISPLAY->getFullValue($the_variable_containg_the price))in the deliver_pdf.php file.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: GiorgioBlu on May 30, 2006, 22:49:35 pm
Hi, I've made some modification at this good hack for my site.
I re-do the layout for invoice and Packing Slip (sorry if my code are confused ::), I'm not a programmer).

But now I've a problem because I'll want to show the Payment Method on invoice (in italy this information is necessary).

Can you halp me?

I've insert this code in ps_delivery.php at line 348
Quote
    $dbpm =& new ps_DB;
            $q  = "SELECT * FROM #__{vm}_payment_method, #__{vm}_order_payment WHERE #__{vm}_order_payment.order_id='$order_id' ";
            $q .= "AND #__{vm}_payment_method.payment_method_id=#__{vm}_order_payment.payment_method_id";
            $dbpm->query($q);
            $dbpm->next_record();

and this at line 488
Quote
$html = str_replace('{VirtueMartPaymentMethod}',$dbpm->p("payment_method_name"),$html);

but dosn't work!! ???  :-\ :'(
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: rxalex on May 31, 2006, 07:02:21 am
Can get the modification installed :( I get an Xml Error message, anyone have a solution?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: GiorgioBlu on May 31, 2006, 11:53:41 am
Can get the modification installed :( I get an Xml Error message, anyone have a solution?
Sorry but I don't understand. You mean my modifications?

In any case you'll install this hack manually (don't use automatic installations)

Regards,
        Giorgio
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: rxalex on May 31, 2006, 15:48:47 pm
Thanks Giorgio, Does it indicate which files and where to change? and is it possible to make it $ instead of Euro?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Ralf Melles on May 31, 2006, 15:58:33 pm
Hi,

for all who want to include gif images inside the generated pdf, this is a hack for the pdf153 version to make it possible to include gif images.

just unpack into folder '/classes/pdf153'

Regards
Ralf

[attachment cleanup by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: rxalex on June 01, 2006, 08:14:41 am
I copied Ps_delievery to com_virtuemart/classes and delivery_pdf to com_virtuemart/html/templates and I dont see any difference..
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: LittlePooh on June 11, 2006, 15:07:04 pm
Hem ..
I have a local installation on my PC Windows. I did all the installation manually thanks to instructions on page 7.

The Delivery tab is here but when I try to do a delivery and save, I get :
"Database operation failed!"

Can someone helps me and tell me where I must have done something wrong ?  :'(

Thank you.  :)

Update :
Look like the admin.install_delivery_sql didn't work correctly for me. At least it didn't create _vm_bills and deliveries, and some other instructions.

And now, I get "Direct Access to this location is not allowed." when I try to re-execute it.

As I'm not a programmer at all, I don't know how I'm suppose to do so that my database matches with the rest... :-\
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: rxalex on June 15, 2006, 06:10:26 am
Someone help cant get this to work!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on June 16, 2006, 12:41:17 pm
Hello,

Thanks a lot for this work

There is a stategic error. for all document : invoice, delivery note, and so on, we need (in france) at the end of the document legal information more than what is written.

For example : RCS (trade register) + authorized capital + TVA intra + and so on

It's obligatory

I try to modify. If it is possible to modify the footer of the 3 documents, it is more light.

Have you an idea ?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Aemornion on June 16, 2006, 12:56:32 pm
First of all thanks for a great addon! Everything works fine for me but i have two questions:

1. How do I get central european characters (čćšđž) to be displayed properly in the PDF because now they are all garbled

2. How do i change the template and the layout to my needs because i want to make a unified form for all my documents so that they all look the same. I tried editing the delivery_pdf.php in Dreamweaver but since there is no html code inside only pure PHP i couldnt change a thing. With what tool can I get the look and feel fixed to my needs? If this takes a long time to configure, is there a chance to convert the layout to pure HTML (without the use of making the PDF)

 
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on June 16, 2006, 16:59:49 pm
Hello,

Some questions :

What is this : $_VM_DELIVERY_PRINT_OVERDUE_INTEREST_LBL = "Delay interest"; and what is to do

I have a problem with the HTML tag &euro; (it don't write €) in the invoice, and so on
Thanks for your help
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: rxalex on June 16, 2006, 17:00:46 pm
Please someone help, im a newbie how do i make this addon work?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on June 16, 2006, 17:06:37 pm
Hello,

For the french shop, you have a french diff in the zip file.

And differents modifications to accept the "legal mention" at the end of the 3 documents.

In the language file you have :
Quote
/* Legal info for a french shop */
var $_VM_DELIVERY_PRINT_LEGAL_INFO = 'Sarl ..... au capital de 3.000,00 € - RCS Nice B 000 000 000 - NAF 000A - TVA Intra FR 50 000 000 000';

Use this var to write your shop information. You have to write this on every language file.

On delivery_pdf and ps_delivery, the modifications are marked by
Quote
/* Create legal info */

Goog luck

[attachment cleanup by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on June 16, 2006, 18:41:53 pm
Please someone help, im a newbie how do i make this addon work?

What do you want to know ?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on June 17, 2006, 15:02:03 pm
I have a problem with the HTML tag &euro; (it don't write €) in the invoice, and so on
Thanks for your help

It's very simple :
In the table : jos_vm_vendor field : vendor_currency_display_style

Change &euro; by € and all is OK
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on June 19, 2006, 10:30:01 am
Hello,

An other problem with image : the logo file for the shop. The PDF creator don't accept GIF file.

A JPEG file is accepted.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Ralf Melles on June 29, 2006, 09:37:53 am
gby, please read the post before in this thread. I uploaded a modification for the PDF creator class to accept GIF images too ;-)

Ralf
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on June 29, 2006, 11:34:12 am
Thank's a lot
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: bretteville on July 01, 2006, 21:53:41 pm
Installation instructions are included...

That may be, but what do I do if I don't understand any of it?

"Patch order.order_print.php"... How? Where? When? The installation instructions only confiused me even more than I alread was, sorry.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on July 02, 2006, 08:25:16 am
Hello,

Only one question to Mr_Smurf :

What is this : $_VM_DELIVERY_PRINT_OVERDUE_INTEREST_LBL = "Delay interest"; and what is to do

Thanks for your help
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: bretteville on July 02, 2006, 22:31:42 pm
Installation instructions are included...

That may be, but what do I do if I don't understand any of it?

"Patch order.order_print.php"... How? Where? When? The installation instructions only confiused me even more than I alread was, sorry.

Can someone please guide me in the right direction? How do I "patch order.order_print.php"? Are there any installation instructions for dummies?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on July 02, 2006, 23:28:06 pm
In the file order.order_print.php (administrator/com_virtuemart/html/) arround the line 131, you must have :

Quote
         <?php
         $tab->endTab();
         require_once(CLASSPATH.'ps_order_delivery.php');
         $tab->endPane();
         ?>

Best regards
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: jean on July 03, 2006, 01:17:42 am
Hi guys

need some help...plz.. :'(

When i try to insert the zip file correctly , changes the file names and...

when I try to open the virtuemart in the admin site I get this error :

Warning: require_once(D:/server/RWAPM/www/administrator/components/com_virtuemart/languages/english.php) [function.require-once]: failed to open stream: No such file or directory in D:\server\RWAPM\www\components\com_virtuemart\virtuemart_parser.php on line 65

Fatal error: require_once() [function.require]: Failed opening required 'D:/server/RWAPM/www/administrator/components/com_virtuemart/languages/english.php' (include_path='.;D:\server\RWAPM\php\PEAR') in D:\server\RWAPM\www\components\com_virtuemart\virtuemart_parser.php on line 65

thanks..
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: bretteville on July 03, 2006, 13:13:38 pm
Can someone please rewrite the installation instructions for me? I got what gby wrote, but that's just one step of many. I don't even know where to upload the files yet, nor how to "patch" the rest of the files. Hope there are some more helpful souls out there.

Thanks to gby, for explaining one of the questions for me.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: chirng on July 05, 2006, 08:59:17 am
Hi, I found a error after I installed the addon:-

Error: Function Not Registered. addDelivery is not a valid MOS_com_phpShop function.

Can anybody advise me?

Al Chirng
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: chirng on July 05, 2006, 09:02:24 am
below is the screenshoot:-

[attachment cleanup by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on July 05, 2006, 09:13:45 am
Do you work with phpShop or Virtuemart ?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: spiritware on July 08, 2006, 02:17:04 am
I'm having a very simple problem.  I sell PDF downloads on my site and when I enter the download code and hit enter all I see in my browser are the meta tags.  I get same garbled message with ZIP and other files.  Why isn't the PDF loading properly?

Thank you
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: jvels on July 18, 2006, 11:48:44 am
I see may files in this threa, witch file do I need to get it running?

Best Regrads
Jesper vels
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on July 18, 2006, 14:59:43 pm
In the first post, to begin
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: rkowch on July 31, 2006, 18:42:47 pm
Hello! Sorry my English ist not very good, but i try to explain what's my problem.

I've installed the files such as in the readme described. But when I try to open delivery_pdf.php so i get the following error:

Parse error: parse error, unexpected '{' in /var/www/html/V02/administrator/components/com_virtuemart/html/templates/delivery/delivery_pdf.php on line 26

what shall i do now?

Thanks for replying!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on July 31, 2006, 19:09:24 pm
Show the line 26 and arround it, to appreciate the problem ...
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: rkowch on July 31, 2006, 19:27:24 pm
So, thats the whole file:

<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

class PDF extends FPDF
{
   //Page header
   function Header()
   {
      $this->Image('{VirtueMartVendorImage}',20,15,70);
      $this->SetX(-107);
      $this->SetFont('Arial','B',15);
      $this->Cell(80,10,' {VirtueMartTitle}',1,0,'L');
      $this->Ln(10);
      $this->SetX(-107);
      $this->SetFont('Arial','B',9);
      if("{VirtueMartBillNumber}" != '') {
         $this->Cell(24,5,'{VirtueMartBillNumberLabel}',0,0,'C');
      } else {
         $this->Cell(24,5,'{VirtueMartDateLabel}',0,0,'L');
      }
      $this->Cell(28,5,'{VirtueMartOrderNumberLabel}',0,0,'C');
      $this->Cell(28,5,'{VirtueMartDeliveryNumberLabel}',0,0,'C');
      $this->Ln(4);
      $this->SetX(-107);
      $this->SetFont('Arial','',9);
      if({VirtueMartIsBill}) {
         $this->Cell(24,5,'{VirtueMartBillNumber}',0,0,'C');
      } else {
         $this->Cell(24,5,'{VirtueMartDate}',0,0,'L');
      }
      $this->Cell(28,5,'{VirtueMartOrderNumber}',0,0,'C');
      $this->Cell(28,5,'{VirtueMartDeliveryNumber}',0,0,'C');
      if({VirtueMartIsBill}) {
         $this->Ln(4);
         $this->SetX(-107);
         $this->SetFont('Arial','B',9);
         $this->Cell(26,4,'{VirtueMartBillDateLabel}',0,0,'C');
         $this->Cell(27,4,'{VirtueMartOrderDateLabel}',0,0,'C');
         if({VirtueMartIsInvoice}) {
            $this->Cell(27,4,'{VirtueMartDueDateLabel}',0,0,'C');
         }
         $this->Ln(4);
         $this->SetX(-107);
         $this->SetFont('Arial','',9);
         $this->Cell(26,4,'{VirtueMartBillDate}',0,0,'C');
         $this->Cell(27,4,'{VirtueMartOrderDate}',0,0,'C');
         if({VirtueMartIsInvoice}) {
            $this->Cell(27,4,'{VirtueMartDueDate}',0,0,'C');
         }
         $this->Ln(6);
      } else {   
         $this->Ln(14);
      }
      // begin ship to
      $ship_to_X = $this->GetX();
      $ship_to_Y = $this->GetY();
      $this->Cell(80,30,"",1);
      $this->SetY(($ship_to_Y + 3));
      $this->SetFont('Arial','B',9);
      $this->Cell(0,0,'{VirtueMartShipToLabel}',0,0,'L');
      $this->SetFont('Arial','',9);
      $this->Ln(4);
      $this->SetX(($ship_to_X + 3));
      if('{VirtueMartSTCompany}' != '') {
         $this->Cell(0,0,'{VirtueMartSTCompany}',0,0,'L');
         $this->Ln(4);
         $this->SetX(($ship_to_X + 3));
      }
      $this->Cell(0,0,'{VirtueMartSTName}',0,0,'L');
      $this->Ln(4);
      $this->SetX(($ship_to_X + 3));
      $this->Cell(0,0,'{VirtueMartSTStreet1}',0,0,'L');
      $this->Ln(4);
      $this->SetX(($ship_to_X + 3));
      if('{VirtueMartSTStreet2}' != '') {
         $this->Cell(0,0,'{VirtueMartSTStreet2}',0,0,'L');
         $this->Ln(4);
         $this->SetX(($ship_to_X + 3));
      }
      $this->Cell(0,0,'{VirtueMartSTZip} {VirtueMartBTCity}',0,0,'L');
      $this->Ln(4);
      $this->SetX(($ship_to_X + 3));
      if('{VirtueMartSTState}' != '') {
         $this->Cell(0,0,'{VirtueMartSTState}',0,0,'L');
         $this->Ln(4);
         $this->SetX(($ship_to_X + 3));
      }
      $this->Cell(0,0,'{VirtueMartSTCountry}',0,0,'L');

      // let's set pagenumber when we're at it
      $this->SetY(5);
      $this->SetX(-40);
      $this->SetFont('Arial','I',8);
      $this->Cell(0,10,'{VirtueMartPage} '.$this->PageNo().'/{nb}',0,0,'C');

      // return to start position
      $this->SetX($ship_to_X);
      $this->SetY($ship_to_Y);


      // begin bill to
      $this->SetX(-107);
      $bill_to_X = $this->GetX();
      $bill_to_Y = $this->GetY();
      $this->Cell(80,30,'',1);
      $this->SetY($bill_to_Y + 3);
      $this->SetX(-107);
      $this->SetFont('Arial','B',9);
      $this->Cell(0,0,'{VirtueMartBillToLabel}',0,0,'L');
      $this->SetFont('Arial','',9);
      $this->Ln(4);
      $this->SetX(-104);
      if('{VirtueMartBTCompany}' != '') {
         $this->Cell(0,0,'{VirtueMartBTCompany}',0,0,'L');
         $this->Ln(4);
         $this->SetX(-104);
      }
      $this->Cell(0,0,'{VirtueMartBTName}',0,0,'L');
      $this->Ln(4);
      $this->SetX(-104);
      $this->Cell(0,0,'{VirtueMartBTStreet1}',0,0,'L');
      $this->Ln(4);
      $this->SetX(-104);
      if('{VirtueMartBTStreet2}' != '') {
         $this->Cell(0,0,'{VirtueMartBTStreet2}',0,0,'L');
         $this->Ln(4);
         $this->SetX(-104);
      }
      $this->Cell(0,0,'{VirtueMartBTZip} {VirtueMartSTCity}',0,0,'L');
      $this->Ln(4);
      $this->SetX(-104);
      if('{VirtueMartBTState}' != '') {
         $this->Cell(0,0,'{VirtueMartBTState}',0,0,'L');
         $this->Ln(4);
         $this->SetX(-104);
      }
      $this->Cell(0,0,'{VirtueMartBTCountry}',0,0,'L');

      // return to start position and make a huge newline
      $this->SetX($ship_to_X);
      $this->SetY($ship_to_Y);
      $this->Ln(32);

      $this->SetFont('Arial','B',9);
      $this->Cell(80,4,"{VirtueMartYourRef}",0,0,'L');
      $this->SetX(-107);
      $this->Cell(80,4,"{VirtueMartOurRef}",0,0,'L');
      $this->Ln(4);
      $this->SetFont('Arial','',9);
      $this->Cell(80,4,"{VirtueMartBTName}",0,0,'L');
      $this->SetX(-107);
      $this->Cell(80,4,"{VirtueMartCurrentAdminUser}",0,0,'L');
      $this->Ln(5);
      $this->SetFont('Arial','B',9);
      $this->Cell(80,4,"{VirtueMartShippingCarrierLabel}",0,0,'L');
      $this->SetX(-107);
      $this->Cell(80,4,"{VirtueMartBillTermsLabel}",0,0,'L');
      $this->Ln(4);
      $this->SetFont('Arial','',9);
      $this->Cell(80,4,"{VirtueMartShippingCarrier}",0,0,'L');
      $this->SetX(-107);
      $this->Cell(80,4,"{VirtueMartBillTerms}",0,0,'L');
      $this->Ln(5);
      $this->SetFont('Arial','B',9);
      $this->Cell(80,4,"{VirtueMartShippingModeLabel}",0,0,'L');
      $this->SetX(-107);
      $this->Cell(80,4,"{VirtueMartOverdueInterestLabel}",0,0,'L');
      $this->Ln(4);
      $this->SetFont('Arial','',9);
      $this->Cell(80,4,"{VirtueMartShippingMode}",0,0,'L');
      $this->SetX(-107);
      $this->Cell(80,4,"{VirtueMartOverdueInterest}",0,0,'L');
      $this->Ln(7);
      $this->Cell(163,5,"",1,0,'L');
      $this->Ln(0);
      $this->Cell(30,5,"{VirtueMartSKU}",0,0,'C');
      if({VirtueMartIsBill}) {
         $this->Cell(65,5,"{VirtueMartProduct}",0,0,'L');
         $this->Cell(10,5,"{VirtueMartQuantity}",0,0,'C');
         $this->Cell(10,5,"{VirtueMartDelivered}",0,0,'C');
         $this->Cell(10,5,"{VirtueMartRemaining}",0,0,'C');
         $this->Cell(15,5,"{VirtueMartUnitPrice}",0,0,'C');
         $this->Cell(20,5,"{VirtueMartTotalPrice}",0,0,'C');
      } else {
         $this->Cell(70,5,"{VirtueMartProduct}",0,0,'L');
         $this->Cell(20,5,"{VirtueMartQuantity}",0,0,'C');
         $this->Cell(20,5,"{VirtueMartDelivered}",0,0,'C');
         $this->Cell(20,5,"{VirtueMartRemaining}",0,0,'C');
      }
      $this->Ln(5);
      $this->SetAutoPageBreak(true,40);
   }


   function ContentRow($sku, $product, $attribute, $quantity, $delivered, $remaining, $price) {
      global $CURRENCY_DISPLAY;
      $this->SetFont('Arial','',9);
      $this->Cell(30,5,$sku,0,0,'L');
      if("{VirtueMartIsBill}") {
         $this->Cell(65,5,$product,0,0,'L');
         $this->Cell(10,5,$quantity,0,0,'C');
         $this->Cell(10,5,$delivered,0,0,'C');
         $this->Cell(10,5,$remaining,0,0,'C');
         $this->Cell(15,5,$CURRENCY_DISPLAY->getFullValue($price[item]),0,0,'C');
         $this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($price[sum]),0,0,'R');
      } else {
         $this->Cell(70,5,$product,0,0,'L');
         $this->Cell(20,5,$quantity,0,0,'C');
         $this->Cell(20,5,$delivered,0,0,'C');
         $this->Cell(20,5,$remaining,0,0,'C');
      }
      $this->Ln(5);

      if(!empty($attribute)) {
         $this->Cell(30,5,'',0,0,'L');
         $this->Cell(130,5,"(".$attribute.")",0,0,'L');
         $this->Ln(5);
      }
   }

   function SummarizeRow($without_tax, $tax, $with_tax, $coupon_discount,
         $order_discount, $order_fee, $is_invoice) {
      global $CURRENCY_DISPLAY;
      $this->Ln(5);
      $this->SetX(120);
      $this->SetFont('Arial','B',9);
      $this->Cell(40,5,"{VirtueMartSubtotalLabel} :",0,0,'R');
      $this->SetFont('Arial','',9);
      $this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($with_tax['item_total']),0,0,'R');
      $this->Ln(5);
      $this->SetX(120);
      if($with_tax['shipping'] > 0) {
         $this->SetFont('Arial','B',9);
         $this->Cell(40,5,"{VirtueMartShippingLabel} :",0,0,'R');
         $this->SetFont('Arial','',9);
         $this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($with_tax['shipping']),0,0,'R');
         $this->Ln(5);
         $this->SetX(120);
      }
      if($coupon_discount > 0) {
         $this->SetFont('Arial','B',9);
         $this->Cell(40,5,"{VirtueMartCouponDiscountLabel} :",0,0,'R');
         $this->SetFont('Arial','',9);
         $this->Cell(20,5," - ".$CURRENCY_DISPLAY->getFullValue($coupon_discount),0,0,'R');
         $this->Ln(5);
         $this->SetX(120);
      }
      if($order_discount > 0) {
         $this->SetFont('Arial','B',9);
         $this->Cell(40,5,"{VirtueMartDiscountLabel} :",0,0,'R');
         $this->SetFont('Arial','',9);
         $this->Cell(20,5," - ".$CURRENCY_DISPLAY->getFullValue($order_discount),0,0,'R');
         $this->Ln(5);
         $this->SetX(120);
      }
      if($order_fee > 0) {
         $this->SetFont('Arial','B',9);
         $this->Cell(40,5,"{VirtueMartFeeLabel} :",0,0,'R');
         $this->SetFont('Arial','',9);
         $this->Cell(20,5," - ".$CURRENCY_DISPLAY->getFullValue($order_fee),0,0,'R');
         $this->Ln(5);
         $this->SetX(120);
      }
      $this->SetFont('Arial','B',9);
      $this->Cell(40,5,"{VirtueMartTaxLabel} :",0,0,'R');
      $this->SetFont('Arial','',9);
      $this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($tax['final_price']),0,0,'R');
      $this->Ln(5);
      $this->SetX(120);
      $this->SetFont('Arial','B',9);
      $this->Cell(40,5,"{VirtueMartTotalLabel} :",0,0,'R');
      $this->SetFont('Arial','',9);
      $this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($with_tax['final_price']),0,0,'R');
      $this->Ln(7);
      $this->SetX(132);
      $this->SetFillColor(240);
      $this->Cell(50,10,"",0,0,'C',1);
      $this->Ln(3);
      $this->SetX(120);
      $this->SetFont('Arial','B',11);
      $this->Cell(40,5,"{VirtueMartToPayLabel} : ",0,0,'R');
      $this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($with_tax['to_pay']),0,0,'R');
      if($is_invoice == '0') {
         $this->Ln(-5);
         $this->SetX(30);
         $this->SetFont('Arial','B',11);
         $this->Cell(50,10,"{VirtueMartSignedLabel} : _ _ _ _ _ _ _ _ _",0,0,'L');
      } else {
         $this->Ln(10);
         $this->SetX(20);
         $this->SetFont('Arial','B',10);
         $this->Cell(160,10,"{VirtueMartInvocieInfo}",0,0,'C');
      }
   }

   //Page footer
   function Footer()
   {
      $this->SetY(-193);
      $this->Cell(163,160,"",1,0,'L');
      $this->Ln(164);
      $this->SetFont('Arial','B',9);
      $this->Cell(0,4,"{VirtueMartVendorAddressLabel}",0,0,'L');
      $this->SetX(70);
      $this->Cell(0,4,"{VirtueMartVendorPhoneLabel}",0,0,'L');
      $this->SetX(130);
      $this->Cell(0,4,"{VirtueMartVendorEmailLabel}",0,0,'L');
      $this->SetFont('Arial','',9);
      $this->Ln(4);
      $this->Cell(0,4,"{VirtueMartVendorName}",0,0,'L');
      $this->SetX(70);
      $this->Cell(0,4,"{VirtueMartVendorPhone}",0,0,'L');
      $this->SetX(130);
      $this->Cell(0,4,"{VirtueMartVendorEmail}",0,0,'L');
      $this->Ln(4);
      $this->Cell(0,4,"{VirtueMartVendorStreet1}",0,0,'L');
      $this->SetX(130);
      $this->SetFont('Arial','B',9);
      $this->Cell(0,4,"{VirtueMartVendorURLLabel}",0,0,'L');
      $this->Ln(4);
      $this->SetFont('Arial','',9);
      $this->Cell(0,4,"{VirtueMartVendorZip} {VirtueMartVendorCity}",0,0,'L');
      $this->SetX(130);
      $this->Cell(0,4,"{VirtueMartVendorURL}",0,0,'L');
      $this->Ln(4);
      if('{VirtueMartVendorCountry}' != '')
         $this->Cell(0,4,"{VirtueMartVendorCountry}",0,0,'L');
   }

   function Obliterated()
   {
      $this->SetDrawColor(180);
      $this->SetTextColor(180);
      $this->SetFont('Arial','B',50);
      $this->SetY(-150);
      $this->SetX(40);
      $this->Cell(120,25,"{VirtueMartObliteratedLabel}",1,0,'C');
      $this->SetDrawColor(0);
      $this->SetTextColor(0);
   }
}

?>


Line 20 - 30 are:

      }
      $this->Cell(28,5,'{VirtueMartOrderNumberLabel}',0,0,'C');
      $this->Cell(28,5,'{VirtueMartDeliveryNumberLabel}',0,0,'C');
      $this->Ln(4);
      $this->SetX(-107);
      $this->SetFont('Arial','',9);
      if({VirtueMartIsBill}) {
         $this->Cell(24,5,'{VirtueMartBillNumber}',0,0,'C');
      } else {
         $this->Cell(24,5,'{VirtueMartDate}',0,0,'L');
      }

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on July 31, 2006, 21:25:56 pm
I did'nt see any difference between my ... only the font you use "Arial" and i use "helvetica"

If you don't use a font listing in /classes/pdf153/font/, you can have some problem, see that first ...

Good luck
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: rkowch on July 31, 2006, 22:05:14 pm
I see, I see... Now I've changed Arial in helvetica, but it still obtain the same bug... :-(

Is it so crazy to put an PDF-File into an E-Mail... I need this feature! ;-)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: BRAINS on August 10, 2006, 11:35:28 am
Hi All

I have managed to get the script working really well.....thankyou!!

Has anyone managed to get the 'ATTRIBUTES' to be displayed on single lines in the PDF.

I have a lot of attributes to display and currently everything is displayed on one single line and hence most of it is not viewable on the PDF.

I want to display the attibutes on a new line for each one

For example:

Size: XL
Colour: Red
Message: Hello

etc

I know that the template file (delivery_pdf.php) needs to be updated....around line 214:

if(!empty($attribute)) {
         $this->Cell(30,5,'',0,0,'L');
         $this->Cell(130,5,"(".$attribute.")",0,0,'L');
         $this->Ln(5);

Question....How do I get the attributes to show on single lines?

Can someone please provide the additional code if you know how or point me in the right direction (considering limited programming skills)

Many thanks

Paddy

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: shemzone on August 14, 2006, 20:50:08 pm
Hello everybody and many thanks to Mr_Smurf for this great hack.
I'm trying out it.
Everything seems to be ok except when I want to create the pdf by clicking on the PDF icon.
It creates a pdf which contains only the following lines:

Code: [Select]
<br />
<b>Parse error</b>:  syntax error, unexpected T_STRING in <b>/home/[my_site]/www/dev/administrator/components/com_virtuemart/classes/ps_delivery.php(514) : eval()'d code</b> on line <b>72</b><br />
<br />
<b>Fatal error</b>:  Cannot instantiate non-existent class:  pdf in <b>/home/[my_site]/www/dev/administrator/components/com_virtuemart/classes/ps_delivery.php</b> on line <b>515</b><br />

I guess the two errors have no relationship between them.

By editing ps_delivery.php, I found this around the lines which are pointed in the error message:
Code: [Select]
eval( '?>'.$html.'<?php ' );
$pdf = new PDF();

I didn't found any double quotes misplaced nor missing comma at the end of the instructions.

Is there something wrong in my installation? (I'm pretty sure I've follown every step).

Cheers
Fred
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: jocke4u on August 15, 2006, 18:36:31 pm
Anyone that have got GIF files working?

I have installed the addon etc but it says in the PDF that the image could not be opened.

Any ideas?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Shibumi on August 17, 2006, 05:46:12 am
are the images .png format?  try .jpg images instead if they are
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Velish on August 18, 2006, 12:07:17 pm
Hi Guys,

I have a couple of questions and have read the whole forum post and they arent answered from what I can see & I dont understand the README instructions at all.

First...
Which folders are supposed to be uploaded to the server?
Second...
Where on the server should the files be uploaded?
Thrid...
What does "patch -p1" mean?

Cheers
Vel
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: jocke4u on August 21, 2006, 22:40:15 pm
This is a very nice addon and to take it one step further....it would be nice to have tracking number to be able to provide package tracking for the customers. There is something done for the UPS (http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=15676.msg51876#msg51876) but I maybe think it would be better to have it attached to the delivery instead of the order as Ralf have done it.

What do you think?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: SKSolutions on August 25, 2006, 10:19:29 am
Hi @ll,

first, sorry for my bad english.

I got a problem here. I tried to follow the instructions and i got also the Tab for the delivery display. But there is nothing inside. I found out that there must be a problem with the language-file.

Here my question --> If i want to use the german language, what i have to do and how?

Thanks
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: jocke4u on August 25, 2006, 15:27:29 pm
Take the english translation that are in the text file and copy/paste it into your german version. Then translate it if you want to.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Troubleshooter on August 27, 2006, 16:18:15 pm
Hi Mr. Smurf

I only want to tell u: This is a very great add-on and thank u very much for this. I know how difficult the support is and u do ur job very good here.

I only want remember u for the question about this:

Quote
@mr_smurf

thanks a lot for this hack is very important for me

ther is an error:

i explain it:

i have an order of quantity 1 (one)
when i do an invoice of 1 (one) and than i delete that, quantity in order remain 1 (one) but the remained quantity is -1 (minus one)
that quantity must return to 0 (zero)

ciao
jk

I have the same problem, but its not really important. So if u have the time, u can take a look or give me a reference and i try it byself...
Title: !
Post by: SKSolutions on August 28, 2006, 17:04:23 pm
to jocke4u,

thank you very much. Works!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: shemzone on August 28, 2006, 21:54:04 pm
Hi people!
Am I the only one to have met these errors when the PDF files try to generate? (see my previous post quoted below)
Thanks for your time.
Fred

Hello everybody and many thanks to Mr_Smurf for this great hack.
I'm trying out it.
Everything seems to be ok except when I want to create the pdf by clicking on the PDF icon.
It creates a pdf which contains only the following lines:

Code: [Select]
<br />
<b>Parse error</b>:  syntax error, unexpected T_STRING in <b>/home/[my_site]/www/dev/administrator/components/com_virtuemart/classes/ps_delivery.php(514) : eval()'d code</b> on line <b>72</b><br />
<br />
<b>Fatal error</b>:  Cannot instantiate non-existent class:  pdf in <b>/home/[my_site]/www/dev/administrator/components/com_virtuemart/classes/ps_delivery.php</b> on line <b>515</b><br />

I guess the two errors have no relationship between them.

By editing ps_delivery.php, I found this around the lines which are pointed in the error message:
Code: [Select]
eval( '?>'.$html.'<?php ' );
$pdf = new PDF();

I didn't found any double quotes misplaced nor missing comma at the end of the instructions.

Is there something wrong in my installation? (I'm pretty sure I've follown every step).

Cheers
Fred

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Troubleshooter on August 29, 2006, 17:36:11 pm
try to upload this class again, maybe its a transfer-problem...
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: shemzone on August 29, 2006, 18:02:25 pm
try to upload this class again, maybe its a transfer-problem...

Still unlucky... I did a new transfer/new dowload after to have delete the previous. Same errors.
Thanks anyway
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Michael Christensen on September 07, 2006, 21:09:11 pm
Hi Mr. smurf, It seem that this add on is what I need, but I cant understand the Installation procedure.
Where do I put the files?  I dont understand where to put them, in what directorieshould I put what in?
Can anyone help ?

Hope hear from you
/best regards,
Mobimob
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Michael Christensen on September 07, 2006, 21:11:49 pm
Hi I dont understand the Installation procedure, where do I put the files, in what directory and so on. Can anyone help me?
Best regards,
Mobimob
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on September 07, 2006, 22:17:39 pm
Hi

Do you have gzip enabled in your J! configuration?


Hi people!
Am I the only one to have met these errors when the PDF files try to generate? (see my previous post quoted below)
Thanks for your time.
Fred

Hello everybody and many thanks to Mr_Smurf for this great hack.
I'm trying out it.
Everything seems to be ok except when I want to create the pdf by clicking on the PDF icon.
It creates a pdf which contains only the following lines:

Code: [Select]
<br />
<b>Parse error</b>:  syntax error, unexpected T_STRING in <b>/home/[my_site]/www/dev/administrator/components/com_virtuemart/classes/ps_delivery.php(514) : eval()'d code</b> on line <b>72</b><br />
<br />
<b>Fatal error</b>:  Cannot instantiate non-existent class:  pdf in <b>/home/[my_site]/www/dev/administrator/components/com_virtuemart/classes/ps_delivery.php</b> on line <b>515</b><br />

I guess the two errors have no relationship between them.

By editing ps_delivery.php, I found this around the lines which are pointed in the error message:
Code: [Select]
eval( '?>'.$html.'<?php ' );
$pdf = new PDF();

I didn't found any double quotes misplaced nor missing comma at the end of the instructions.

Is there something wrong in my installation? (I'm pretty sure I've follown every step).

Cheers
Fred


Regards
Iqapps
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on September 07, 2006, 22:19:01 pm
Hi

Version of VM. have you read readme file.

Hi I dont understand the Installation procedure, where do I put the files, in what directory and so on. Can anyone help me?
Best regards,
Mobimob

Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Michael Christensen on September 12, 2006, 21:51:11 pm
Hi, can anyone tell me how to install it. I cant understand the readme file, its a bit confusing.

Please help me someone.?
I'm running version 1.0.6 of virtuemart.


/mobimob
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: pitti on September 18, 2006, 22:05:06 pm
Mr.Smurf: works this with 1.0.7? some known problems?

Thx.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on September 18, 2006, 22:13:16 pm
Hi

Yes it works with 1.0.7...

Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on September 18, 2006, 22:16:17 pm
Hi

Hi, can anyone tell me how to install it. I cant understand the readme file, its a bit confusing.
Please help me someone.?
I'm running version 1.0.6 of virtuemart.
/mobimob

I can send you modified fileds if you wish...send me pm with your e-mail adress...

P.S
Upgrade your VM to 1.0.7

Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: shemzone on September 18, 2006, 22:18:02 pm
Hi IQAPPS. I notice that you took lead on that thread.
Do you maintain officially this hack? Are you formelly Mr Smurf?  :)

By the way, I activated GZip but it doesn't work more...
Cheers

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on September 18, 2006, 22:24:28 pm
Hi

Hi IQAPPS. I notice that you took lead on that thread.
Do you maintain officially this hack? Are you formelly Mr Smurf?  :)
By the way, I activated GZip but it doesn't work more...
Cheers

No I am not Mr_Smurf...

Yes this is right you can't have Gzip enabled!
Back to your problem do you have unzip pdf153 to \administrator\components\com_virtuemart\classes\. Please check if you have only one deepht in this folder.

Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: shemzone on September 18, 2006, 22:33:04 pm
Hereunder is my paths:
/www/administrator/components/com_virtuemart/classes/pdf153/

inside:
font <= a directory
fpdf.php


I don't know what's going on as I follown every step.
Did you ever heard about this error with the hack? Am I the only one?

Thanks for your time.
I will retry a new install and will repost the results.

Cheers
Fred
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on September 18, 2006, 22:59:01 pm
Hi

Vhat of VM version you have?
Hereunder is my paths:
/www/administrator/components/com_virtuemart/classes/pdf153/
inside:
font <= a directory
fpdf.php
I don't know what's going on as I follown every step.
Did you ever heard about this error with the hack? Am I the only one?
Thanks for your time.
I will retry a new install and will repost the results.

Reagards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: shemzone on September 18, 2006, 23:14:51 pm
VM 106 under J 1.0.11.
I Don't want to upgrade to 107 as I applied many of the fixes since J 10.11 was out. And one of the web sites where I want to add the hack is a already a lot modified. And I'm so tired to play with WinMerge (excellent tool by the way) at each time a new release of VM comes out  :D.

I will try on a new fresh install. Maybe the issue will be solved in this way...
If there is no way to make it work, I will forget it... Dommage... It sound very usefull...
Cheers
Fred
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mr_Smurf on September 18, 2006, 23:46:39 pm
iqapps1 thanks for the work you've done helping people in this thread, I really appreciate it.
Title: Re: Invoice/Receipt/DeliveryNote Addon
Post by: mifi_bamberg on September 21, 2006, 16:30:40 pm
Hi @ all,

i have a problem with the PDF building!

i get the following in Lines in the Apache log, and a blank white IE-window when click the Icon for the Invoice.

[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Undefined index:  item_total in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 558, referer: http://xxx/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Undefined index:  item_total in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 559, referer: http://xxx/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Undefined index:  item_total in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 560, referer: http://xxxl/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Undefined variable: auth in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 562, referer: http://xxx/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Use of undefined constant item - assumed 'item' in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php(514) : eval()'d code on line 205, referer: http://xxx/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Use of undefined constant sum - assumed 'sum' in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php(514) : eval()'d code on line 206, referer: http://xxx/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Undefined variable: auth in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 562, referer: http://xxx/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Use of undefined constant item - assumed 'item' in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php(514) : eval()'d code on line 205, referer: http://xxx/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Use of undefined constant sum - assumed 'sum' in /srv/www/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php(514) : eval()'d code on line 206, referer: http://xxx/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error]  PHP Notice:  Undefined variable: auth in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 562, referer: http://xxx/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Use of undefined constant item - assumed 'item' in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php(514) : eval()'d code on line 205, referer: http://xxx/administrator/index2.php
[Thu Sep 21 16:11:04 2006] [error] PHP Notice:  Use of undefined constant sum - assumed 'sum' in /srv/www/vhosts/xxx/html/administrator/components/com_virtuemart/classes/ps_delivery.php(514) : eval()'d code on line 206, referer: http://xxx/administrator/index2.php

Please help!! ???

Thanks.

Cu mifi_bamberg :)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on September 21, 2006, 17:14:04 pm
Hi

I must ask you to..Do you have Gzip enabled in your J! configuration..?


Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mackelito on October 02, 2006, 15:41:40 pm
will this feature be able to install as a "real plugin"? is this hack tested under VM 1.0.7?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on October 02, 2006, 16:08:59 pm
Hi

will this feature be able to install as a "real plugin"? is this hack tested under VM 1.0.7?

This hack maybe will be included on next versions of VM?

You need to install this hack manualy....

Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: mike420 on October 04, 2006, 13:43:53 pm
whin I click on save I get this message:

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in H:\Server\htdocs\sbwd\wholesale\administrator\components\com_virtuemart\classes\ps_delivery.php on line 35.

Any idea why?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gby on October 13, 2006, 20:39:56 pm
Hi,

A little mistake when you have differents adress : shiping and billing, in delivery_pdf.php

On 2 lines, you must have that :
Code: [Select]
$this->Cell(0,0,'{VirtueMartSTZip} {VirtueMartSTCity}',0,0,'L');
...
$this->Cell(0,0,'{VirtueMartBTZip} {VirtueMartBTCity}',0,0,'L');

and not that :
Code: [Select]
$this->Cell(0,0,'{VirtueMartSTZip} {VirtueMartBTCity}',0,0,'L');
...
$this->Cell(0,0,'{VirtueMartBTZip} {VirtueMartSTCity}',0,0,'L');

Good luck
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Vdub on October 29, 2006, 13:40:37 pm
Unfortunately as a newbie I do not understand the installation instuctions
 
For example the instructions below, what do they mean, 
 
Quote
Patch order.order_print.php

    cp {document_root}/administrator/components/com_virtuemart/html/order.order_print.php \
        {document_root}/administrator/components/com_virtuemart/html/order.order_print.orig.php
       
    patch -p1 {document_root}/administrator/components/com_virtuemart/html/order.order_print.php \
        order.order_print.diff 

I presume for the instructions below all i need to do is copy the folders across to the relevant places on the severt
Quote
Install pdf template

    cd templates
    cp -r * {document_root}/administrator/components/com_virtuemart/html/templates
    cd ..
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: HulaQueen on October 29, 2006, 23:19:57 pm
For the first part

cp = copy

They are having you back up the order_print file before making the changes.

Patch = this is the file you are going to change
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: cvinh on November 03, 2006, 22:19:48 pm
Hello chirng, i have the same pb. Did you fix it  ?

sincerely

Cyril
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: cvinh on November 03, 2006, 22:23:04 pm
(the 'addDelivery is not a valid function' message when i create the delevery note)

Cyril
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: Fnark on November 06, 2006, 11:46:32 am
Hi there,

this addon is a great idea, but I have two issues:
- The addon does generate a PDF, but Adobe Reader cannot read it because of compatibility issues. Adobe Reader suggests that there might be an encoding problem that may happen some times when sending a pdf by email. So actually I have not yet seen an invoice. :-)
- Since in Germany invoice numbers have to be sequential, I would like to have a form field where the addon suggests an invoice number, but allows it to be edited. This is important when one part of your sales happens offline and one part is done at the online shop.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Sean Goodwin on November 06, 2006, 12:46:00 pm
Sorry to ask but is there any way we can get a revised posing here of all of the files plus the instructions as they are now. Trying to install files and then do all of the changes listed in the previous 13 pages is a bit of a nightmare.

I realise this is all free and I don't mean to offend, it would just be nice to get to a point in time version of this excellent addon. Keep up the good work.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: mark R on November 06, 2006, 14:36:53 pm
I also have the problem with PDF creation

running addon with 1.07
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Fnark on November 06, 2006, 16:19:32 pm
Duh!

I asked a friend to open the PDF on his computer; apparently the PDF format cannot handle GIFs (correct me if I'm wrong?), and I currently have all my logos as GIFs. I gonna try to use JPGs instead.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Fnark on November 06, 2006, 16:42:18 pm
YEEHAH! Looks great!
I got it to work, at least in IE;
I dont know why it doesnt work in Firefox at my place but I guess this is not the fault of this plugin.

The only thing that is funny is that it doesnt display the encoded euro sign as €, but as &euro;
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: mark R on November 07, 2006, 10:38:48 am
I also have the problem where the currency symbol is not being translated correctly.

any ideas? 
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: G on November 15, 2006, 22:09:34 pm
First thanks for the great add-on

Does someone allready now a solution for this?
I don't know a lot of php but maybe it's in ps_delivery.php round rule 532... ?

Quote
@mr_smurf

thanks a lot for this hack is very important for me

ther is an error:

i explain it:

i have an order of quantity 1 (one)
when i do an invoice of 1 (one) and than i delete that, quantity in order remain 1 (one) but the remained quantity is -1 (minus one)
that quantity must return to 0 (zero)

ciao
jk
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: bld on November 26, 2006, 08:03:44 am
Hi, I'm new here.
Thanks for your useful add-on, this is what I need.

Is it possible to add a menu or a list or link in Account Maintenance that will show the customer the invoices and delivery notes?
Maybe something like the Order Information list in Account Management

Thank you,

Budi
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: beno on November 27, 2006, 15:50:34 pm

The only thing that is funny is that it doesnt display the encoded euro sign as €, but as &euro;

Hi, I've found the solution for that problem...You should modify the shop's properties and set the simbol equal to € instead of &euro;
You could have a kind of error: virtuemart does not change the symbol. In this case you should manually update the table jos_vm_vendor changing the vendor_currency_display_style. You can do a query like this UPDATE jos_vm_vendor SET vendor_currency_display_style='1|€|2|,| .|3|1' WHERE vendor_name=[here put your vendor name].
I have done few tests so don't think this is the definitive solution, it should be one solution.
I'm sorry for my bad english, I'm Italian so if you want the description in italian contact me ;)

Bye
Alessandro
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: Michael Held on November 27, 2006, 18:48:07 pm
Hallo,
after many hours to install and fix problems I get an invoice as pdf-file. But I think in the file "delivery_pdf.php" is something wrong. In the field "billing-address" isn´t the city.

The city is in the delivery field. For me it is not possible to get all information name, addresses, zip-ode and city (both in the same line) in field address for bill.

Does anyone has a file which is working right?
Thank you for help
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: dougal on November 28, 2006, 13:23:18 pm
Thanks Mr Smurf (and all who have contributed) for this it has all installed like clockwork. Just one thing, and i'm sure i'm being daft, But, when i have the order marked as shipped the tab still has "Not all products are delivered!" above the new delivery button. So, is this the reason i never get the "reciept" pdf button? The "reciept" button is the one i want most..... :P
Any help greatly appreciated
cheers
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Allan Nielsen on December 08, 2006, 08:47:02 am
Hi guys

Thanks a lot for a very helpful addon!
Installation went pretty good, had to add a few tables manually in the database.

But I do have a problem now with generating the pdf's
Delivery Note Works fine, but invoice is returning a few errors:

----------------------------------------------------

<br />
<b>Notice</b>:  Undefined index:  item_total in <b>..administrator\components\com_virtuemart\classes\ps_delivery.php</b> on line

<b>558</b><br />
<br />
<b>Notice</b>:  Undefined index:  item_total in <b>..administrator\components\com_virtuemart\classes\ps_delivery.php</b> on line

<b>559</b><br />
<br />
<b>Notice</b>:  Undefined index:  item_total in <b>..administrator\components\com_virtuemart\classes\ps_delivery.php</b> on line

<b>560</b><br />
<br />
<b>Notice</b>:  Undefined variable: auth in <b>..administrator\components\com_virtuemart\classes\ps_delivery.php</b> on line <b>562</b><br

/>
<br />
<b>Notice</b>:  Use of undefined constant item - assumed 'item' in <b>..administrator\components\com_virtuemart\classes\ps_delivery.php(514)

: eval()'d code</b> on line <b>204</b><br />
<br />
<b>Notice</b>:  Use of undefined constant sum - assumed 'sum' in <b>..administrator\components\com_virtuemart\classes\ps_delivery.php(514) :

eval()'d code</b> on line <b>205</b><br />
<B>FPDF error: </B>Some data has already been output, can't send PDF file

----------------------------------------------------------------

Can anybody help me on this one?

Thanks
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Fnark on December 12, 2006, 11:51:58 am
there seems to be a slash missing in all your paths? right after the two dots.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: veon on December 13, 2006, 14:20:03 pm
Hello, I wonder how to make PDF invoices working with UTF-8 encoding? So I can have proper characters in the PDF output?

Thanks, for any idea...

veon
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Allan Nielsen on December 14, 2006, 16:18:46 pm
there seems to be a slash missing in all your paths? right after the two dots.

I removed those. They just showed the entire path....
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: riesengross on December 21, 2006, 11:25:55 am
Hello Mr. Smurf,

thanx for this exvellent work. I have a little problem, in Germany it's necessary to show the customers the product prices including tax.

I found out that these lines are responsible for creating the list of products

   function ContentRow($sku, $product, $attribute, $quantity, $delivered, $remaining, $price) {
      global $CURRENCY_DISPLAY;
      $this->SetFont('Arial','',9);
      $this->Cell(30,5,$sku,0,0,'L');
      if("{VirtueMartIsBill}") {
         $this->Cell(65,5,$product,0,0,'L');
         $this->Cell(10,5,$quantity,0,0,'C');
         $this->Cell(10,5,$delivered,0,0,'C');
         $this->Cell(10,5,$remaining,0,0,'C');
         $this->Cell(15,5,$CURRENCY_DISPLAY->getFullValue($price[item]),0,0,'C');
         $this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($price[sum]),0,0,'R');

how must I change them to show the prices including tax.

Thanks for your help.

Best regards

Jürgen
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: vik on December 22, 2006, 00:40:34 am
Is it possible to make invoice, delivery note in HTML not PDF. Or make PDF write russian?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: crackdaddy on January 04, 2007, 17:34:29 pm
you need to kill this thread and restart with a fresh version.
 its way to freggin long to read.....
id reather build my own then try and figure out
if your first post with the files works correct
or if i have to read 15 pages
and apply all the fixes people are mentioning
..please shoot me in the face
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Vdub on January 05, 2007, 00:12:30 am
Good addon, but......   Reciept and Invoice text displays &pound; rather than the £ symbol, any ideas on how to resolve.

I presume that it is picking up the &pound; form VirtueMart > Store > Edit Store > Currency Symbol 
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: jaripetteri on January 11, 2007, 15:03:05 pm
How I change dates printing order in pdf? Now its Y-m-d but I like to have d-m-Y.

Code: (ps_delivery.php) [Select]
...
$html = str_replace('{VirtueMartDate}',date( 'Y-m-d' ),$html);
$html = str_replace('{VirtueMartOrderDate}',$dbo->f('order_date'),$html);
$html = str_replace('{VirtueMartDueDate}',$dbb->f('bill_due'),$html);
...

first one is fine just change 'Y-m-d' to 'd-m-Y' but how to change printing order on OrderDate or DueDate? What is $dbb->f ?

[edit]Its allways good to ask... I just find out solution for this. dbb and dbo are made earlier on same file and there are Y-m-d's to change to d-m-Y. Now its just fine...  8) [/edit]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Lee Jordan on January 17, 2007, 03:59:25 am
Hi - Complete newbie here. Have been reading this thread all night (and now into the morning). Don't know a lot about PHP etc but have soldiered through and with the help of all the answers on this thread have got the invoicing working - and I must say it is an excellent add-on for something that was sorely missing from Virtumart. Well Done.

I've got all the dates and currency in UK format now, but could someone just tell me how to remove the "terms of payment" and "delay interest" fields from the invoice please? Don't need them on there and it will only confuse customers.

Thanks.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Vdub on January 17, 2007, 14:30:39 pm
The easiest way would be to open the language file and where you find the following

Code: [Select]
var $_VM_DELIVERY_PRINT_BILL_TERMS_LBL = "Terms of payment";
 var $_VM_DELIVERY_PRINT_OVERDUE_INTEREST_LBL = "Delay interest";

delete the text Terms of payment  &  Delay interest leaving the following 

Code: [Select]
var $_VM_DELIVERY_PRINT_BILL_TERMS_LBL = "";
var $_VM_DELIVERY_PRINT_OVERDUE_INTEREST_LBL = "";

The php engine will then not have any text to echo out.


How did  you solve the problem on the PDF generated invoice showing &pound; rather than £ as the currency symbol

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Lee Jordan on January 17, 2007, 14:57:49 pm
I went into myphpadmin, opened the vendor table and manually edited the entry for the currency symbol from &pound to £.

Thanks for that. I'll give it a try later. Can't ftp onto my cgi webspace on plusnet at the minute. They really are pants.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Lee Jordan on January 17, 2007, 16:11:57 pm
Got onto the cgi space and edited english.php to remove those 2 bits of text. It has removed the text, but still have the values for them on the invoice. Where would I rem this out/remove these values from the invoice?

Thanks
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: Lisa on January 21, 2007, 02:11:17 am
This works great for me with 2 small problems:
Has anyone else had either of these problems?

Thanks, Mr_Smurf for a great mod, and riesengross for your helpful instructions!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: shemzone on January 22, 2007, 16:58:38 pm
Hi everyone.
New install, new website, similar issue as it happened a few months ago:

Everything seems to be ok except when I want to create the pdf by clicking on the PDF icon.
It creates a pdf which contains only the following lines:

Code: [Select]
<br />
<b>Parse error</b>:  parse error in <b>W:\www\joomla\administrator\components\com_virtuemart\classes\ps_delivery.php(514) : eval()'d code</b> on line <b>72</b><br />
<br />
<b>Fatal error</b>:  Cannot instantiate non-existent class:  pdf in <b>W:\www\joomla\administrator\components\com_virtuemart\classes\ps_delivery.php</b> on line <b>515</b><br />

I guess the two errors have no relationship between them.

By editing ps_delivery.php, I found this around the lines which are pointed in the error message:
Code: [Select]
eval( '?>'.$html.'<?php ' );
$pdf = new PDF();

I'm pretty sure I've done correctly the installation as everything works fine excepting the PDF generation.

Hereunder my sysinfo:
Code: [Select]
Version PHP: 4.3.11
Serveur Web: Apache/2.0.50 (Win32) PHP/4.3.11
Interface serveur Web vers PHP: apache2handler
Version Joomla!: Joomla! 1.0.12 Stable [ Sunfire ] 25 December 2006 01:00 UTC
Virtuemart: 1.0.9
GZip : disabled

Could someone repost a whole working script, including template, pdf153, classes?
I'd love to make it work

Thanks a lot.
Cheers
Fred
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: jaripetteri on January 22, 2007, 17:04:26 pm
Has anyone manage to get this work on joomla 1.0.12 / virtuemart 1.0.9? I have it on J 1.0.11 / VM 1.0.7 setup but like to do some update...
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: EyeScream on January 24, 2007, 00:03:11 am
Has anyone manage to get this work on joomla 1.0.12 / virtuemart 1.0.9? I have it on J 1.0.11 / VM 1.0.7 setup but like to do some update...
I´m using this setup (with swedish translation) and everything seems to be working just fine!

By the way, thanks Mr. Smurf for an excellent addon! Really helps me a lot!  :)

Hmmm... I got an idea... How about the possibility to let the customer have access to the PDF documents related to his/her order(s) from their personal VM page (where they can view pending and previous orders). Maybe allow access after setting the order status to "Complete" if the PDFs in question are receipts (as in my case)?

Anyone having any ideas on how to approach this?

/..EyeScream
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: bruno on January 24, 2007, 23:17:25 pm
Can someone attach the file and the what to do for have working this addon with Joomla 1.0.12 and VM 1.0.9?
   
I am trying on localhost with XAMPP, have installed tha "Update 2006-01-30: New bugfixed release attached" and the DeliveryNote is ok but with Invoice and Receipt Adobe Reader suggests that there might be an encoding problem that may happen some times when sending a pdf by email  ???

   
thanks in advance for help
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: bruno on January 26, 2007, 17:26:12 pm
Someone can explain where to try the problem?

Thanks
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: bruno on January 28, 2007, 03:05:23 am
Hi Mr_Smurf,
I think have found my problem, your splendid integration not work with the Currency converter enhancement (+tooltip)

http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=23853.msg62234#msg62234 (http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=23853.msg62234#msg62234)

Can help me please make your solution to work?
The problem is in the $CURRENCY_DISPLAY->getFullValue($price[item]),0,0,'C'), have inserted many
Code: [Select]
str_replace("&euro;","€", $CURRENCY_DISPLAY->getFullValue($the_variable_containg_the price)) and the Delivery Note is ok but the Invoice and Receipt are not generated

sorry for my english and thank.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Isak Andersen on February 05, 2007, 16:07:13 pm
First of all, excellent addon, thanks a lot.
However, Mark, the additional lines in the /classes/ps_delivery.php, line 545 as shown above;


Hi

to those having problems with the invoice and receipt pdf's not being generated.

I have made a few changes to the files and now I get the pdf's, still a little bit more work to do but they are generated. I dont know if it is because I'm using PHP 5.

but in templates\delivery change delivery_pdf.php lines 204 & 205 change

Code: [Select]
$this->Cell(15,5,$CURRENCY_DISPLAY->getFullValue($price[item]),0,0,'C');
$this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($price[sum]),0,0,'R');

to

Code: [Select]
$this->Cell(15,5,$CURRENCY_DISPLAY->getFullValue($price['item']),0,0,'C');
$this->Cell(20,5,$CURRENCY_DISPLAY->getFullValue($price['sum']),0,0,'R');

in classes/ps_delivery.php change line 545

Code: [Select]
$price_with_tax = array();
$price_without_tax = array();
$price_tax = array();
$displayed_price = array();

to

Code: [Select]
$price_with_tax = array();
$price_without_tax = array();
$price_tax = array();
$displayed_price = array();
            $without_tax['item_total'] = 0;
            $with_tax['item_total'] = 0;
            $tax['item_total'] = 0;

and liine 566

Code: [Select]
if( $auth["show_price_including_tax"] )
to

Code: [Select]
if( @$auth["show_price_including_tax"] )
This is now generating the pdf's. :)

I hope this helps

Mark

the following additional lines (i think it is already present in the current release of the file);

            $without_tax['item_total'] = 0;
            $with_tax['item_total'] = 0;
            $tax['item_total'] = 0;

should be added before the while loop, that is, approx. on line 534, otherwise it will not summarise if you have several different itmes on order, like this:

      $db->query($q);

            $without_tax['item_total'] = 0;
            $with_tax['item_total'] = 0;
            $tax['item_total'] = 0;

      while ($db->next_record()) {
         // reuse dbv
         $q = "SELECT SUM(product_quantity_delivered) as delivered FROM #__{vm}_delivery_item ".
            "WHERE vendor_id = ".$_SESSION["ps_vendor_id"]." ".
            "AND order_item_id = ".$db->f('order_item_id');
         $dbv->query($q);
         $dbv->next_record();

         $remaining = $db->f('product_quantity') - $dbv->f('delivered');

         $price_with_tax = array();
         $price_without_tax = array();
         $price_tax = array();
         $displayed_price = array();

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: N6REJ on February 06, 2007, 20:47:30 pm
Mr. Smurf, will this allow you to add a sale that has already been paid via paypal?
I have some customers that circumvent the website and just send paypal payment.   I'm not sure what to do with these folks.

Troy
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Lee Jordan on February 09, 2007, 13:17:38 pm
Got onto the cgi space and edited english.php to remove those 2 bits of text. It has removed the text, but still have the values for them on the invoice. Where would I rem this out/remove these values from the invoice?

Thanks

Anyone have any ideas on this? Want to start using this on the wedsite but can't until this is resolved. Thanks.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: crackdaddy on February 13, 2007, 17:10:45 pm
i have modded out this mod, as the pdf creation process apparently sux, and creates an hughe loop of server errors, and th efact i dont need them... so i have removed all th epdf functions and replaced them with a shipment and order tracking function. i will post the mod, when i am totally done with it, which shouldnt be much longer.

here the post for for my mod
http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=25740.msg69973#msg69973 (http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=25740.msg69973#msg69973)


[attachment cleanup by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: N6REJ on February 13, 2007, 17:19:09 pm
looking nice
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: sebastian on February 13, 2007, 19:39:14 pm

  • Receipt button & link are missing (Invoice & Delivery Note are present & working fine)

same problem here...

[attachment cleanup by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: veon on February 22, 2007, 00:42:44 am
Hi shoppers & vendors!

I have a problem with VirtueMart since I installed this invoice addon. When I make the final click for confirming the order in the frontend, nothing happens, ie. the order is stored inside DB but the page doesn't reload properly..

got any ideas?

i tried both joomla 1.0.11 & 1.0.12, virtuemart 1.0.7 & 1.0.9

thanks, veon
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mike Wyatt on February 25, 2007, 01:48:05 am
Its up and working beautifully. Thanks!

Now... How do I edit the headings and content of the invoice/packing slip? (I'm not php savvy...)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: ssnobben on February 26, 2007, 19:51:14 pm
Hi Mr_Smurf,
I think have found my problem, your splendid integration not work with the Currency converter enhancement (+tooltip)

http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=23853.msg62234#msg62234 (http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=23853.msg62234#msg62234)

Can help me please make your solution to work?
The problem is in the $CURRENCY_DISPLAY->getFullValue($price[item]),0,0,'C'), have inserted many
Code: [Select]
str_replace("&euro;","€", $CURRENCY_DISPLAY->getFullValue($the_variable_containg_the price)) and the Delivery Note is ok but the Invoice and Receipt are not generated

sorry for my english and thank.

I think Mr Smurf has disappear from this forums and VM. This addon is very useful and should been taken care of into the VM core or someone doing a stable new version of it!!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: N6REJ on March 03, 2007, 00:10:32 am
submit a feature request for just that.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Nick on March 11, 2007, 21:46:39 pm
This is an awesome addon and imho should be integrated in the next version of a great component.

Any thoughts on how we could integrate a link from the front end in account.order_details to the pdf's?

I would like my clients to be able to download their automatically produced invoices.  I guess there are few steps:
- make the invoice and automatic affair with preset criteria
- make the url for the pdf outside the admin mode....

My php is not up to that - any pointers anyone?
Thanks


Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Jim Strong on March 22, 2007, 18:10:29 pm
Has anyone treid to use this great little module with a Payment Method discount? I don't know what it is doing, but the tax and total calculations don't agree with the Purchase Order and look incorrect:-

Assume the box "Subtract payment discount before tax/shipping?" in config is ticked, a $100 product and a 10% tax rate:-

                            Purchase Order          Invoice
Net Price                $100                       $100
Gross Price             $110                       $110
Discount                $ 10                        $ 10
so far so good, but then:-
Tax                       $   9                        $  9.09
Total                     $ 99                        $100

I have a customer who uses payment method discount a lot and who was really desperate to have an invoicing function, but it looiks like I'll have to disappoint him unless anyone has any ideas how to address this! :-(

Jim

 
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: ssnobben on April 02, 2007, 14:33:42 pm
Yes but how do you do that?

I am a newbie ? :-)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Rob Molenaar on April 15, 2007, 13:16:12 pm
I got the following error after installing the invoice add-on:

--- administrator/components/com_virtuemart/html/order.order_print.orig.php 2005-11-15 23:18:46.000000000 +0100 +++ administrator/components/com_virtuemart/html/order.order_print.php 2005-11-19 15:50:46.771347792 +0100 @@ -128,6 +128,7 @@
Fatal error: Call to a member function on a non-object in W:\www\Context\administrator\components\com_virtuemart\html\order.order_print.php on line 6
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on April 15, 2007, 21:45:45 pm
Hi

I got the following error after installing the invoice add-on:

--- administrator/components/com_virtuemart/html/order.order_print.orig.php 2005-11-15 23:18:46.000000000 +0100 +++ administrator/components/com_virtuemart/html/order.order_print.php 2005-11-19 15:50:46.771347792 +0100 @@ -128,6 +128,7 @@
Fatal error: Call to a member function on a non-object in W:\www\Context\administrator\components\com_virtuemart\html\order.order_print.php on line 6

You don't need to replace complete order.order_print.php you need to add only one row with code from order.order_print.diff

For VM 1.0.10 you need to ad this code on line 133 not 128!
Code: [Select]
  require_once(CLASSPATH.'ps_order_delivery.php');
Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Rob Molenaar on April 16, 2007, 09:22:17 am
Thanks iqapps1! that helped me out!

Maybe you can help me also with the following...searched the whole day for it:

- The price/unit + Price on the invoice are without VAT. Where do I change it to with VAT?
- I want to let the invoice no. + order no. begin with for example F000001. I read about it to change this in de database but can't figure it out where or how to change.

Hope you can help me out again. I really appreciate.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on April 16, 2007, 18:58:47 pm
Hi
One problem at time...

- The price/unit + Price on the invoice are without VAT. Where do I change it to with VAT?

I think your install of delivery hack is't completed....need to see your url...you can send me a PM!?

Regards
IQAPPS
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Rob Molenaar on April 17, 2007, 11:41:05 am
I only installed it local for testing. sorry.
Maybe u know in what file I can look to change this?
Also strange to see that I don't see delivery addres or invoice addres.

If its a problem for you to tell what's gone wrong I will try to install it on the server.
Maybe I forgot something with installation? I just followed the install instructions
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iqapps1 on April 18, 2007, 14:12:59 pm
Hi

I only installed it local for testing. sorry.
Maybe u know in what file I can look to change this?
Also strange to see that I don't see delivery addres or invoice addres.

If its a problem for you to tell what's gone wrong I will try to install it on the server.
Maybe I forgot something with installation? I just followed the install instructions

Can you create a invoice.....!?
If yes send me this invoice iqapps at hotmail dot com

Regards
IQAPPS
Title: What file to edit to change delivery note?
Post by: Mike Wyatt on April 26, 2007, 23:25:38 pm
"Address" is misspelled in the delivery note and I cannot find where to edit it! Can someone, please point me in the right direction? We really need to fix it! Thanks!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: lord_alan on April 27, 2007, 10:59:29 am
Can't you just "grep" for it?

Or, if you run M$oft - shame   :( - get Grep for Windows.... http://www.google.co.uk/search?source=ig&hl=en&q=grep+for+windows&btnG=Google+Search&meta= (http://www.google.co.uk/search?source=ig&hl=en&q=grep+for+windows&btnG=Google+Search&meta=)

Grep, BTW allows you to search for strings in files - a most invaluable tool.

Alan
Title: Re: What file to edit to change delivery note?
Post by: Rob Molenaar on April 28, 2007, 13:49:37 pm
"Address" is misspelled in the delivery note and I cannot find where to edit it! Can someone, please point me in the right direction? We really need to fix it! Thanks!

Where on the delivery note is Address misspelled?
Mostly you gave to change this in administrator\components\com_virtuemart\languages\[your languages file].php
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Mike Wyatt on May 07, 2007, 23:56:41 pm
It was "Billing Adress" on the delivery note. Fixed it. Thanks for pointing me to the right place!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: terry on May 13, 2007, 17:22:47 pm
i installed the new files of this hack and i have a problem with a generation of PDF file:

i get a blank page with this firefox error : C:\documenr\user\impost\temp\q0vdpwc.pdf the file not to be saved, because it is not possible to read the origin file.

VM 1.0.10
joomla 1.0.12
firefox 2.00.3
Adobe 7.0
Php version 4.4.6

Can you help please?
thanks
terry  :)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Rob Molenaar on May 13, 2007, 18:55:47 pm
Did you copied the files from the pdf153.tgz into ..\administrator\components\com_virtuemart\classes ?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: terry on May 14, 2007, 09:54:01 am
Hi Rob,thanks for your reply
Yes I copied all the files in the folder classes/pdf153

-->/ public_html / administrator / components / com_virtuemart / classes /pdf153/

Thanks,terry
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Rob Molenaar on May 21, 2007, 09:12:15 am
Terry,

Sorry for this late reaction but most time when you get a blank page ther is something wrong in your pdf.php file. Or dind't you change this file?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: adriano on May 27, 2007, 14:04:24 pm
hi...is there a way that users to show the cart with products full descprition in pdf format
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Micha on July 12, 2007, 03:09:15 am
Hi there,

I have installed all the files and everything is working fine except the last part, create a pdf  :-[ 
When i click @ one of the pdf links there's a pdf coming from 0 KB?

FireFox wants to open with Adobe =  OK but Adobe gives a error (= OK because the 0 byte file) 
IE open a blank page with absolute no information.

I have checked all files and they are there. Does anyone have a idea where i must find this error?
I also checked al the advice in this forum about "no pdf" but found no errors here on my side.

Micha

Joomla: 1.0.12
VM: 1.0.12
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Morten Frederiksen on July 19, 2007, 12:11:12 pm
Hi There

Where do i Grab the latest version of this hack - looks like a nice hack...

Morten
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: hobartimus on July 30, 2007, 02:52:52 am
I am also interested in the latest version. Is there something available for download?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: aravot on August 04, 2007, 20:20:55 pm
I have not read all 18 pages someone else could have taken over and be developing this But the original developer Mr_Smurf (http://virtuemart.net/index.php?option=com_smf&Itemid=71&action=profile;u=6733) hasn't logged in since September 2006, since than VM had couple of version changes.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished a
Post by: dougal on August 17, 2007, 18:04:46 pm
My invoices seem to  come up without tax rates, does anyone know how to show the tax on invoices created by this hack. Any help greatly appreciated.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: N6REJ on August 30, 2007, 19:07:33 pm
This thread is so old, I have no idea what its status is or what it really is supposed to do.  We need some sort of a system much like joomla has.  Would be much more effecient I think.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Micha on September 19, 2007, 00:54:12 am
If gzip compression is enabled in the server so that all pages that the server sends out are gziped, then this addon will brake..

It will send out the pdf file uncompressed and the client will try do decompress it and fail.

That was the fault for me. Now it work ;-)))
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Micha on September 19, 2007, 01:14:48 am
Smurf Its working now! Great!

I only want the date format as 19-09-2007.
I read something about it but i can't find where i must changes it. Can you help me?

Micha
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: David-Andrew on October 04, 2007, 13:56:49 pm
I am confirming:

This stil works on the latest Joomla 1.0.13 and latest Virtuemart! I just installed it in one go, no problems whatsoever! Great!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: konijn on October 14, 2007, 01:35:18 am
Hello,
 I try to let the add in also to work in Holland, but I get a few problems, wich I can help out with this forum, but know I dont get the answer....
After I click on a new delivery, a delivery order and a invoice are created. When i click on one of them, I get the follow message:
-------------------------
Not Found
The requested URL /administrator/index3.phpphp?page=order.order_print&func=deliveryNoteAsPDF&order_id=11&no_menu=1&no_html&delivery_id=17&option=com_virtuemart&gen=delnote was not found on this server.
---------------------------------
 Some times  it is working, but tonight I get this message most times.
I hope someone can help... Thanks

Jack
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last) - DATE FORMAT
Post by: Tony on October 15, 2007, 14:54:32 pm
To all those who have requested a change to the date format (d-m-Y) on the delivery note and invoice:

amend file administration/components/com_virtuemart/classes/ps_delivery.php

change:
$html = str_replace('{VirtueMartDate}',date( 'Y-m-d' ),$html);
to:
$html = str_replace('{VirtueMartDate}',date( 'd-m-Y' ),$html);

change:
$html = str_replace('{VirtueMartOrderDate}',$dbo->f('order_date'),$html);
to:
$html = str_replace('{VirtueMartOrderDate}',date( 'd-m-Y', strtotime ($dbo->f('order_date'))),$html);

change:
$html = str_replace('{VirtueMartBillDate}',$dbb->f('bill_date'),$html);
to:
$html = str_replace('{VirtueMartBillDate}',date( 'd-m-Y', strtotime ($dbo->f('bill_date'))),$html);

change:
$html = str_replace('{VirtueMartDueDate}',$dbb->f('bill_due'),$html);
to:
$html = str_replace('{VirtueMartDueDate}',date( 'd-m-Y', strtotime ($dbo->f('bill_due'))),$html);

Hope that helps some of you!

Cheers, Tony
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Isak Andersen on October 21, 2007, 20:57:46 pm
Hi, I had this hack working until I installed vm patch 1.013a, then "delivery" disappeared from my backend. It does not seem like the main file order.order_print.php has been changed (patched), så I do not know why. Does anyone have a solution to this yet?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last) SOLVED
Post by: pino on November 10, 2007, 23:16:27 pm
I've installed the addon (have the tab) but get these errors:
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/virtual/site56/fst/var/www/html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 35

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/virtual/site56/fst/var/www/html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 104

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/virtual/site56/fst/var/www/html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 218

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/virtual/site56/fst/var/www/html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 290

Anyone knows what to do where? I'm relativly new to this.

Pino
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: pino on November 13, 2007, 14:43:03 pm
I solved the earlier problem. Now another problem has occurred. When i want to make an invoice or receipt i get a page according to the attached file. Producing a Delivery note works fine.

How can i solve this?

Pino


[attachment cleanup by admin]
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: JW75 on November 20, 2007, 10:29:49 am
Is there a latest release somewhere to download? I can only find the one posted in the fist post. And because there seem to be many problems since I was wondering if a new release was made.

Thanks
JW
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: jdoyle on November 20, 2007, 14:41:29 pm
That version works fine for me - I used the already installed PDF creator and changed the pointer to it - other than that - works great.

Joomla 1.0.13
Virtumart 1.0.13a

Regards
John
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: PaulusB on December 18, 2007, 00:04:42 am
Is just moved my site and know i keep getting this error when i use the pdf functions.

<B>FPDF error: </B>Some data has already been output, can't send PDF file

The Gzip is off.

What can be the problem ? before the site was moved it all worked fine.

Maybe chmod ?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: malviv on December 28, 2007, 10:35:53 am
Is there a latest release somewhere to download? I can only find the one posted in the fist post. And because there seem to be many problems since I was wondering if a new release was made.


I too am interested in this mod/hack can we have an update posted at the end of the thread or a new thread started.  Did I read that it may be included in future VM versions?  Is that the case?

 Could I have a idiots guide to installation on-

Joomla 1.0.13
Virtumart 1.0.13a

as I really don't know where to start with this one (after download of delivery.tar from pg1 that is)

Many thanks...  Mal
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Quevi on December 29, 2007, 10:29:24 am
First of all I'd like to thank Mr. Smurf for this great Add-on.

I still have one little problem. I've installed everything as in the readme file but there is one thing that I don't understand:

How do I install the "admin.install_delivery_sql.php" ? I already created the tabled in MySQL but how can I add the functions??
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: johnemurphy on December 30, 2007, 01:02:17 am

Hmm, may have right, I will check that registration thing.
In both cases (Cancel and Save) I'm back directly from where I was when I opened the tab. Nothing happens.

Found the bug!

The bug is in fact in the order edit addon.. the form name in the order edit is the same as in the delivery addon.. The drawbacks of cut and paste ;)

If you rename the form in the edit order addon to editForm instead of deliveryForm things will magically start to work.

Could someone please explain what file is involved in this post.
I have been unable to add a new delivery, and after spending hours with this forum, it seems that this may be te answer I am looking for. 
The only file I can find that has form named deliveryForm is in the" ps_order_delivery.php" and when I change that the New Delivery Functions do not work.  Please Help
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: iphonethesolution.com on January 12, 2008, 21:57:10 pm
Me to, its great to work together to make things happen but please help us.   When a mod is finished, there should be a final zip file with an instruction guide.  You do all this work and an extra 10 minutes in notepad , just to explain how to install things wouldnt be to hard, now would it ?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: gjdb on January 24, 2008, 20:46:38 pm
Hi,
I have already installed this delivery addon in several sites.From version 11 till 13a no problem.

@QUEVI
To make the absolutely needed changes in the database: Run next script after you are logged in at backend using this url (first change to your domain):
    http://www.yourdomain.com/administrator/index2.php?option=com_virtuemart&page=admin.install_delivery_sql
'
I've tried to make also this addon easy to install for myself but maybe for you too (with readme file for quick install): http://www.flakkeeweer.nl/component/option,com_docman/task,cat_view/gid,92/Itemid,137/ (http://www.flakkeeweer.nl/component/option,com_docman/task,cat_view/gid,92/Itemid,137/)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: xenux on March 09, 2008, 21:31:16 pm
Hello,
The Invoice/Receipt/DeliveryNote Addon tool does not work with VM 1.0.14. What i had to do that iit works with 1.0.14. Does somebody have the same problem? Does somebody already have a solution for the problem? many thanks! i need help! ???
Title: Migration on VM 1.1
Post by: mmarfy on April 01, 2008, 13:30:46 pm
Dear Friends,
someone has ideas about the manner to migrate this wonderful feature on VM 1.1? Someone is working on it?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: H13 on April 03, 2008, 15:33:02 pm
Dear Friends,
someone has ideas about the manner to migrate this wonderful feature on VM 1.1? Someone is working on it?

Hi, see:
http://www.phoca.cz/documents/18-virtuemart/174-virtuemart-invoice-delivery-note-receipt

maybe it will help you.

Jan
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Gizmo on April 10, 2008, 12:39:09 pm
Hi,

I would like to have my Price/unit on the bill TAX included.
Any idea how I can realize this ?

Thanks,
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: 123123 on April 21, 2008, 16:11:10 pm
PLEASE HELP ME, I CANNOT UNDERSTAND ONE DAMN LINE ON THIS README, WHAT I HAVE TO DO!
DO I MUST UPLOAD ALL FILES JUST INTO THE MAIN DIR OR WHAT IS IT, PLEASE SOMEONE EXPLAIN EXACTLY WHAT WE HAVE TO DO!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: grA$ on April 21, 2008, 17:15:35 pm
Everybody understands your frustration, but please don't use 5 million points font to scream, it is an open source project made on his contributors spare time ... if u want instant response and support go to a paid solution, even i doubt that u got much more faster response.

Regards.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: 123123 on April 21, 2008, 20:17:40 pm
yeah sure open source, its an open waste!


i was so happy about that addon, but its a wackass shit already, made only for freaks. what is it worth if i cant install it?


damned!
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: 123123 on April 24, 2008, 11:07:23 am
Ok i installed it now all works except it doesnt generate a pdf invoice when i click to invoice or delivery.


TCPDF error: Some data has already been output, can't send PDF file

Please Help me.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Micha on October 18, 2008, 20:26:19 pm
 :'(After a long time i now have this hack working on my own site (made other sites work well). The problem was that the pdf file give the follow html error as output (pdf was download):

Code: [Select]
Parse error: syntax error, unexpected T_STRING in /home/babymore/public_html/administrator/components/com_virtuemart/classes/ps_delivery.php(514) : eval()'d code on line 80

Fatal error: Class 'PDF' not found in /home/babymore/public_html/administrator/components/com_virtuemart/classes/ps_delivery.php on line 515

The f....g problem was that i used the < in the shipping costs (damm). So check your settings for not normal signs. I was using: Delivery Europe <30KG
I'am just very VERY happy that i found the bug. Now i can use the pdf printer  :D
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Micha on October 18, 2008, 22:19:14 pm
TIP: Don't use the ' and < sign in your user en VM config data otherwise the pdf won't print. I had for example the city 's-Hertogenbosch and the ' sign was killing the pdf. Also in the delivery setup i had "TNT Post <20KG" The ' sign was also killing the pdf generation.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: hrk on October 28, 2008, 12:32:20 pm
Hi guys,

any vm 1.1 and joomla 1.015 version of this work?
searching up n down could not fine one at all.

tks
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Micha on January 03, 2009, 13:51:39 pm
1.0.15 works and for the new 1.1.2 just look @:
http://www.phoca.cz/download/category/22-virtuemart-addons

Micha
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: ILJ on January 03, 2009, 18:08:29 pm
Hi Micha

can i double confirm if this works on joomla 1.015 and VM 1.1.12 frm the above link u gave?

thanks
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Micha on January 03, 2009, 19:16:00 pm
The hack in this forum is working for VM 1.0.15
But when you are going to VM 1.1.2 than i advice you to install the hack from Phoca. The Phoca hack is using also the fpdf printer but made it more easier for modification.   ;D

Micha
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: ILJ on January 04, 2009, 07:29:36 am
Hi Micha

i mean JOOMLA 1.015. not vm
my VM is 1.12

But phoca site is for Joomla 1.5 only i assume?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: Th.Pilegaard on May 08, 2009, 16:51:51 pm
Hi there

I have installed this addon and it seem to work until I press save.

Then I got the 'Sorry, but we could not verify your Security Token. Go back and try again please.' message

I have tried on a windows server and on a Linux server. Same result  :-\

Hopefully some would help me sort this out

Thomas

Running Joomla  1.0.15  and  vm 1.0.15
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: scrtllo on May 21, 2009, 06:08:01 am
Hi There.

I have Joomla 1.5 + VM 1.1.2 and when im installing invoice hakc from there: http://www.phoca.cz/download/category/22-virtuemart-addons?start=20 (http://www.phoca.cz/download/category/22-virtuemart-addons?start=20), my shop become a mess. All i can see is a blank page.

Meybe someone knows other invoice module for vm 1.1.2 or know how to fix my problem.

Thanks for reply..

Greeting S.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: coleision on June 24, 2009, 20:10:23 pm
I would also be really interested in this for Joomla 1.5 and VM 1.1.2 =)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: lostmail on July 13, 2009, 22:34:49 pm
In VM 1.1.13 still not possible to create invoices with default features ?

;-((
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: juno on July 15, 2009, 06:35:50 am
Hi all,

 Is this possible in VirtueMart 1.1.3??

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: jaripetteri on September 14, 2009, 12:13:54 pm
Is this possible in VirtueMart 1.1.3??

Has anyone tried this on 1.1.3? I think it's the same:
http://www.phoca.cz/documents/18-virtuemart/174-virtuemart-invoice-delivery-note-receipt (http://www.phoca.cz/documents/18-virtuemart/174-virtuemart-invoice-delivery-note-receipt)
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: ledstyle on June 04, 2010, 15:58:44 pm
Hi Jari,
I have this component in use.
Eli ollut jo parisen kuukautta ja tyytyväinen olen, viel pitäs muutella (jos haluaisi) tuota kuitin/laskun rakennetta. Mutta aikas hyvä näinkin. Nyt sain muuteltua myös tuohon sen että siirtää kuitille tai laskulle myös tuotteen lisätiedot joita asiakas on valkannut. Valmiina tässä ei sitä ole.
Vielä kun saisi tuon tekemään automaattisesti tuon kuitin mutta niin että voisi itse muokata tuota päiväystä... Nyt se on aikas klikkailua mutta helpompaa ja siistimpi kuin moni muu kokeilemani. Ja olen suomennellut noita tekstejä sekä poistellut itselle turhia asioita.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: ledstyle on June 04, 2010, 16:26:41 pm
Is there any changes to modify this component so it could make invoice or receipt by itself?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: mitchie on June 20, 2010, 08:48:25 am
Hi there,
maybe you're interested in this:

http://sourceforge.net/projects/vminvoice/ (http://sourceforge.net/projects/vminvoice/)

It's a true component, no hacks needed. Install it like any other Joomla! component.

Next release (forecasted release date: 1st july 2010) you'll be able to move (copy) your old Phoca add-on data into vm Invoice Manager and go-on from there.

Soon will be online a dedicated site with support forum and a user's handbook.

mitchie

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: H13 on October 31, 2010, 01:35:19 am
Hi,

mitchie
Please fix your code to not violate GPL license (by used Phoca or Ingemar code, the copyright header was removed)

all users
In new version, there are some new features. For now the attributes are displayed in the PDF document. PDF documents (Invoice, Delivery Note, Receipt) can by stylized with HTML and CSS, some CSS can be set in parameters (template file needs not to be edited). In footer and header information can be added in parameters (e.g. adding Bank account Nr., VAT, or other information), ...


See the feature list:

* Creating Delivery (partial delivery)
* Creating PDF of Invoice, Delivery Note or Receipt
* Sending PDF of Invoice, Delivery Note or Receipt (Phoca PDF VirtueMart Email plugin)
* Displaying PDF of Invoice, Delivery Note or Receipt in frontend in Account Maintenance (VirtueMart hack needed)
* Creating Delivery, PDF of Invoice, Delivery Note or Receipt, sending them through the email - all automatically after changing order status (Phoca PDF VirtueMart Email plugin, VirtueMart hack needed)
* Changing the PDF output in parameters (changing header, footer height, fonts, etc.)
* Changing the PDF output with help of CSS styles in parameters
* Changing the PDF output easily in PDF templates (with help of HTML or CSS)
* Changing the Email output (email template) in parameters (Phoca PDF VirtueMart Email plugin)
* Setting default values for creating Invoice, Delivery Note or Receipt in parameters (Phoca PDF VirtueMart Email plugin)
* Product attributes are displayed in PDF document, ...

See:
http://www.phoca.cz/documents/18-virtuemart/399-virtuemart-invoice-delivery-note-and-receipt-addon

to get more information

Jan
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: aravot on October 31, 2010, 02:41:48 am
Jan, you have done an excellent work.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: H13 on October 31, 2010, 13:45:18 pm
Hi Peter,

great to hear it.

Jan
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: coppens on November 15, 2010, 02:43:41 am
My hosting service doesn't seem to have the utility "patch" installed.  Is there any chance you could give the line numbers where to manually update the files?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: H13 on November 18, 2010, 23:34:55 pm
Hi, the entire guide for implementing this addon is here:
http://www.phoca.cz/documents/18-virtuemart/399-virtuemart-invoice-delivery-note-and-receipt-addon

Jan
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: ledstyle on December 19, 2010, 17:10:14 pm
Hey, huge problem... I updatet this new version of Invoice/Receipt/DeliveryNote Addon. Installed all programs as there reads (I think).
And made changes for Language file (for Finnish) and tried to modified administrator/components/com_virtuemart/classes/ps_order.php, just for automatic PDF email...


Everything is working great except now my shop isn't sending ORDER STATUS changes to my customers anymore...Why is that?


Please, Help me.....


This is now OK, I found that this code change makes that... and especially
Code: [Select]
if( $curr_order_status=="P" && $d["order_status"]=="C" && $notify_customer == 1) {
   PhocaPDFVirtueMartHelper::createDeliveryAndPDFandSendEmail($vmLogger, $VM_LANG, CLASSPATH);
}
if( !empty($notify_customer) ) {
   //$this->notify_customer( $d );
}

And especially this //$this->notify_customer

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: ledstyle on December 20, 2010, 10:34:31 am
Hey, huge problem... I updatet this new version of Invoice/Receipt/DeliveryNote Addon. Installed all programs as there reads (I think).
And made changes for Language file (for Finnish) and tried to modified administrator/components/com_virtuemart/classes/ps_order.php, just for automatic PDF email...


Everything is working great except now my shop isn't sending ORDER STATUS changes to my customers anymore...Why is that?


Please, Help me.....


This is now OK, I found that this code change makes that... and especially
Code: [Select]
if( $curr_order_status=="P" && $d["order_status"]=="C" && $notify_customer == 1) {
   PhocaPDFVirtueMartHelper::createDeliveryAndPDFandSendEmail($vmLogger, $VM_LANG, CLASSPATH);
}
if( !empty($notify_customer) ) {
   //$this->notify_customer( $d );
}

And especially this //$this->notify_customer



But why doen't it make that invoice and send it to customer? even when I have made the changes....?
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: goretex34 on March 17, 2011, 17:00:08 pm
I have the same issue.
It seems to be that the automatic email option is restricted to Phoca collaborators. I've seen the function in "virtuemarthelper.php" and is empty (only returning "true)
I suppose that if you (and me) aren't Phoca "members", we should go back to the original code in this part, and have again simply:
Code: [Select]
    $this->notify_customer

Hope Phoca people could free this part, 'cause the Virtuemart Addon is simply PERFECT with that option

Jan, very good job. ;-)

Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: aravot on March 17, 2011, 18:20:11 pm
There is no membership but donation, if you donate to the Phoca project you will receive the code, I am sure such a PERFECT addon deserves few bucks.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: DREK on March 23, 2011, 12:16:09 pm
Is that true? I'm stuck in that part. I would like to generate PDFs automatically when my orders are confirmed...

Any help? Where do I donate the money.
Title: Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
Post by: graham on July 31, 2011, 12:55:09 pm
Hi Everyone,

I have been using this mod now for sometime and its great... its a must for virtuemart...
I have come across a small problem and just wondered if there was a work around?
I have installed a paypal express checkout and when a customer uses this, i see NO shipping address in the
delivery note??

can anyone please advise a work around.