Author Topic: Invoice/Receipt/DeliveryNote Addon (finished at last)  (Read 368944 times)

iqapps1

  • Full Member
  • ***
  • Posts: 651
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #30 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

Mr_Smurf

  • Jr. Member
  • **
  • Posts: 94
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #31 on: February 09, 2006, 23:18:14 pm »
cvs is not really needed.. i should have deleted them...

but what about the pdf153 directory?

iqapps1

  • Full Member
  • ***
  • Posts: 651
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #32 on: February 09, 2006, 23:19:00 pm »
It is there. ;D

Mr_Smurf

  • Jr. Member
  • **
  • Posts: 94
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #33 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...

Mr_Smurf

  • Jr. Member
  • **
  • Posts: 94
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #34 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.

knurra

  • Beginner
  • *
  • Posts: 5
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #35 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 ( ¥ ).
The Pdf does not display the ¥ symbol it displays ¥
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

Mr_Smurf

  • Jr. Member
  • **
  • Posts: 94
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #36 on: February 14, 2006, 08:51:52 am »
1,
The currency on my sites are Japanese Yen ( ¥ ), the HTML for it is ( ¥ ).
The Pdf does not display the ¥ symbol it displays ¥
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 ¥ with ¥ using the str_replace function.

str_replace("¥","¥", $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);

dbooth

  • Beginner
  • *
  • Posts: 8
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #37 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?

Mr_Smurf

  • Jr. Member
  • **
  • Posts: 94
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #38 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?

dbooth

  • Beginner
  • *
  • Posts: 8
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #39 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

Mr_Smurf

  • Jr. Member
  • **
  • Posts: 94
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #40 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?

dbooth

  • Beginner
  • *
  • Posts: 8
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #41 on: February 17, 2006, 10:32:18 am »
Running PHP v4.3.9

stepino

  • Beginner
  • *
  • Posts: 8
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #42 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?

Mr_Smurf

  • Jr. Member
  • **
  • Posts: 94
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #43 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

stepino

  • Beginner
  • *
  • Posts: 8
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #44 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.