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

Mr_Smurf

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

9100107

  • Guest
Re: Invoice/Receipt/DeliveryNote Addon (finished at last)
« Reply #1 on: January 27, 2006, 01:09:27 AM »
Do you install as a component...?

Mr_Smurf

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

Beest

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

Mr_Smurf

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

Mr_Smurf

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

Beest

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

Mr_Smurf

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

Beest

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

Mr_Smurf

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

Beest

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

Mr_Smurf

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

Beest

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

Mr_Smurf

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

Beest

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