1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Changeset 4051

Show
Ignore:
Timestamp:
03/01/12 15:58:39 (15 months ago)
Author:
oscim
Message:

Amelioration template pdf harry et lifting de la mise en forme
Ajout d'une class pour la mise en forme de harry, et prise en charge d'une class pour struturer les modeles pdf
report de la creation des pdf ds la class order, et modification du processus qui lors de la creation d'un pdf, ne force pas le telechargement
amelioration de la gestion des livraison et correction de coquille
ajoutd 'un bon d'expediotion dans harry
ajustement du fichier documnt pour la prise en charge des BL
Ajustement des class de common pour la prise en charge des BL

Location:
trunk/catalog
Files:
3 added
10 modified

Legend:

Unmodified
Added
Removed
  • trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/invoice.php

    r3886 r4051  
    11<?php 
    22/** 
    3   @licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce 
     3  @licence GPL 2005-2012  The osCSS developers - osCSS Open Source E-commerce 
    44  @portion code Copyright (c) 2002 osCommerce 
    55  @package osCSS-2 <www http://www.oscss.org> 
    6   @version 2.0.9 
    7   @date  16/06/10, 10:54 
     6  @version 2.1.1 
     7  @date  01/03/2012, 10:55 
    88  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr> 
    99  @encode UTF-8 
     
    1515$pdf->AddPage(); 
    1616 
     17 
     18 
     19 
     20        /** 
     21                EOB -- header 
     22        */ 
     23                $le_Y=($le_Y+$marge_block); 
     24                $hauteur_block=11; 
     25                $pdf->SetFont($pdf->font,'BI',15); 
     26                $pdf->SetTextColor($pdf->txt_color_1); 
     27 
     28                $pdf->SetXY(155,$le_Y); 
     29                //Draw Order Number Text 
     30                $pdf->Cell(48,$hauteur_block,  __('iv print doc type invoice') , 0, 0,"R"); 
     31 
     32 
     33                $le_Y=($le_Y+$hauteur_block); 
     34                $hauteur_block=11; 
     35                //Draw Box for Order Number, Date & Payment method 
     36                $pdf->SetDrawColor(0); 
     37                $pdf->SetLineWidth(0.2); 
     38                $pdf->SetFillColor($pdf->bg_color_1); 
     39                $pdf->RoundedRect(155, $le_Y, 48, $hauteur_block, 2, 'DF'); 
     40 
     41 
     42                $pdf->SetFont($pdf->font,'BI',15); 
     43                $pdf->SetTextColor($pdf->txt_color_1); 
     44 
     45                $pdf->SetXY(155,$le_Y); 
     46                //Draw Order Number Text 
     47                $temp = tep_correct_entitie_put_pdf(__('iv print packingslip ordernr')); 
     48                $pdf->Cell(48,$hauteur_block,  'FA-'.$order->info['orders_prefix'].$order->info['orders_id'], 0, 0,"C"); 
     49 
     50                $pdf->SetFont($pdf->font,'BI',10); 
     51                $le_Y=($le_Y+$hauteur_block); 
     52                $pdf->SetXY(155,$le_Y); 
     53                $pdf->Cell(48,$hauteur_block,  sprintf(__('iv print doc date order %s'), tep_date_short($order->info['date_purchased'])) , 0, 0,"R"); 
     54 
     55        /** 
     56                EOF -- header 
     57        */ 
     58 
     59        /** 
     60                Ligne cesure + marque pliage 
     61        */ 
     62                $pdf->Cell(50); 
     63                $pdf->SetY(60); 
     64                $pdf->SetDrawColor(153,153,153); 
     65                $pdf->Cell(197,.1,'',1,1,'L',1); 
     66 
     67 
     68        /** 
     69                Block de Adresse owner shop 
     70        */ 
     71 
     72  $le_Y=67; 
     73  $hauteur_block=35; 
     74  //Draw Box for Invoice Address 
     75  $pdf->SetDrawColor(0); 
     76  $pdf->SetLineWidth(0.2); 
     77  $pdf->SetFillColor($pdf->bg_color_1); 
     78  $pdf->RoundedRect(6, $le_Y, 90, 35, 2, 'DF'); 
     79 
     80  //Draw the invoice address text 
     81  $pdf->SetFont($pdf->font,'B',10); 
     82  $pdf->SetTextColor($pdf->txt_color_1); 
     83  $pdf->Text(11,77, tep_correct_entitie_put_pdf(__(''))); 
     84  $pdf->SetX(0); 
     85  $pdf->SetY(80); 
     86  $pdf->Cell(9); 
     87  $pdf->MultiCell(70, 3.3, tep_correct_entitie_put_pdf(STORE_NAME_ADDRESS),0,'L'); 
     88 
     89 
     90        /** 
     91                Block de Adresse customers 
     92        */ 
     93 
     94  //Draw Box for Delivery Address 
     95  $pdf->SetDrawColor(0); 
     96  $pdf->SetLineWidth(0.2); 
     97  $pdf->SetFillColor(255); 
     98  $pdf->RoundedRect(113, $le_Y, 90, 35, 2, 'DF'); 
     99 
     100  //Draw the invoice delivery address text 
     101  $pdf->SetFont($pdf->font,'B',10); 
     102  $pdf->SetTextColor($pdf->txt_color_1); 
     103  $pdf->Text(117,77,tep_correct_entitie_put_pdf(__('iv entry order to'))); 
     104  $pdf->SetX(0); 
     105  $pdf->SetY(80); 
     106  $pdf->Cell(115); 
     107  $pdf->MultiCell(71, 3.3, tep_correct_entitie_put_pdf(tep_address_format(1, $order->customer, '', '', "\n")),0,'L'); 
     108 
     109 
     110 
     111 
     112 
     113// if (isset($_POST) && isset($_POST['show_pay_method'])){ 
    17114/** 
    18 Ligne + titre doc 
     115  Method payement 
    19116*/ 
    20 $pdf->Cell(50); 
    21 $pdf->SetY(60); 
    22 $pdf->SetDrawColor(153,153,153); 
    23 $pdf->Cell(15,.1,'',1,1,'L',1); 
    24 $pdf->SetFont('Arial','BI',15); 
    25 $pdf->SetTextColor(153,153,153); 
    26 $pdf->Text(22,61.5,tep_correct_entitie_put_pdf(PRINT_INVOICE_HEADING)); 
    27 $pdf->SetY(60); 
    28 $pdf->SetDrawColor(153,153,153); 
    29 $pdf->Cell(38); 
    30 $pdf->Cell(160,.1,'',1,1,'L',1); 
    31  
    32 /** 
    33 Block des Adresse client 
    34 */ 
    35 $le_Y=67; 
    36 $hauteur_block=35; 
    37  
    38 //Draw Box for Invoice Address 
    39 $pdf->SetDrawColor(0); 
    40 $pdf->SetLineWidth(0.2); 
    41 $pdf->SetFillColor(245); 
    42 $pdf->RoundedRect(6, $le_Y, 90, $hauteur_block, 2, 'DF'); 
    43  
    44 //Draw the invoice address text 
    45 $pdf->SetFont('Arial','B',10); 
    46 $pdf->SetTextColor(0); 
    47 $pdf->Text(11,77, tep_correct_entitie_put_pdf(ENTRY_SOLD_TO) ); 
    48 $pdf->SetX(0); 
    49 $pdf->SetY(80); 
    50 $pdf->Cell(9); 
    51 $pdf->MultiCell(70, 3.3, tep_correct_entitie_put_pdf(tep_address_format(1, $order->customer, '', '', "\n")),0,'L'); 
    52  
    53 //Draw Box for Delivery Address 
    54 $pdf->SetDrawColor(0); 
    55 $pdf->SetLineWidth(0.2); 
    56 $pdf->SetFillColor(255); 
    57 $pdf->RoundedRect(108, $le_Y, 90, $hauteur_block, 2, 'DF'); 
    58  
    59 //Draw the invoice delivery address text 
    60 $pdf->SetFont('Arial','B',10); 
    61 $pdf->SetTextColor(0); 
    62 $pdf->Text(113,77,tep_correct_entitie_put_pdf(ENTRY_SHIP_TO)); 
    63 $pdf->SetX(0); 
    64 $pdf->SetY(80); 
    65 $pdf->Cell(111); 
    66 $pdf->MultiCell(70, 3.3, tep_correct_entitie_put_pdf(tep_address_format(1, $order->delivery, '', '', "\n")),0,'L'); 
    67  
    68  
    69 /** 
    70 Block order id et date 
    71 */ 
    72 $le_Y=($le_Y+$hauteur_block+$marge_block); 
    73 $hauteur_block=11; 
    74 //Draw Box for Order Number, Date & Payment method 
    75 $pdf->SetDrawColor(0); 
    76 $pdf->SetLineWidth(0.2); 
    77 $pdf->SetFillColor(245); 
    78 $pdf->RoundedRect(6, $le_Y, 192, $hauteur_block, 2, 'DF'); 
    79  
    80 //Draw Order Number Text 
    81 $temp = tep_correct_entitie_put_pdf(PRINT_INVOICE_ORDERNR); 
    82 $pdf->Text(10,113, $temp . $order->info['orders_prefix'].$orders['orders_id']); 
    83 //Draw Date of Order Text 
    84 $temp = tep_correct_entitie_put_pdf (PRINT_INVOICE_DATE); 
    85 $pdf->Text(130,113,$temp . tep_correct_entitie_put_pdf(tep_date_short($order->info['date_purchased']))); 
    86  
    87 /** 
    88 Method payement 
    89 */ 
    90 if (isset($_POST) && isset($_POST['show_pay_method'])){ 
    91 $le_Y=($le_Y+$hauteur_block+$marge_block); 
    92 $hauteur_block=11; 
    93  
    94 $pdf->SetDrawColor(0); 
    95 $pdf->SetLineWidth(0.2); 
    96 $pdf->SetFillColor(245); 
    97 $pdf->RoundedRect(6, $le_Y, 192, $hauteur_block, 2, 'DF'); 
    98 $pdf->Text(10,127,tep_correct_entitie_put_pdf(ENTRY_PAYMENT_METHOD . ' ' . $order->info['payment_method']), 0, 0, 'R'); 
    99 } 
     117  $le_Y=($le_Y+$hauteur_block+$marge_block); 
     118  $hauteur_block=9; 
     119  $pdf->SetDrawColor(0); 
     120  $pdf->SetLineWidth(0.2); 
     121  $pdf->SetFillColor($pdf->bg_color_1); 
     122  $pdf->RoundedRect(6, $le_Y, 197, $hauteur_block, 2, 'DF'); 
     123  $pdf->Text(10,($le_Y+6),tep_correct_entitie_put_pdf(sprintf(__('iv entry payment method %s') , $order->info['payment_method'])), 0, 0, 'R'); 
     124 
     125// } 
     126 
     127 
     128 
     129 
     130 
     131 
     132 
     133 
    100134 
    101135/** 
    102136Block detail commande 
    103137*/ 
     138 
     139 
     140 
     141 
    104142//Fields Name position 
    105143$Y_Fields_Name_position = ($le_Y+$hauteur_block+$marge_block); 
     
    108146$Y_Table_Position = ($Y_Fields_Name_position+6); 
    109147 
    110 output_table_heading($Y_Fields_Name_position); 
     148  //First create each Field Name 
     149  //Gray color filling each Field Name box 
     150  $pdf->SetFillColor($pdf->bg_color_1); 
     151  //Bold Font for Field Name 
     152  $pdf->SetFont($pdf->font,'B',10); 
     153  $pdf->SetY($Y_Fields_Name_position); 
     154 
     155        $X_pos = 6; 
     156  $pdf->SetX($X_pos); 
     157 
     158        $cell_w = 9; 
     159  $pdf->Cell($cell_w,6,tep_correct_entitie_put_pdf(__('iv table heading qty orders')),1,0,'C',1); 
     160 
     161        $X_pos +=$cell_w; 
     162  $pdf->SetX($X_pos); 
     163 
     164        $cell_w = 25; 
     165  $pdf->Cell($cell_w,6,tep_correct_entitie_put_pdf(__('iv table heading products model')),1,0,'C',1); 
     166 
     167        $X_pos +=$cell_w; 
     168  $pdf->SetX($X_pos); 
     169 
     170        $cell_w = 83; 
     171  $pdf->Cell($cell_w,6,tep_correct_entitie_put_pdf(__('iv table heading products')),1,0,'C',1); 
     172 
     173        $X_pos +=$cell_w; 
     174  $pdf->SetX($X_pos); 
     175 
     176        $cell_w = 20; 
     177  $pdf->Cell($cell_w,6,tep_correct_entitie_put_pdf(__('iv table heading price excluding tax')),1,0,'C',1); 
     178 
     179        $X_pos +=$cell_w; 
     180  $pdf->SetX($X_pos); 
     181 
     182        $cell_w = 20; 
     183  $pdf->Cell($cell_w,6,tep_correct_entitie_put_pdf(__('iv table heading price including tax')),1,0,'C',1); 
     184 
     185        $X_pos +=$cell_w; 
     186  $pdf->SetX($X_pos); 
     187 
     188        $cell_w = 20; 
     189  $pdf->Cell($cell_w,6,tep_correct_entitie_put_pdf(__('iv table heading total excluding tax')),1,0,'C',1); 
     190 
     191        $X_pos +=$cell_w; 
     192  $pdf->SetX($X_pos); 
     193 
     194        $cell_w = 20; 
     195  $pdf->Cell($cell_w,6,tep_correct_entitie_put_pdf(__('iv table heading total including tax')),1,0,'C',1); 
     196  $pdf->Ln(); 
     197 
     198 
    111199//Show the products information line by line 
    112200for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { 
     
    124212      $ligne="\n - ".$order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; 
    125213      if (strlen($ligne) > 40 ) { 
    126         $r=tep_wordwrap($ligne, 40); 
    127         $order->products[$i]['name'] .=$r['txt']; 
    128         $nbr_l +=$r['nbr']; 
     214                                $r=tep_wordwrap($ligne, 40); 
     215                                $order->products[$i]['name'] .=$r['txt']; 
     216                                $nbr_l +=$r['nbr']; 
    129217      } else { 
    130         $order->products[$i]['name'] .=$ligne; 
    131         $nbr_l +=1; 
     218                                $order->products[$i]['name'] .=$ligne; 
     219                                $nbr_l +=1; 
    132220      } 
    133221    } 
    134222  } 
     223 
     224 
    135225  $hauteur_block_r=($nbr_l*$hauteur_block_r); 
     226        $X_pos = 6; 
     227 
     228 
     229 
     230  $pdf->SetXY( $X_pos , $Y_Table_Position); 
     231 
    136232// qty 
    137   $pdf->SetFont('Arial','',10); 
    138   $pdf->SetY($Y_Table_Position); 
    139   $pdf->SetX(6); 
    140   $pdf->MultiCell(9,$hauteur_block_r,$order->products[$i]['qty'],1,'C'); 
     233        $cell_w = 9; 
     234  $pdf->SetFont($pdf->font,'',10); 
     235  $pdf->MultiCell($cell_w,$hauteur_block_r,$order->products[$i]['qty'],1,'C'); 
     236 
     237        $X_pos +=$cell_w; 
     238  $pdf->SetXY( $X_pos , $Y_Table_Position); 
     239 
    141240// modele 
    142   $pdf->SetY($Y_Table_Position); 
    143   $pdf->SetX(15); 
    144   $pdf->SetFont('Arial','',8); 
    145   $pdf->MultiCell(25,$hauteur_block_r,tep_correct_entitie_put_pdf($order->products[$i]['model']),1,'C'); 
     241        $cell_w = 25 ; 
     242  $pdf->SetFont($pdf->font,'',8); 
     243  $pdf->MultiCell($cell_w,$hauteur_block_r,tep_correct_entitie_put_pdf($order->products[$i]['model']),1,'C'); 
     244 
     245 
     246        $X_pos +=$cell_w; 
     247  $pdf->SetXY( $X_pos , $Y_Table_Position); 
     248 
    146249// name 
    147   $pdf->SetY($Y_Table_Position); 
    148   $pdf->SetX(40); 
    149   $pdf->SetFont('Arial','',8); 
    150   $pdf->MultiCell(78,$hauteur_block,tep_correct_entitie_put_pdf($order->products[$i]['name']),1,'L'); 
     250        $cell_w = 83 ; 
     251  $pdf->SetFont($pdf->font,'',8); 
     252  $pdf->MultiCell($cell_w ,$hauteur_block,tep_correct_entitie_put_pdf($order->products[$i]['name']),1,'L'); 
     253 
     254        $X_pos +=$cell_w; 
     255  $pdf->SetXY( $X_pos , $Y_Table_Position); 
     256 
    151257// totaux / prix 
    152   $pdf->SetY($Y_Table_Position); 
    153   $pdf->SetX(118); 
    154   $pdf->SetFont('Arial','',10); 
    155   $pdf->MultiCell(20,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value'])),1,'C'); 
    156   $pdf->SetY($Y_Table_Position); 
    157   $pdf->SetX(138); 
    158   $pdf->MultiCell(20,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value'])),1,'C'); 
    159   $pdf->SetY($Y_Table_Position); 
    160   $pdf->SetX(158); 
    161   $pdf->MultiCell(20,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value'])),1,'C'); 
    162   $pdf->SetY($Y_Table_Position); 
    163   $pdf->SetX(178); 
    164   $pdf->MultiCell(20,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value'])),1,'C'); 
     258        $cell_w = 20; 
     259  $pdf->SetFont($pdf->font,'',10); 
     260  $pdf->MultiCell($cell_w ,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']), false),1,'C'); 
     261 
     262        $X_pos +=$cell_w; 
     263  $pdf->SetXY( $X_pos , $Y_Table_Position); 
     264 
     265        $cell_w = 20; 
     266  $pdf->MultiCell($cell_w,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']), false),1,'C'); 
     267 
     268        $X_pos +=$cell_w; 
     269  $pdf->SetXY( $X_pos , $Y_Table_Position); 
     270 
     271        $cell_w = 20; 
     272  $pdf->MultiCell($cell_w,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), false),1,'C'); 
     273 
     274        $X_pos +=$cell_w; 
     275  $pdf->SetXY( $X_pos , $Y_Table_Position); 
     276 
     277        $cell_w = 20; 
     278  $pdf->MultiCell($cell_w,$hauteur_block_r,tep_correct_entitie_put_pdf($currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), false),1,'C'); 
    165279 
    166280  /* Check for product line overflow*/ 
     
    188302  $pdf->SetY($Y_Table_Position ); 
    189303  $pdf->SetX(146); 
    190   $pdf->MultiCell(50,6, tep_correct_entitie_put_pdf($order->totals[$i]['text'],false),0,'R'); 
     304  $pdf->MultiCell(54,6, tep_correct_entitie_put_pdf($order->totals[$i]['text'],false),0,'R'); 
    191305} 
    192306 
     
    199313    while ($orders_comments = $orders_comments_query->fectAssoc()) { 
    200314      if(tep_not_null($orders_comments['comments'])){ 
    201         $pdf->SetFont('Arial','',10); 
     315        $pdf->SetFont($pdf->font,'',10); 
    202316        $pdf->SetY($Y_Table_Position); 
    203317        $pdf->SetX(6); 
  • trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/packingslip.php

    r3886 r4051  
    11<?php 
    22/** 
    3   @licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce 
     3  @licence GPL 2005-2012  The osCSS developers - osCSS Open Source E-commerce 
    44  @portion code Copyright (c) 2002 osCommerce 
    55  @package osCSS-2 <www http://www.oscss.org> 
    6   @version 2.0.9 
    7   @date  16/06/10, 10:55 
     6  @version 2.1.1 
     7  @date  01/03/2012, 10:55 
    88  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr> 
    99  @encode UTF-8 
     
    1717$pdf->AddPage(); 
    1818 
    19 /** 
    20   Ligne + titre doc 
    21 */ 
    22   $pdf->Cell(50); 
    23   $pdf->SetY(60); 
    24   $pdf->SetDrawColor(153,153,153); 
    25   $pdf->Cell(15,.1,'',1,1,'L',1); 
    26   $pdf->SetFont('Arial','BI',15); 
    27   $pdf->SetTextColor(153,153,153); 
    28   $pdf->Text(22,61.5,tep_correct_entitie_put_pdf(PRINT_PACKINGSLIP_HEADING)); 
    29   $pdf->SetY(60); 
    30   $pdf->SetDrawColor(153,153,153); 
    31   $pdf->Cell(65); 
    32   $pdf->Cell(126.6,.1,'',1,1,'L',1); 
    33  
    34 /** 
    35   Block des Adresse client 
    36 */ 
     19 
     20        /** 
     21                EOB -- header 
     22        */ 
     23                $le_Y=($le_Y+$marge_block); 
     24                $hauteur_block=11; 
     25                $pdf->SetFont($pdf->font,'BI',15); 
     26                $pdf->SetTextColor($pdf->txt_color_1); 
     27 
     28                $pdf->SetXY(155,$le_Y); 
     29                //Draw Order Number Text 
     30                $pdf->Cell(48,$hauteur_block,  __('ps print doc type packingslip') , 0, 0,"R"); 
     31 
     32 
     33                $le_Y=($le_Y+$hauteur_block); 
     34                $hauteur_block=11; 
     35                //Draw Box for Order Number, Date & Payment method 
     36                $pdf->SetDrawColor(0); 
     37                $pdf->SetLineWidth(0.2); 
     38                $pdf->SetFillColor($pdf->bg_color_1); 
     39                $pdf->RoundedRect(155, $le_Y, 48, $hauteur_block, 2, 'DF'); 
     40 
     41 
     42                $pdf->SetFont($pdf->font,'BI',15); 
     43                $pdf->SetTextColor($pdf->txt_color_1); 
     44 
     45                $pdf->SetXY(155,$le_Y); 
     46                //Draw Order Number Text 
     47                $temp = tep_correct_entitie_put_pdf(__('ps print packingslip ordernr')); 
     48                $pdf->Cell(48,$hauteur_block,  'BC-'.$order->info['orders_prefix'].$order->info['orders_id'], 0, 0,"C"); 
     49 
     50                $pdf->SetFont($pdf->font,'BI',10); 
     51                $le_Y=($le_Y+$hauteur_block); 
     52                $pdf->SetXY(155,$le_Y); 
     53                $pdf->Cell(48,$hauteur_block,  sprintf(__('ps print doc date order %s'), tep_date_short($order->info['date_purchased'])) , 0, 0,"R"); 
     54 
     55        /** 
     56                EOF -- header 
     57        */ 
     58 
     59 
     60 
     61        /** 
     62                Ligne cesure + marque pliage 
     63        */ 
     64                $pdf->Cell(50); 
     65                $pdf->SetY(60); 
     66                $pdf->SetDrawColor(153,153,153); 
     67                $pdf->Cell(197,.1,'',1,1,'L',1); 
     68 
     69 
     70        /** 
     71                Block de Adresse owner shop 
     72        */ 
     73 
    3774  $le_Y=67; 
    3875  $hauteur_block=35; 
     
    4077  $pdf->SetDrawColor(0); 
    4178  $pdf->SetLineWidth(0.2); 
    42   $pdf->SetFillColor(245); 
     79  $pdf->SetFillColor($pdf->bg_color_1); 
    4380  $pdf->RoundedRect(6, $le_Y, 90, 35, 2, 'DF'); 
    4481 
    4582  //Draw the invoice address text 
    46   $pdf->SetFont('Arial','B',10); 
    47   $pdf->SetTextColor(0); 
    48   $pdf->Text(11,77, tep_correct_entitie_put_pdf(ENTRY_SOLD_TO)); 
     83  $pdf->SetFont($pdf->font,'B',10); 
     84  $pdf->SetTextColor($pdf->txt_color_1); 
     85  $pdf->Text(11,77, tep_correct_entitie_put_pdf(__(''))); 
    4986  $pdf->SetX(0); 
    5087  $pdf->SetY(80); 
    5188  $pdf->Cell(9); 
    52   $pdf->MultiCell(70, 3.3, tep_correct_entitie_put_pdf(tep_address_format(1, $order->customer, '', '', "\n")),0,'L'); 
     89  $pdf->MultiCell(70, 3.3, tep_correct_entitie_put_pdf(STORE_NAME_ADDRESS),0,'L'); 
     90 
     91 
     92        /** 
     93                Block de Adresse customers 
     94        */ 
    5395 
    5496  //Draw Box for Delivery Address 
     
    5698  $pdf->SetLineWidth(0.2); 
    5799  $pdf->SetFillColor(255); 
    58   $pdf->RoundedRect(108, $le_Y, 90, 35, 2, 'DF'); 
     100  $pdf->RoundedRect(113, $le_Y, 90, 35, 2, 'DF'); 
    59101 
    60102  //Draw the invoice delivery address text 
    61   $pdf->SetFont('Arial','B',10); 
    62   $pdf->SetTextColor(0); 
    63   $pdf->Text(113,77,tep_correct_entitie_put_pdf(ENTRY_SHIP_TO)); 
     103  $pdf->SetFont($pdf->font,'B',10); 
     104  $pdf->SetTextColor($pdf->txt_color_1); 
     105  $pdf->Text(117,77,tep_correct_entitie_put_pdf(__('ps entry ship to'))); 
    64106  $pdf->SetX(0); 
    65107  $pdf->SetY(80); 
    66   $pdf->Cell(111); 
    67   $pdf->MultiCell(70, 3.3, tep_correct_entitie_put_pdf(tep_address_format(1, $order->delivery, '', '', "\n")),0,'L'); 
    68  
    69  
    70 /** 
    71   Block id commande et date 
    72 */ 
    73   $le_Y=($le_Y+$hauteur_block+$marge_block); 
    74   $hauteur_block=11; 
    75   //Draw Box for Order Number, Date & Payment method 
    76   $pdf->SetDrawColor(0); 
    77   $pdf->SetLineWidth(0.2); 
    78   $pdf->SetFillColor(245); 
    79   $pdf->RoundedRect(6, $le_Y, 192, $hauteur_block, 2, 'DF'); 
    80  
    81   //Draw Order Number Text 
    82   $temp = tep_correct_entitie_put_pdf(PRINT_PACKINGSLIP_ORDERNR); 
    83   $pdf->Text(10,113, $temp . $order->info['orders_prefix'].$orders['orders_id']); 
    84   //Draw Date of Order Text 
    85   $temp = tep_correct_entitie_put_pdf(PRINT_INVOICE_DATE); 
    86   $pdf->Text(130,113,$temp . tep_date_short($order->info['date_purchased'])); 
     108  $pdf->Cell(115); 
     109  $pdf->MultiCell(71, 3.3, tep_correct_entitie_put_pdf(tep_address_format(1, $order->delivery, '', '', "\n")),0,'L'); 
     110 
     111 
     112 
    87113 
    88114/** 
     
    90116*/ 
    91117  $le_Y=($le_Y+$hauteur_block+$marge_block); 
    92   $hauteur_block=11; 
     118  $hauteur_block=9; 
    93119  $pdf->SetDrawColor(0); 
    94120  $pdf->SetLineWidth(0.2); 
    95   $pdf->SetFillColor(245); 
    96   $pdf->RoundedRect(6, $le_Y, 192, $hauteur_block, 2, 'DF'); 
    97   $pdf->Text(10,127,tep_correct_entitie_put_pdf(ENTRY_PAYMENT_METHOD . ' ' . $order->info['payment_method']), 0, 0, 'R'); 
     121  $pdf->SetFillColor($pdf->bg_color_1); 
     122  $pdf->RoundedRect(6, $le_Y, 197, $hauteur_block, 2, 'DF'); 
     123  $pdf->Text(10,($le_Y+6),tep_correct_entitie_put_pdf(sprintf(__('ps entry payment method %s') , $order->info['payment_method'])), 0, 0, 'R'); 
    98124 
    99125 
     
    107133$Y_Table_Position = ($Y_Fields_Name_position+6); 
    108134 
    109 output_table_heading_packingslip($Y_Fields_Name_position); 
     135// output_table_heading_packingslip($Y_Fields_Name_position); 
     136  //First create each Field Name 
     137  //Gray color filling each Field Name box 
     138  $pdf->SetFillColor($pdf->bg_color_1); 
     139  //Bold Font for Field Name 
     140  $pdf->SetFont($pdf->font,'B',10); 
     141  $pdf->SetY($Y_Fields_Name_position); 
     142  $pdf->SetX(6); 
     143  $pdf->Cell(9,6,tep_correct_entitie_put_pdf(__('ps table heading qty orders')),1,0,'C',1); 
     144  $pdf->SetX(15); 
     145  $pdf->Cell(25,6,tep_correct_entitie_put_pdf(__('ps table heading products model')),1,0,'C',1); 
     146  $pdf->SetX(40); 
     147  $pdf->Cell(163,6,tep_correct_entitie_put_pdf(__('ps table heading products')),1,0,'C',1); 
     148 
    110149//Show the products information line by line 
    111150for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { 
     
    134173    $hauteur_block_r=($nbr_l*$hauteur_block_r); 
    135174// quantite 
    136   $pdf->SetFont('Arial','',10); 
     175  $pdf->SetFont($pdf->font,'',10); 
    137176  $pdf->SetY($Y_Table_Position); 
    138177  $pdf->SetX(6); 
     
    141180  $pdf->SetY($Y_Table_Position); 
    142181  $pdf->SetX(15); 
    143   $pdf->SetFont('Arial','',8); 
     182  $pdf->SetFont($pdf->font,'',8); 
    144183  $pdf->MultiCell(25,$hauteur_block_r,tep_correct_entitie_put_pdf($order->products[$i]['model']),1,'C'); 
    145184 
     
    147186  $pdf->SetY($Y_Table_Position); 
    148187  $pdf->SetX(40); 
    149   $pdf->SetFont('Arial','',8); 
    150   $pdf->MultiCell(158,$hauteur_block,tep_correct_entitie_put_pdf($order->products[$i]['name']),1,'L'); 
     188  $pdf->SetFont($pdf->font,'',8); 
     189  $pdf->MultiCell(163,$hauteur_block,tep_correct_entitie_put_pdf($order->products[$i]['name']),1,'L'); 
    151190 
    152191  $Y_Table_Position += $hauteur_block_r; 
  • trunk/catalog/admin/document.php

    r4018 r4051  
    6767    @brief Traitement des pdf 
    6868  */ 
     69    case 'delivery': 
     70      if(( $filepath=DatasFiles::GetDoc('delivery', $_REQUEST['id'])) && file_exists(DIR_FS_ROOT_DOCS.$filepath)) { 
     71                                //We send to a browser 
     72                                header('Content-Type: application/pdf'); 
     73                                        //     header('Content-Length: '.strlen($this->buffer)); 
     74                                header('Content-Disposition: inline; filename="'.basename($filepath).'"'); 
     75                                header('Cache-Control: private, max-age=0, must-revalidate'); 
     76                                header('Pragma: public'); 
     77                                ini_set('zlib.output_compression','0'); 
     78 
     79                                readfile(DIR_FS_ROOT_DOCS.$filepath); 
     80      } 
     81    break; 
     82 
    6983    case 'packingslip': 
    7084      if(( $filepath=DatasFiles::GetDoc('packingslip', $_REQUEST['id'])) && file_exists(DIR_FS_ROOT_DOCS.$filepath)) { 
    71         //We send to a browser 
    72         header('Content-Type: application/pdf'); 
    73     //     header('Content-Length: '.strlen($this->buffer)); 
    74         header('Content-Disposition: inline; filename="'.basename($filepath).'"'); 
    75         header('Cache-Control: private, max-age=0, must-revalidate'); 
    76         header('Pragma: public'); 
    77         ini_set('zlib.output_compression','0'); 
     85                                //We send to a browser 
     86                                header('Content-Type: application/pdf'); 
     87                                        //     header('Content-Length: '.strlen($this->buffer)); 
     88                                header('Content-Disposition: inline; filename="'.basename($filepath).'"'); 
     89                                header('Cache-Control: private, max-age=0, must-revalidate'); 
     90                                header('Pragma: public'); 
     91                                ini_set('zlib.output_compression','0'); 
    7892 
    79         readfile(DIR_FS_ROOT_DOCS.$filepath); 
     93                                readfile(DIR_FS_ROOT_DOCS.$filepath); 
    8094      } 
    8195    break; 
     
    8397    case 'invoice': 
    8498      if(( $filepath=DatasFiles::GetDoc('invoices', $_REQUEST['id'])) && file_exists(DIR_FS_ROOT_DOCS.$filepath)) { 
    85         //We send to a browser 
    86         header('Content-Type: application/pdf'); 
    87     //     header('Content-Length: '.strlen($this->buffer)); 
    88         header('Content-Disposition: inline; filename="'.basename($filepath).'"'); 
    89         header('Cache-Control: private, max-age=0, must-revalidate'); 
    90         header('Pragma: public'); 
    91         ini_set('zlib.output_compression','0'); 
     99                                //We send to a browser 
     100                                header('Content-Type: application/pdf'); 
     101                                        //     header('Content-Length: '.strlen($this->buffer)); 
     102                                header('Content-Disposition: inline; filename="'.basename($filepath).'"'); 
     103                                header('Cache-Control: private, max-age=0, must-revalidate'); 
     104                                header('Pragma: public'); 
     105                                ini_set('zlib.output_compression','0'); 
    92106 
    93         readfile(DIR_FS_ROOT_DOCS.$filepath); 
     107                                readfile(DIR_FS_ROOT_DOCS.$filepath); 
    94108      } 
    95109    break; 
  • trunk/catalog/admin/includes/classes/drivers/sqlorder.php

    r3964 r4051  
    164164 
    165165      if(!isset($row->activate) || empty($row->activate) ) 
    166         $shipping = false ; 
     166                                $shipping = false ; 
    167167      else 
    168         $shipping = true ; 
     168                                $shipping = true ; 
    169169 
    170170 
    171171      if($shipping){ 
    172         $sql_data_array['delivery_name']                =  (string)(!empty($row->name)) ? tep_db_prepare_input($row->name) : '' ; 
    173         $sql_data_array['delivery_company']             =  (string)(!empty($row->company)) ? tep_db_prepare_input($row->company) : '' ; 
    174         $sql_data_array['delivery_street_address']      =  (string)(!empty($row->street_address)) ? tep_db_prepare_input($row->street_address) : '' ; 
    175         $sql_data_array['delivery_suburb']              =  (string)(!empty($row->suburb)) ? tep_db_prepare_input($row->suburb) : '' ; 
    176         $sql_data_array['delivery_city']                =  (string)(!empty($row->city)) ? tep_db_prepare_input($row->city) : '' ; 
    177         $sql_data_array['delivery_postcode']            =  (string)(!empty($row->postcode)) ? tep_db_prepare_input($row->postcode) : '' ; 
    178         $sql_data_array['delivery_state']               =  (string)(!empty($row->state)) ? tep_db_prepare_input($row->state) : '' ; 
    179         $sql_data_array['delivery_country']             =  (string)(!empty($row->country)) ? worldUtility::get_country_name($row->country) : '' ; 
    180         $sql_data_array['delivery_address_format_id']   =  (int)(!empty($row->format_id)) ? tep_db_prepare_input($row->format_id) : worldUtility::GetCountryFormatAddress($row->country) ; 
    181  
    182         self::$comment[] = __('orders inline comment update delivery address'); 
     172                                $sql_data_array['delivery_name']                =  (string)(!empty($row->name)) ? tep_db_prepare_input($row->name) : '' ; 
     173                                $sql_data_array['delivery_company']             =  (string)(!empty($row->company)) ? tep_db_prepare_input($row->company) : '' ; 
     174                                $sql_data_array['delivery_street_address']      =  (string)(!empty($row->street_address)) ? tep_db_prepare_input($row->street_address) : '' ; 
     175                                $sql_data_array['delivery_suburb']              =  (string)(!empty($row->suburb)) ? tep_db_prepare_input($row->suburb) : '' ; 
     176                                $sql_data_array['delivery_city']                =  (string)(!empty($row->city)) ? tep_db_prepare_input($row->city) : '' ; 
     177                                $sql_data_array['delivery_postcode']            =  (string)(!empty($row->postcode)) ? tep_db_prepare_input($row->postcode) : '' ; 
     178                                $sql_data_array['delivery_state']               =  (string)(!empty($row->state)) ? tep_db_prepare_input($row->state) : '' ; 
     179                                $sql_data_array['delivery_country']             =  (string)(!empty($row->country)) ? worldUtility::get_country_name($row->country) : '' ; 
     180                                $sql_data_array['delivery_address_format_id']   =  (int)(!empty($row->format_id)) ? tep_db_prepare_input($row->format_id) : worldUtility::GetCountryFormatAddress($row->country) ; 
     181 
     182                                self::$comment[] = __('orders inline comment update delivery address'); 
    183183      } 
    184184      else { 
    185         // force reset data 
    186         $sql_data_array['delivery_name']                =  (string) '' ; 
    187         $sql_data_array['delivery_company']             =  (string) '' ; 
    188         $sql_data_array['delivery_street_address']      =  (string) '' ; 
    189         $sql_data_array['delivery_suburb']              =  (string) '' ; 
    190         $sql_data_array['delivery_city']                =  (string) '' ; 
    191         $sql_data_array['delivery_postcode']            =  (string)'' ; 
    192         $sql_data_array['delivery_state']               =  (string) '' ; 
    193         $sql_data_array['delivery_country']             =  (string) '' ; 
    194         $sql_data_array['delivery_address_format_id']   =  (int)0 ; 
    195  
    196         self::$comment[] = __('orders inline comment delete delivery address'); 
     185                                // force reset data 
     186                                $sql_data_array['delivery_name']                =  (string) '' ; 
     187                                $sql_data_array['delivery_company']             =  (string) '' ; 
     188                                $sql_data_array['delivery_street_address']      =  (string) '' ; 
     189                                $sql_data_array['delivery_suburb']              =  (string) '' ; 
     190                                $sql_data_array['delivery_city']                =  (string) '' ; 
     191                                $sql_data_array['delivery_postcode']            =  (string)'' ; 
     192                                $sql_data_array['delivery_state']               =  (string) '' ; 
     193                                $sql_data_array['delivery_country']             =  (string) '' ; 
     194                                $sql_data_array['delivery_address_format_id']   =  (int)0 ; 
     195 
     196                                self::$comment[] = __('orders inline comment delete delivery address'); 
    197197      } 
    198198    } 
     
    203203 
    204204      foreach($option['mod'] as $key=>$row) 
    205         switch($key){ 
    206           case 'payment': 
    207             $sql_data_array['class_payment']            =  (string)$row ; 
    208             $sql_data_array['payment_method']           =  (string)( (isset(self::$modules_type->payment->modules[$row]->txt_in_order ))? self::$modules_type->payment->modules[$row]->txt_in_order  : self::$modules_type->payment->modules[$row]->title ); 
    209  
    210             /// force check and save module payment selected 
    211             self::$modules_type->payment->modules[$row]->load_post_values($post); 
    212  
    213             self::$modules_type->payment->modules[$row]->after_update($id); 
    214 /** 
    215   TODO Add in history 
    216 */ 
    217             self::$comment[] = __('orders inline comment update method payment'); 
    218           break; 
    219           case 'shipping': 
    220  
    221   /** 
    222     TODO Add no methode force 
    223   */ 
    224 //          if($shipping) { 
    225               $sql_data_array['class_shipping']         =  (string)$row ; 
    226  
    227               /// force check and save module payment selected 
    228               self::$modules_type->shipping->modules[$row]->load_post_values($post); 
    229  
    230               self::$modules_type->shipping->modules[$row]->after_update($id); 
    231  
    232   /** 
    233     TODO Add in history 
    234   */ 
    235               self::$comment[] = __('orders inline comment update method delivery'); 
    236 //          } 
    237 //          else 
    238 // //         $sql_data_array['class_shipping']         =  (string)''; 
    239  
    240           break; 
    241         } 
     205                                switch($key){ 
     206                                        case 'payment': 
     207                                                $sql_data_array['class_payment']                =  (string)$row ; 
     208                                                $sql_data_array['payment_method']               =  (string)( (isset(self::$modules_type->payment->modules[$row]->txt_in_order ))? self::$modules_type->payment->modules[$row]->txt_in_order  : self::$modules_type->payment->modules[$row]->title ); 
     209 
     210                                                /// force check and save module payment selected 
     211                                                self::$modules_type->payment->modules[$row]->load_post_values($post); 
     212 
     213                                                self::$modules_type->payment->modules[$row]->after_update($id); 
     214                        /** 
     215                                TODO Add in history 
     216                        */ 
     217                                                self::$comment[] = __('orders inline comment update method payment'); 
     218                                        break; 
     219                                        case 'shipping': 
     220 
     221                                /** 
     222                                        TODO Add no methode force 
     223                                */ 
     224                        //          if($shipping) { 
     225                                                        $sql_data_array['class_shipping']       =  (string)$row ; 
     226 
     227                                                        /// force check and save module payment selected 
     228                                                        self::$modules_type->shipping->modules[$row]->load_post_values($post); 
     229 
     230                                                        self::$modules_type->shipping->modules[$row]->after_update($id); 
     231 
     232                                /** 
     233                                        TODO Add in history 
     234                                */ 
     235                                                        self::$comment[] = __('orders inline comment update method delivery'); 
     236                        //          } 
     237                        //          else 
     238                        // //         $sql_data_array['class_shipping']         =  (string)''; 
     239 
     240                                        break; 
     241                                } 
    242242 
    243243    } 
     
    260260 
    261261    self::AddOrderHistory($id, $status , 0/*$notif*/, implode("<br />", self::$comment) ); 
    262  
    263 //     $list_languages=tep_get_languages(); 
    264 // 
    265 //     $sql_data_array = $option['sqlarray']; 
    266 // 
    267 //     $sql_data_array['last_modified'] = 'now()'; 
    268 //     $sql_data_array['sort_order'] =  (!empty($post['sort_order'])) ? tep_db_prepare_input((int)$post['sort_order']) : 0 ; 
    269 //     $sql_data_array['parent_id'] =  (!empty($sql_data_array['parent_id'])) ? tep_db_prepare_input((int)$sql_data_array['parent_id']) : 0 ; 
    270 //     $sql_data_array['categories_cpath'] =  categorieUtility::get_generated_category_path_ids($id,'category'); 
    271 //     $sql_data_array['categories_status'] =  (!empty($post['categories_status'])) ? tep_db_prepare_input((int)$post['categories_status']) : 0 ; 
    272 //     $sql_data_array['categories_hidden'] =  (!empty($post['categories_hidden'])) ? tep_db_prepare_input((int)$post['categories_hidden']) : 0 ; 
    273  
    274  
    275     // Put post value 
    276 //     self::$modules->load_post_values($post); 
    277  
    278 //     $sql_data_array=array_merge($sql_data_array, (array) self::$modules->get_update_table_categories($sql_data_array) ); 
    279 // 
    280 // 
    281  
    282 // 
    283 //     $categories_name_array = $post['categories_name']; 
    284 //     $categories_desc_array = $post['categories_description']; 
    285 // 
    286 // 
    287 //       for ($i=0, $n=sizeof($list_languages); $i<$n; $i++) { 
    288 // 
    289 //      $language_id = (int)$list_languages[$i]['id']; 
    290 //      $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id]), 
    291 //                              'categories_description'=>tep_db_prepare_input($categories_desc_array[$language_id])); 
    292 // 
    293 //      $tabl=self::$modules->get_update_table_categories_description ($list_languages[$i]['id']); 
    294 //      $sql_data_array = array_merge($sql_data_array, $tabl); 
    295 // 
    296 //      tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . $id . "' and language_id = '" . $language_id . "'"); 
    297 // 
    298 //       } 
    299 // 
    300 // //     if ( !empty($_FILES['categories_image']['tmp_name']) ) { 
    301 // //       $categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES); 
    302 // //       tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); 
    303 // //     } 
    304  
    305  
    306  
    307  
    308262 
    309263    if($error !=false) 
     
    456410    $par = array( 
    457411                  'orders_id'=>'', 
    458 //                'configuration_key', 
    459 //                'configuration_title', 
    460 //                'configuration_value', 
    461 //                'configuration_description', 
    462 //                'configuration_group_id', 
    463 //                'sort_order', 
    464 //                'date_added', 
    465 //                'last_modified', 
    466 //                'use', 
    467 //                'set', 
    468 'info' => Array 
     412                        'info' => Array 
    469413        ( 
    470414            'orders_id' => '', 
     
    495439        ), 
    496440 
    497     'totals' => Array 
     441                        'totals' => Array 
    498442        ( 
    499443//             '0' => Array 
     
    517461        ), 
    518462 
    519     'products' => Array 
     463                        'products' => Array 
    520464        ( 
    521465            '0' => Array 
     
    552496        ), 
    553497 
    554     'customer' => Array 
     498                        'customer' => Array 
    555499        ( 
    556500            'id' => '', 
     
    569513        ), 
    570514 
    571     'delivery' => Array 
     515                        'delivery' => Array 
    572516        ( 
    573517            'name' =>'', 
     
    582526        ), 
    583527 
    584     'content_type' =>'', 
    585     'coupon' =>'', 
    586     'billing' => Array 
     528                        'content_type' =>'', 
     529                        'coupon' =>'', 
     530                        'billing' => Array 
    587531        ( 
    588532            'name' =>'', 
     
    597541        ), 
    598542 
    599     'history' => Array 
     543                        'history' => Array 
    600544        ( 
    601545//             '0' => Array 
     
    609553        ), 
    610554 
    611     'lasthistory' => Array 
     555                        'lasthistory' => Array 
    612556        ( 
    613557//             'date_added' =>  10/11/2011 16:05:05 
  • trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab

    r4039 r4051  
    11<?php 
    22/** 
    3   @licence GPL 2005-2011  The osCSS developers - osCSS Open Source E-commerce 
     3  @licence GPL 2005-2012  The osCSS developers - osCSS Open Source E-commerce 
    44  @portion code Copyright (c) 2002 osCommerce 
    55  @package osCSS-2 <www http://www.oscss.org> 
    66  @version 2.1.1 
    7   @date  01/11/11, 11:35 
     7  @date  01/03/2012, 11:35 
    88  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr> 
    99  @encode UTF-8 
     
    433433 
    434434                <?php if(orders::$order->allshipping !=false): ?> 
    435                         <ul> 
     435                        <table class="dataTableBase orders shipping allshipping"> 
     436                                <thead> 
     437                                        <tr> 
     438                                                <th><?php echo __('table heading id'); ?></th> 
     439                                                <th><?php echo __('table heading date expedition'); ?></th> 
     440                                                <th><?php echo __('table heading tracking number'); ?></th> 
     441                                                <th><?php echo __('table heading methode'); ?></th> 
     442                                        </tr> 
     443                                </thead> 
     444                                <tbody> 
    436445                                <?php $i = 0; foreach (orders::$order->allshipping as $ashipping): $i++; /*print_r($ashipping);*/?> 
    437                                         <li> 
    438                                                 <h5> 
    439                                                 <span class="text date dateexpedition"> 
    440                                                         <?php echo sprintf(__('text shipping expedie le %s'), tep_datetime_short($ashipping->date_expedition) ); ?> 
    441                                                 </span> 
    442  
    443                                                 <span class="text tracking"> 
    444                                                         <?php echo sprintf(__('text shipping tracking n %s'),'<a href="'.$ashipping->tracking_url.'" >'.$ashipping->tracking.'</a>'); ?> 
    445                                                 </span> 
    446  
    447                                                 <span class="text date method"> 
    448                                                         <?php echo $ashipping->method; ?> 
    449                                                 </span> 
    450                                                 </h5> 
    451  
    452                                                 <table class="dataTableBase orders shipping allshipping"> 
    453                                                         <thead> 
    454                                                                 <tr> 
    455                                                                         <th><?php echo __('table heading id'); ?></th> 
    456                                                                         <th><?php echo __('table heading products'); ?></th> 
    457                                                                         <th><?php echo __('table heading quantity deja expedie'); ?></th> 
    458                                                                 </tr> 
    459                                                         </thead> 
    460                                                         <tbody> 
    461                                                                 <?php $i = 0; foreach ($ashipping->products as $pshipping): $i++; /*print_r($pshipping);*/?> 
    462                                                                 <td class="tcenter"><?php echo $pshipping->products_id ?></td> 
    463                                                                 <td class="tleft"> 
    464                                                                         <span class="fleft"> 
    465                                                                                 <a href="#"  class="screenshot" rel="<?php echo tep_href_link('document.php', 'mod=img&typ=product&w=200&h=200&id='.$pshipping->products_id) ?>"> 
    466                                                                                         <?php echo $pshipping->products_name ?> 
    467                                                                                 </a> 
    468                                                                 </td> 
    469                                                                 <td class="tcenter"> 
    470                                                                         <?php echo $pshipping->qt_expedie ?> 
    471                                                                 </td> 
    472                                                                 <?php endforeach; ?> 
    473                                                         </tbody> 
    474                                                 </table> 
    475  
    476                                         </li> 
     446                                        <?php if(isset($ashipping->row_id)): ?> 
     447                                        <tr> 
     448                                                <td class="tcenter"> 
     449                                                                <?php echo $ashipping->row_id; ?> 
     450                                                </td> 
     451                                                <td class="tcenter"> 
     452                                                                <?php echo tep_datetime_short($ashipping->date_expedition); ?> 
     453                                                </td> 
     454 
     455                                                <td class="tcenter"> 
     456                                                                <?php echo '<a href="'.$ashipping->tracking_url.'" target="blank">'.$ashipping->tracking.'</a>'; ?> 
     457                                                </td> 
     458 
     459                                                <td class="tcenter"> 
     460                                                                <?php echo $ashipping->method; ?> 
     461                                                </td> 
     462                                        </tr> 
     463                                        <?php endif; ?> 
    477464                                <?php endforeach; ?> 
    478                         </ul> 
     465                        </tbody> 
     466                </table> 
    479467                <?php endif; ?> 
    480468 
    481469                <br /> 
    482470 
     471                <div> 
     472                <h4><?php echo __('heading form expedition'); ?></h4> 
    483473        <!-- DEB Form add expedition --> 
    484474                <?php echo tep_draw_form('add_deliv', orders::FILENAME,'oID='.orders::$oID.'&amp;action=shipping&method=add', 'post', ' class="block_form"'); ?> 
     
    546536                        </div> 
    547537                <?php endif; ?> 
     538                </div> 
    548539        <!-- END Form add expedition --> 
    549540 
     
    620611 
    621612 
    622 <?php 
     613 
     614  <div class="main-orders block fleft w_50 padd_w"> 
     615        </div> 
     616 
     617 
     618        <?php 
    623619  /** 
    624620    DRAW BLOCK DOCS EXISTS OR LINK PDF CREATE 
    625621  */ 
    626 ?> 
     622        $datadocs=new DatasFiles;   ?> 
    627623  <div class="main-orders block fleft w_50 padd_w"> 
    628       <h4><?php echo __('heading documents') ?></h4> 
    629  
    630       <table class="main-orders docs"> 
    631         <thead> 
    632         <tr> 
    633           <th><?php echo __('order table pdf heading file') ?></th> 
    634           <th><?php echo __('order table pdf heading weight') ?></th> 
    635           <th><?php echo __('order table pdf heading date') ?></th> 
    636         </tr> 
    637         </thead> 
    638  
    639       <?php $datadocs=new DatasFiles;   ?> 
    640         <tr> 
    641           <th colspan="2"><?php echo IMAGE_ORDERS_PACKINGSLIP ?></th> 
    642           <th><?php if(_cst_bool('USE_LOCAL_GENERAT_PDF')) echo '<a class="button" href="' .  tep_href_link(FILENAME_BATCH_PRINT, tep_get_all_get_params(array('page_admin','action')).'forceview=pdf&amp;file_type=packingslip&amp;action=exe') . '" onclick="window.open(this.href); return false;">' .  __('pdf generate') . '</a>' ; ?></th> 
    643         </tr> 
    644  
    645       <?php if(( $filepath=$datadocs->GetDoc('packingslip', $_GET['oID'])) && file_exists($filepath)): ?> 
    646         <tr> 
    647           <td><a href="<?php echo tep_href_link('document.php', 'mod=packingslip&id='.$_GET['oID']) ?>"><?php echo basename($filepath) ?></a></td> 
    648           <td><?php echo round((filesize($filepath)/1000),1).' Ko' ; ?></td> 
    649           <td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td> 
    650         </tr> 
    651       <?php endif; ?> 
    652  
    653         <tr> 
    654           <th colspan="2"><?php echo IMAGE_ORDERS_INVOICE ?></th> 
    655           <th><?php if(_cst_bool('USE_LOCAL_GENERAT_PDF')) echo '<a class="button" href="' . tep_href_link(FILENAME_BATCH_PRINT, tep_get_all_get_params(array('page_admin','action','forceview')).'forceview=pdf&amp;file_type=invoice&amp;action=exe') . '">' .  __('pdf generate') . '</a>' ; ?></th> 
    656         </tr> 
    657  
    658         <?php if(( $filepath=$datadocs->GetDoc('invoices', $_GET['oID'])) && file_exists($filepath)): ?> 
    659         <tr> 
    660           <td><a href="<?php echo tep_href_link('document.php', 'mod=invoice&id='.$_GET['oID']) ?>"><?php echo basename($filepath) ?></a></td> 
    661           <td><?php echo round((filesize($filepath)/1000),1).' Ko' ; ?></td> 
    662           <td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td> 
    663         </tr> 
    664       <?php endif; ?> 
    665  
    666       </table> 
    667     </div> 
     624                <h4><?php echo __('heading documents') ?></h4> 
     625 
     626                <table class="main-orders docs"> 
     627                        <thead> 
     628                        <tr> 
     629                                <th><?php echo __('order table pdf heading file') ?></th> 
     630                                <th><?php echo __('order table pdf heading weight') ?></th> 
     631                                <th><?php echo __('order table pdf heading date') ?></th> 
     632                        </tr> 
     633                        </thead> 
     634 
     635 
     636                        <tr> 
     637                                <th colspan="2"><?php echo IMAGE_ORDERS_PACKINGSLIP ?></th> 
     638                                <th><?php if(_cst_bool('USE_LOCAL_GENERAT_PDF')) echo '<a class="button" href="' .  tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('page_admin','action')).'action=pdf&forceview=pdf&amp;file_type=packingslip&id='.$_GET['oID']) . '" >' .  __('pdf generate') . '</a>' ; ?></th> 
     639                        </tr> 
     640 
     641                <?php if(( $filepath=$datadocs->GetDoc('packingslip', $_GET['oID'])) && file_exists($filepath)): ?> 
     642                        <tr> 
     643                                <td><a href="<?php echo tep_href_link('document.php', 'mod=packingslip&id='.$_GET['oID']) ?>"><?php echo basename($filepath) ?></a></td> 
     644                                <td><?php echo round((filesize($filepath)/1000),1).' Ko' ; ?></td> 
     645                                <td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td> 
     646                        </tr> 
     647                <?php endif; ?> 
     648 
     649 
     650                        <tr> 
     651                                <th colspan="2"><?php echo __('image orders delivery') ?></th> 
     652                                <th></th> 
     653                        </tr> 
     654 
     655                        <?php $i = 0; foreach (orders::$order->allshipping as $ashipping): $i++; /*print_r($ashipping);*/?> 
     656                                <?php if(isset($ashipping->row_id)): ?> 
     657                                        <?php if(( $filepath=$datadocs->GetDoc('delivery', $ashipping->row_id)) && file_exists($filepath)): ?> 
     658                                                <tr> 
     659                                                        <td><a href="<?php echo tep_href_link('document.php', 'mod=delivery&id='.$ashipping->row_id) ?>"><?php echo basename($filepath) ?></a></td> 
     660                                                        <td><?php echo round((filesize($filepath)/1000),1).' Ko' ; ?></td> 
     661                                                        <td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td> 
     662                                                </tr> 
     663                                        <?php else: ?> 
     664                                                <tr> 
     665                                                        <td  colspan="2">&nbsp;</td> 
     666                                                        <td><?php if(_cst_bool('USE_LOCAL_GENERAT_PDF')) echo '<a class="button" href="' .  tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('page_admin','action')).'action=pdf&forceview=pdf&amp;file_type=delivery&id='.$ashipping->row_id) . '" >' .  __('pdf generate') . '</a>' ; ?> </td> 
     667                                                </tr> 
     668                                        <?php endif; ?> 
     669                                <?php endif; ?> 
     670                        <?php endforeach ?> 
     671 
     672 
     673                        <tr> 
     674                                <th colspan="2"><?php echo IMAGE_ORDERS_INVOICE ?></th> 
     675                                <th><?php if(_cst_bool('USE_LOCAL_GENERAT_PDF')) echo '<a class="button" href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('page_admin','action','forceview')).'action=pdf&forceview=pdf&amp;file_type=invoice&id='.$_GET['oID']) . '">' .  __('pdf generate') . '</a>' ; ?></th> 
     676                        </tr> 
     677 
     678                <?php if(( $filepath=$datadocs->GetDoc('invoices', $_GET['oID'])) && file_exists($filepath)): ?> 
     679                        <tr> 
     680                                <td><a href="<?php echo tep_href_link('document.php', 'mod=invoice&id='.$_GET['oID']) ?>"><?php echo basename($filepath) ?></a></td> 
     681                                <td><?php echo round((filesize($filepath)/1000),1).' Ko' ; ?></td> 
     682                                <td><?php echo tep_datetime_short(date('Y-m-d H:i:s',filemtime($filepath))) ; ?></td> 
     683                        </tr> 
     684                <?php endif; ?> 
     685 
     686                </table> 
     687        </div> 
    668688 
    669689 
  • trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt

    r4048 r4051  
    1515$lang['heading documents']="Documents" ; 
    1616 
    17 $lang['tab orders briefs']="Détails" ; 
     17$lang['tab orders briefs']="Details" ; 
    1818$lang['tab orders details']="Commande" ; 
    1919$lang['tab orders history']="Suivi" ; 
     
    3030$lang['table heading id']="Id" ; 
    3131$lang['table heading action']="Action" ; 
    32 $lang['table heading quantity']="Q té." ; 
     32$lang['table heading quantity']="Qté." ; 
    3333$lang['table heading products model']="ModÚle" ; 
    3434$lang['table heading products']="Produits" ; 
     
    4747$lang['table heading current status']="Statut" ; 
    4848$lang['table heading auto_retry']="Auto-renouvellement" ; 
    49 $lang['table heading quantity a expedie']="Reste à expédié" ; 
    50 $lang['table heading quantity deja expedie']="Déjà expédié" ; 
     49$lang['table heading quantity a expedie']="Reste à expedié" ; 
     50$lang['table heading quantity deja expedie']="Déjà expedié" ; 
    5151$lang['table heading quantity in order']="Commande" ; 
    5252 
     
    7878$lang['entry shipping address actived']="Utilisation d'une adresse de livraison" ; 
    7979 
    80 $lang['text shipping expedie le %s']="Expédié le : %s" ; 
    81 $lang['text shipping tracking n %s']="N° suivi  : %s" ; 
     80$lang['heading form expedition']="Ajouter une expedition" ; 
     81$lang['table heading date expedition']="Expedié le " ; 
     82$lang['table heading tracking number']="N° suivi" ; 
     83$lang['table heading methode']="methode" ; 
    8284 
    8385 
     
    8587$lang['heading title search montant']="Montant : " ; 
    8688 
    87 $lang['entry shipping new expedition details']="Détail de l'expédition " ; 
    88 $lang['label shipping tracking number']="Numéro d'expédition : " ; 
    89 $lang['label shipping tracking url']="URL de suivi : " ; 
     89$lang['entry shipping new expedition details']="Detail de l'expedition " ; 
     90$lang['label shipping tracking number']="Numéro d'expedition : " ; 
     91$lang['label shipping tracking url']="Url de suivi : " ; 
    9092 
    9193$lang['not this status']="Sauf " ; 
     
    9799$lang['text info multi action detail']="Changer les status pour : " ; 
    98100$lang['text info multi heading upload order']="Actions multiples " ; 
    99 $lang['image modify multi']="Exécuter " ; 
     101$lang['image modify multi']="Executer " ; 
    100102 
    101103$lang['text info heading delete order']="Supprimer la commande" ; 
     
    120122$lang['pdf generate']="Generer" ; 
    121123 
     124 
     125 /* PDF */ 
     126        $lang['qty orders']="Cmd" ; 
     127        $lang['qty exedie']="Exp" ; 
     128        $lang['table heading products model']="ModÚles" ; 
     129        $lang['table heading products']="Produits" ; 
     130        $lang['pdf generate']="Generer" ; 
     131        $lang['pdf generate']="Generer" ; 
     132 
     133 
    122134$lang['error order not update address']="Erreur : adresse de la commande non mise à jour" ; 
    123 $lang['success order update address']="Suces, mise à jour de l'adresse de la commande" ; 
     135$lang['success order update address']="Succes, mise à jour de l'adresse de la commande" ; 
    124136 
    125 $lang['error order not update mod']="Erreur : méthode de la commande non mise à jour" ; 
    126 $lang['success order update mod']="Suces, mise à jour de la méthode" ; 
     137$lang['error order not update mod']="Erreur : methode de la commande non mise à jour" ; 
     138$lang['success order update mod']="Succes, mise à jour de la méthode" ; 
    127139$lang['error order not update status']="Erreur : statut de ce service non mis à jour" ; 
    128 $lang['success order update status']="SuccÚs, mise à jour du statut de ce service" ; 
     140$lang['success order update status']="Succes, mise à jour du statut de ce service" ; 
    129141$lang['error order not update auto_retry']="Erreur : auto-renouvellement du service non mis à jour" ; 
    130 $lang['success order update auto_retry']="SuccÚs, mise à jour de l'auto-renouvellement du service" ; 
     142$lang['success order update auto_retry']="Succes, mise à jour de l'auto-renouvellement du service" ; 
    131143 
    132144$lang['error order does not exist']="Erreur : La commande n'existe pas." ; 
    133145$lang['success order updated']="SuccÚs : La commande est mise à jour avec succÚs." ; 
    134146$lang['warning order not updated']="Attention : Aucune modification n'a été effectuée. La commande n'a pas été mise à jour." ; 
    135 $lang['success order delete']="Suppression de la commande effectué" ; 
    136 $lang['error order not delete']="Erreur lors de la suppression de la commande" ; 
     147$lang['success order delete']="Supression de la commande effectué" ; 
     148$lang['error order not delete']="Erreur lors de la suppresion de la commande" ; 
    137149?> 
  • trunk/catalog/admin/includes/modules/pages/orders.php

    r4050 r4051  
    207207                        */ 
    208208                        case 'pdf': 
    209                                 $oID=(int)$_REQUEST['oID']; 
     209                                $ID=(int)$_REQUEST['id']; 
    210210                                $type=$_REQUEST['file_type'] ; 
    211211                                global $pdf, $currencies; 
    212212                                osCSS_pdf::getInstance(); 
    213213 
     214                                header("Content-Type: text/html; charset=iso8859-16"); 
    214215                                self::$orders_statuses = array_merge(tep_get_status_array('orders'),array(array('id'=>'','text'=>TEXT_NONE))); 
    215216                                self::$file_type_array= osCSS_pdf::get_module(); 
     
    218219                                $DF = new DatasFiles; 
    219220 
    220  
    221                                 $order = new order($oID); 
     221                                switch($type){ 
     222                                        case 'delivery': 
     223                                                global $obj_shipping; 
     224                                                $obj_shipping = sqlshipping::fetch(array('id'=>$ID), true); 
     225                                                $oID = $obj_shipping->orders_id; 
     226                                                $order = new order($obj_shipping->orders_id); 
     227                                        break; 
     228                                        case 'packingslip': 
     229                                        case 'invoice': 
     230                                        default: 
     231                                                $oID = $ID; 
     232                                                $order = new order($ID); 
     233                                } 
    222234 
    223235                                osCSS_pdf::OutputAddPage(); 
     
    225237                                include(osCSS_pdf::getPathModele()); 
    226238 
    227                                 $file=$DF->GetDoc(osCSS_pdf::GetPdfType(),$oID); 
     239                                $file=$DF->GetDoc(osCSS_pdf::GetPdfType(),$ID); 
    228240 
    229241                                if(file_exists($file)) 
     
    235247                                $pdf=osCSS_pdf::OutputEnd(); 
    236248 
     249                                tep_redirect(tep_href_link(self::FILENAME,  'oID='.$oID.'&action=edit')); 
    237250                        break; 
    238251 
     
    419432                                        } 
    420433 
     434                                // adjust date update 
     435                                sqlorder::update(array('id'=>$oID)); 
    421436 
    422437                                tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit')); 
     
    534549 
    535550                        case 'edit': 
    536  
    537 //                              if(self::test_oID((int)self::$oID)) { 
     551                                        $activ_add =  array(); 
     552 
    538553                                        $res= sqlorder::fetch(array('id'=>self::$oID)); 
    539554 
     
    543558                                        $res->service = array(); 
    544559                                        $res->pshipping = array(); 
    545  
     560                                        $pdt_db_arr = array(); 
    546561 
    547562                                /** 
     
    549564                                */ 
    550565                                foreach($res->products as $rows){ 
    551  
     566                                        $pdt_db_arr[$rows['rowid']] = $rows; 
     567// print_r($rows); 
     568// exit; 
    552569                                        /// No physical 
    553570                                        if(in_array($rows['type'], explode(',', TYPE_VIRTUAL_PRODUCTS)) ){ 
     
    570587                                        else { 
    571588 
    572                                                 $sql="SELECT cc.* , cp.qt_expedie as qt ". 
     589                                                $sql="SELECT cc.* , cp.orders_products_id as products_id , cp.qt_expedie as qt ". 
    573590                                                " FROM ".TABLE_SHIPPING." cc  ". 
    574591                                                " LEFT JOIN ".TABLE_SHIPPING_PRODUCTS." cp  ON (cc.row_id = cp.shipping_id) ". 
     
    578595                                                $_query2 = $DB->query($sql); 
    579596                                                $activ_add=array(); 
    580                                                 $result = array( 
    581                                                                 'orders_id'=>0, 
    582                                                                 'method'=>'', 
    583                                                                 'tracking'=>'', 
    584                                                                 'date_expedition'=>'', 
    585                                                                 'qt_expedie'=>0, 
    586                                                                 ); 
     597                                                $qt = 0; 
     598 
    587599 
    588600                                                if($_query2->__get('numRows')){ 
    589601                                                        foreach($_query2->fetchAllAssoc() as $result){ 
    590                                                                 $result['method'] = $result['method']; 
    591                                                                 $result['tracking'] = $result['tracking']; 
    592                                                                 $result['date_expedition'] = $result['date_expedition']; 
    593                                                                 $result['qt_expedie'] = (int)@$result['qt_expedie'] + (int)@$result['qt']; 
     602                                                                $qt += (int)$result['qt']; 
    594603                                                        } 
     604                                                        $result['qt_expedie'] = $qt; 
     605                                                        $result['qt_orders'] = $rows['qty']; 
    595606                                                        $robj = new objectInfo(array_merge($rows,$result)); 
    596                                                         $activ_add[] = ( ( (int)@$pshipping->qty -  (int)@$pshipping->qt_expedie) > 0 ) ? true : false; 
     607                                                        $activ_add[] = ( ( (int)@$robj->qty -  (int)@$robj->qt_expedie) == 0 ) ? false : true; 
    597608                                                        $res->pshipping[]=$robj; 
    598609                                                } 
    599610                                                else{ 
    600                                                         $res->pshipping[]=new objectInfo(array_merge($rows,$result)); 
     611                                                        $rows['qt_expedie'] = 0; 
     612                                                        $result['qt_orders'] = $rows['qty']; 
     613                                                        $res->pshipping[]=new objectInfo($rows); 
    601614                                                        $activ_add[] = true; 
    602615                                                } 
     
    610623                                else 
    611624                                        $res->allshipping[] = $result4; 
    612 //                              } 
     625 
     626//                              foreach($rows) 
     627 
    613628 
    614629                                $res->display_service = (count($res->service) <= 0 )? false : true; 
    615630                                $res->display_shipping = (count($res->pshipping) <= 0 )? false : true; 
    616                                 $res->display_shipping_add = (!in_array(true, $activ_add))? false : true; 
    617  
     631                                $res->display_shipping_add = (in_array(true, $activ_add))? true : false; 
     632 
     633                                $res->prd_db_byid = $pdt_db_arr; 
    618634                                return $res; 
    619635                        break; 
     
    627643 
    628644                                /** 
    629                                         @remarks hoose address book if active module adress book 
     645                                        @remarks choose address book if active module adress book 
    630646                                */ 
    631647                                if(isset($res->mod['address_book'])) { 
     
    671687                                $adjust=new objectInfo(self::$InitInfo['adjust']); 
    672688 
    673 // var_dump($adjust->sWhere); 
    674 // exit; 
    675689                                if(tep_not_null($adjust->sWhere)){ 
    676690                                        $adjust->sWhere=str_replace( 
     
    681695                                } 
    682696 
    683 // var_dump($adjust->sWhere); 
    684 // exit; 
    685697                                $wh=''; 
    686698                                if(self::$view =='opened') 
     
    699711                                $_split = new splitPageResults($adjust->page, $adjust->rowbyp,  $query_raw, $query_numrows); 
    700712 
    701 // var_dump($query_raw); 
    702713                                $_query = $DB->query($query_raw); 
    703714 
  • trunk/catalog/common/classes/DatasFiles.php

    r3817 r4051  
    100100     case 'customer': 
    101101     case 'customers': 
    102         return 40; 
     102                                return 40; 
    103103      break; 
    104104 
     
    107107     case 'categorie': 
    108108     case 'categories': 
    109         return 30; 
     109                                return 30; 
    110110      break; 
    111111 
    112112     case 'product': 
    113113     case 'products': 
    114         return 20; 
     114                                return 20; 
    115115      break; 
    116116 
     
    119119      case 'orders': 
    120120      case 'order': 
    121         return 10; 
     121                                return 10; 
    122122      break; 
    123123 
    124124      case 'packingslip': 
    125         return 11; 
     125                                return 11; 
    126126      break; 
    127127 
     
    130130      case 'invoices': 
    131131      case 'invoice': 
    132         return 12; 
    133       break; 
     132                                return 12; 
     133      break; 
     134 
     135      case 'delivery': 
     136                                return 13; 
     137      break; 
     138 
    134139    } 
    135140    return 0; 
     
    144149    switch($type_int){ 
    145150      case 20: 
    146         $obj->prefix = ''; 
    147         $obj->format = '%s'; 
    148         $obj->folder = 'products'; 
    149         $obj->ext = '';// fichier image 
     151                                $obj->prefix = ''; 
     152                                $obj->format = '%s'; 
     153                                $obj->folder = 'products'; 
     154                                $obj->ext = '';// fichier image 
    150155      break; 
    151156 
    152157      case 10: 
    153         $obj->prefix = 'CO'; 
    154         $obj->format = '%s-%s.%s'; 
    155         $obj->folder = 'orders'; 
    156         $obj->ext = 'pdf'; 
     158                                $obj->prefix = 'CO'; 
     159                                $obj->format = '%s-%s.%s'; 
     160                                $obj->folder = 'orders'; 
     161                                $obj->ext = 'pdf'; 
    157162      break; 
    158163      case 11: 
    159         $obj->prefix = 'BC'; 
    160         $obj->format = '%s-%s.%s'; 
    161         $obj->folder = 'packingslip'; 
    162         $obj->ext = 'pdf'; 
     164                                $obj->prefix = 'BC'; 
     165                                $obj->format = '%s-%s.%s'; 
     166                                $obj->folder = 'packingslip'; 
     167                                $obj->ext = 'pdf'; 
    163168      break; 
    164169      case 12: 
    165         $obj->prefix = 'FA'; 
    166         $obj->format = '%s-%s.%s'; 
    167         $obj->folder = 'invoices'; 
    168         $obj->ext = 'pdf'; 
     170                                $obj->prefix = 'FA'; 
     171                                $obj->format = '%s-%s.%s'; 
     172                                $obj->folder = 'invoices'; 
     173                                $obj->ext = 'pdf'; 
     174      break; 
     175      case 13: 
     176                                $obj->prefix = 'BL'; 
     177                                $obj->format = '%s-%s.%s'; 
     178                                $obj->folder = 'delivery'; 
     179                                $obj->ext = 'pdf'; 
    169180      break; 
    170181    } 
     
    203214    $pathid=self::PathForId($id); 
    204215 
    205 //     $typeint = ; 
    206216    $type=self::SpecificType(self::ConvertType($type)); 
    207217    $path = self::InitFolder($type->folder); 
     
    227237 
    228238    $typeobj=self::SpecificType($typeint); 
    229 // var_dump($path.$pathid.sprintf($type->format, $type->prefix,$Id,$type->ext)); 
     239// var_dump($typeobj); 
    230240    $path = self::InitFolder($typeobj->folder); 
    231241    self::GetPathid($type, $id); 
    232  
     242// var_dump($path.$pathid.sprintf($typeobj->format, $typeobj->prefix,$Id,$typeobj->ext)); 
    233243    return $path.$pathid.sprintf($typeobj->format, $typeobj->prefix,$Id,$typeobj->ext); 
    234244  } 
  • trunk/catalog/common/classes/osCSS_pdf.php

    r4027 r4051  
    4242    require_once(DIR_FS_CATALOG.DIR_WS_COMMON_FUNCTIONS.'pdf_output.php'); 
    4343 
     44                // if module modele exists load  
     45                include_once(DIR_FS_ROOT_DOCS . 'modeles/pdf/'. USE_MODELE_PDF.'/'.USE_MODELE_PDF.'.php'); 
     46 
    4447    define('LOGO_SHOP_FOR_PRINT',HTTP_SERVER. 'document.php?mod=img&i='. str_replace('//','/',STORE_LOGO_PRINT) ); 
    4548  } 
     
    6669    /// BO 
    6770    if(is_object($oscss)) 
    68       $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/template_pdf/'.self::$type.'.txt'); 
     71      $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modeles/pdf/'.USE_MODELE_PDF.'.txt'); 
    6972 
    7073    /// FO 
     
    8386 
    8487    self::filelang(); 
    85  
    86     if($type=='labels')self::$pdf=new PDF_label(); 
     88                $cl = USE_MODELE_PDF; 
     89                if(class_exists($cl)) self::$pdf=new $cl(); 
     90    elseif($type=='labels')self::$pdf=new PDF_label(); 
    8791    else self::$pdf=new PDF(); 
    8892 
     
    121125  */ 
    122126  public static function getPathModele(){ 
    123     return DIR_WS_MODULES . 'template_pdf/' . self::$type.'.php'; 
     127    return DIR_FS_ROOT_DOCS . 'modeles/pdf/'. USE_MODELE_PDF.'/publicCustomers/'. self::$type.'.php'; 
    124128  } 
    125129 
     
    131135  public static function get_module($pull_down=true){ 
    132136    global $messageStack; 
    133     if (!is_dir(BATCH_PRINT_INC)) $messageStack->add_session(sprintf(__("error problem opening directory %s  "),BATCH_PRINT_INC), 'error'); 
     137    if (!is_dir(BATCH_PRINT_INC))  
     138                        $messageStack->add_session(sprintf(__("error problem opening directory %s  "),BATCH_PRINT_INC), 'error'); 
    134139 
    135140    $file_type_array = array(); 
    136141    foreach(scan(BATCH_PRINT_INC) as $file) { 
    137         $ext = strrchr($file, "."); 
    138         if ($ext == ".php") 
    139           if($pull_down) $file_type_array[] = array('id' => substr($file,0,-4),'text' => __('BP template '.str_replace(array('-'),array("_"),substr($file,0,-4)))); 
    140           else $file_type_array[] = substr($file,0,-4); 
     142                        $ext = strrchr($file, "."); 
     143                        if ($ext == ".php") 
     144                                if($pull_down) $file_type_array[] = array('id' => substr($file,0,-4),'text' => __('BP template '.str_replace(array('-'),array("_"),substr($file,0,-4)))); 
     145                                else $file_type_array[] = substr($file,0,-4); 
    141146    } 
    142147    return $file_type_array; 
  • trunk/catalog/common/functions/pdf_output.php

    r4027 r4051  
    290290*/ 
    291291function tep_correct_entitie_put_pdf($chaine,$utf8=true){ 
    292   $array=array('&euro;','€'); 
    293   $array2=array(chr(128),chr(128)); 
     292  $array=array('&euro;','€','\r\n'); 
     293  $array2=array(chr(128),chr(128), chr(10)); 
    294294  if($utf8)$chaine=str_replace($array,$array2,utf8_decode($chaine)); 
    295295  else $chaine=str_replace($array,$array2,$chaine);