Change Date Format in PDF-Bill and PDF-Delivery

Phoca PDF - creating PDF documents in Joomla! CMS
mcmannehan
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 11 Aug 2011, 05:30

Change Date Format in PDF-Bill and PDF-Delivery

Post by mcmannehan »

The bill show the date like 2011-08-23 . I think for the Europe people is not so good. I did change the
FORM_UNIXTIME in:

plugins/phocapdf/virtuemart/virtuemarthelper.php

nearly line 237 to:

Code: Select all

case 'dbv':
                $query = 'SELECT * FROM #__{vm}_vendor'
                        .' WHERE vendor_id = '.$_SESSION['ps_vendor_id'];
            break;
            case 'dbo':
                $query = "SELECT *, FROM_UNIXTIME(cdate, '%d.%m.%Y') as order_date "
                        ." FROM #__{vm}_orders WHERE order_id='".(int)$var['order_id']."' "
                        ." AND vendor_id = '".$_SESSION['ps_vendor_id']."'";
            break;
            case 'dbob':
                $query = "SELECT obliterated FROM #__{vm}_deliveries"
                        ." WHERE order_id = ".(int)$var['order_id']
                        ." AND vendor_id = ".$_SESSION['ps_vendor_id']
                        ." AND delivery_id = ".(int)$var['delivery_id'];
                       
            break;
            case 'dbb':
                $query = "SELECT *, FROM_UNIXTIME(mdate, '%d.%m.%Y') as bill_date,"
                        ." FROM_UNIXTIME(mdate + (due_date * 86400), '%%d.%m.%Y') as bill_due"
                        ." FROM #__{vm}_bills"
                        ." WHERE vendor_id = '".$_SESSION['ps_vendor_id']."'"
                        ." AND delivery_id = '".(int)$var['delivery_id']."'";
now the status E-mail and the PDF Files show the date like 23.08.2011
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Change Date Format in PDF-Bill and PDF-Delivery

Post by Jan »

Hi, thank you for the guide, Jan
If you find Phoca extensions useful, please support the project
xox1
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 31 Jan 2013, 21:08

Re: Change Date Format in PDF-Bill and PDF-Delivery

Post by xox1 »

I change output date format in invoice:
.'<td>'.date("d.m.Y", strtotime($a['bill_due'])).'</td>'
in plugins/phocapdf/virtuemart/tmpl.invoice.php
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Change Date Format in PDF-Bill and PDF-Delivery

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply