Phoca
Phoca Seal

Change Date Format in PDF-Bill and PDF-Delivery

Change Date Format in PDF-Bill and PDF-Delivery

Postby mcmannehan on 25 Aug 2011, 07:02

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
mcmannehan
Phoca Newbie
Phoca Newbie
 
Posts: 1
Joined: 11 Aug 2011, 05:30

Google Ads


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

Postby Jan on 25 Aug 2011, 23:11

Hi, thank you for the guide, Jan
If you find some Phoca extensions useful, please vote for them on: extensions.joomla.org
User avatar
Jan
Phoca Hero
Phoca Hero
 
Posts: 32817
Joined: 10 Nov 2007, 18:23
Location: Czech Republic

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

Postby xox1 on 08 Feb 2013, 21:23

I change output date format in invoice:
.'<td>'.date("d.m.Y", strtotime($a['bill_due'])).'</td>'
in plugins/phocapdf/virtuemart/tmpl.invoice.php
xox1
Phoca Newbie
Phoca Newbie
 
Posts: 1
Joined: 31 Jan 2013, 21:08

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

Postby Jan on 14 Feb 2013, 00:49

Ok
If you find some Phoca extensions useful, please vote for them on: extensions.joomla.org
User avatar
Jan
Phoca Hero
Phoca Hero
 
Posts: 32817
Joined: 10 Nov 2007, 18:23
Location: Czech Republic


Return to Phoca PDF

Who is online

Users browsing this forum: No registered users and 2 guests