// Merge -> revision 8363

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8365 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-06 12:38:55 +00:00
parent 76f895c4d5
commit 39f2f53db2
25 changed files with 11187 additions and 2208 deletions
+7 -2
View File
@@ -427,6 +427,7 @@ class PDFCore extends PDF_PageGroupCore
*/
public static function generateHeaderAddresses(&$pdf, $order, $addressType, $patternRules, $width)
{
$maxY = 0;
$pdf->setY($pdf->GetY() + 5);
foreach(array_keys($addressType) as $type)
@@ -451,8 +452,12 @@ class PDFCore extends PDF_PageGroupCore
if ($pattern == 'State:name' &&
Context::getContext()->country->iso_code == 'US')
{
$state = &$addressType[$type]['addressFormatedValues'][$pattern];
$state = strtoupper(substr($state, 0, 2));
$state_name = &$addressType[$type]['addressFormatedValues'][$pattern];
$state = new State((int)State::getIdByName($state_name));
if (Validate::isLoadedObject($state))
$state_name = $state->iso_code;
else
$state_name = strtoupper(substr($state_name, 0, 2));
}
$tmp .= ((isset($addressType[$type]['addressFormatedValues'][$pattern]) &&
!empty($addressType[$type]['addressFormatedValues'][$pattern])) ?