Hi all.
I just installed SimpleInvoices.
It's awesome! Thumbs up for the creator!
I need some help tho.
Hope some of you can help me out.
1: Changing orders on the Invoice. Like Postal code and stuff.
Over here we put it in different order.
Thats it for now, i hope you guys can help me out
Cheers,
Mark
What order do you want?
You need to create a custom invoice template
What I did was in Templates>> Invoices >>
copied the default folder to a new folder that I called backup_default, and then modified the template.tpl inside the default folder (the original of the one that was copied)
Thnx, im gonna try that.
I want it in the following order:
Name
Adress
Postal code + city
Region
Country
So it would be like on the invoice like:
Customer:
Adress:
Postall Code: 1000 London (example)
Region:
Country:
Tel.:
Mob.:
E-mail:
can u make me some template for that?
probably much easier for you than me!
thnx in advance
Ok Try this
Replace the entire contents of the si/templates/invoices/default/plugins/function.merge_address.php with the below code (Please make a backup of the old one first - just in case)
<?php<br />
//function smarty_function_do_tr($params, &$smarty)
/**
* Function: merge_address
*
* Merges the city, state, and zip info onto one live and takes into account the commas
*
* Arguments:
* field1 - normally city
* field2 - noramlly state
* field3 - normally zip
* street1 - street 1 added print the word "Address:" on the first line of the invoice
* street2 - street 2 added print the word "Address:" on the first line of the invoice
* class1 - the css class for the first td
* class2 - the css class for the second td
* colspan - the td colspan of the last td
**/
//$params['field1'],$field2,$field3,$street1,$street2,$class1,$class2,$colspan) {
function smarty_function_merge_address($params, &$smarty) {
global $LANG;
$skip_section = false;
$ma = '';
// If any among city, state or zip is present with no street at all
if (($params['field1'] != null OR $params['field2'] != null OR $params['field3'] != null) AND ($params['street1'] ==null AND $params['street2'] ==null)) {
$ma .= "
$LANG[address]:
";
$skip_section = true;
}
// If any among city, state or zip is present with atleast one street value
if (($params['field1'] != null OR $params['field2'] != null OR $params['field3'] != null) AND ( ! $skip_section )) {
$ma .= "
";
}
if ($params['field3'] != null) {
$ma .= htmlsafe($params[field3]);
}
if ($params['field3'] != null AND $params['field1'] != null ) {
$ma .= " ";
}
if ($params['field1'] != null) {
$ma .= htmlsafe($params[field1]);
}
if (($params['field3'] != null OR $params['field1'] != null) AND ($params['field2'] != null)) {
$ma .= "
";
}
if ($params['field2'] != null) {
$ma .= htmlsafe($params[field2]);
}
$ma .= "
";
echo $ma;
}
?>
It looks like you're new here. If you want to get involved, click one of these buttons!