Changeset 4051
- Timestamp:
- 03/01/12 15:58:39 (15 months ago)
- Location:
- trunk/catalog
- Files:
-
- 3 added
- 10 modified
-
Documents/modeles/pdf/harry/harry.php (added)
-
Documents/modeles/pdf/harry/publicCustomers/delivery.php (added)
-
Documents/modeles/pdf/harry/publicCustomers/invoice.php (modified) (6 diffs)
-
Documents/modeles/pdf/harry/publicCustomers/packingslip.php (modified) (9 diffs)
-
admin/document.php (modified) (2 diffs)
-
admin/includes/classes/drivers/sqlorder.php (modified) (11 diffs)
-
admin/includes/gabarit/orders/display_view.edit.gab (modified) (4 diffs)
-
admin/includes/languages/fr_FR/modeles/pdf/harry/harry.txt (added)
-
admin/includes/languages/fr_FR/modules/pages/orders.txt (modified) (7 diffs)
-
admin/includes/modules/pages/orders.php (modified) (15 diffs)
-
common/classes/DatasFiles.php (modified) (7 diffs)
-
common/classes/osCSS_pdf.php (modified) (5 diffs)
-
common/functions/pdf_output.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/invoice.php
r3886 r4051 1 1 <?php 2 2 /** 3 @licence GPL 2005-201 0The osCSS developers - osCSS Open Source E-commerce3 @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce 4 4 @portion code Copyright (c) 2002 osCommerce 5 5 @package osCSS-2 <www http://www.oscss.org> 6 @version 2. 0.97 @date 16/06/10, 10:546 @version 2.1.1 7 @date 01/03/2012, 10:55 8 8 @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr> 9 9 @encode UTF-8 … … 15 15 $pdf->AddPage(); 16 16 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'])){ 17 114 /** 18 Ligne + titre doc 115 Method payement 19 116 */ 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 100 134 101 135 /** 102 136 Block detail commande 103 137 */ 138 139 140 141 104 142 //Fields Name position 105 143 $Y_Fields_Name_position = ($le_Y+$hauteur_block+$marge_block); … … 108 146 $Y_Table_Position = ($Y_Fields_Name_position+6); 109 147 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 111 199 //Show the products information line by line 112 200 for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { … … 124 212 $ligne="\n - ".$order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value']; 125 213 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']; 129 217 } else { 130 $order->products[$i]['name'] .=$ligne;131 $nbr_l +=1;218 $order->products[$i]['name'] .=$ligne; 219 $nbr_l +=1; 132 220 } 133 221 } 134 222 } 223 224 135 225 $hauteur_block_r=($nbr_l*$hauteur_block_r); 226 $X_pos = 6; 227 228 229 230 $pdf->SetXY( $X_pos , $Y_Table_Position); 231 136 232 // 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 141 240 // 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 146 249 // 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 151 257 // 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'); 165 279 166 280 /* Check for product line overflow*/ … … 188 302 $pdf->SetY($Y_Table_Position ); 189 303 $pdf->SetX(146); 190 $pdf->MultiCell(5 0,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'); 191 305 } 192 306 … … 199 313 while ($orders_comments = $orders_comments_query->fectAssoc()) { 200 314 if(tep_not_null($orders_comments['comments'])){ 201 $pdf->SetFont( 'Arial','',10);315 $pdf->SetFont($pdf->font,'',10); 202 316 $pdf->SetY($Y_Table_Position); 203 317 $pdf->SetX(6); -
trunk/catalog/Documents/modeles/pdf/harry/publicCustomers/packingslip.php
r3886 r4051 1 1 <?php 2 2 /** 3 @licence GPL 2005-201 0The osCSS developers - osCSS Open Source E-commerce3 @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce 4 4 @portion code Copyright (c) 2002 osCommerce 5 5 @package osCSS-2 <www http://www.oscss.org> 6 @version 2. 0.97 @date 16/06/10, 10:556 @version 2.1.1 7 @date 01/03/2012, 10:55 8 8 @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr> 9 9 @encode UTF-8 … … 17 17 $pdf->AddPage(); 18 18 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 37 74 $le_Y=67; 38 75 $hauteur_block=35; … … 40 77 $pdf->SetDrawColor(0); 41 78 $pdf->SetLineWidth(0.2); 42 $pdf->SetFillColor( 245);79 $pdf->SetFillColor($pdf->bg_color_1); 43 80 $pdf->RoundedRect(6, $le_Y, 90, 35, 2, 'DF'); 44 81 45 82 //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(__(''))); 49 86 $pdf->SetX(0); 50 87 $pdf->SetY(80); 51 88 $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 */ 53 95 54 96 //Draw Box for Delivery Address … … 56 98 $pdf->SetLineWidth(0.2); 57 99 $pdf->SetFillColor(255); 58 $pdf->RoundedRect(1 08, $le_Y, 90, 35, 2, 'DF');100 $pdf->RoundedRect(113, $le_Y, 90, 35, 2, 'DF'); 59 101 60 102 //Draw the invoice delivery address text 61 $pdf->SetFont( 'Arial','B',10);62 $pdf->SetTextColor( 0);63 $pdf->Text(11 3,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'))); 64 106 $pdf->SetX(0); 65 107 $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 87 113 88 114 /** … … 90 116 */ 91 117 $le_Y=($le_Y+$hauteur_block+$marge_block); 92 $hauteur_block= 11;118 $hauteur_block=9; 93 119 $pdf->SetDrawColor(0); 94 120 $pdf->SetLineWidth(0.2); 95 $pdf->SetFillColor( 245);96 $pdf->RoundedRect(6, $le_Y, 19 2, $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'); 98 124 99 125 … … 107 133 $Y_Table_Position = ($Y_Fields_Name_position+6); 108 134 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 110 149 //Show the products information line by line 111 150 for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) { … … 134 173 $hauteur_block_r=($nbr_l*$hauteur_block_r); 135 174 // quantite 136 $pdf->SetFont( 'Arial','',10);175 $pdf->SetFont($pdf->font,'',10); 137 176 $pdf->SetY($Y_Table_Position); 138 177 $pdf->SetX(6); … … 141 180 $pdf->SetY($Y_Table_Position); 142 181 $pdf->SetX(15); 143 $pdf->SetFont( 'Arial','',8);182 $pdf->SetFont($pdf->font,'',8); 144 183 $pdf->MultiCell(25,$hauteur_block_r,tep_correct_entitie_put_pdf($order->products[$i]['model']),1,'C'); 145 184 … … 147 186 $pdf->SetY($Y_Table_Position); 148 187 $pdf->SetX(40); 149 $pdf->SetFont( 'Arial','',8);150 $pdf->MultiCell(1 58,$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'); 151 190 152 191 $Y_Table_Position += $hauteur_block_r; -
trunk/catalog/admin/document.php
r4018 r4051 67 67 @brief Traitement des pdf 68 68 */ 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 69 83 case 'packingslip': 70 84 if(( $filepath=DatasFiles::GetDoc('packingslip', $_REQUEST['id'])) && file_exists(DIR_FS_ROOT_DOCS.$filepath)) { 71 //We send to a browser72 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'); 78 92 79 readfile(DIR_FS_ROOT_DOCS.$filepath);93 readfile(DIR_FS_ROOT_DOCS.$filepath); 80 94 } 81 95 break; … … 83 97 case 'invoice': 84 98 if(( $filepath=DatasFiles::GetDoc('invoices', $_REQUEST['id'])) && file_exists(DIR_FS_ROOT_DOCS.$filepath)) { 85 //We send to a browser86 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'); 92 106 93 readfile(DIR_FS_ROOT_DOCS.$filepath);107 readfile(DIR_FS_ROOT_DOCS.$filepath); 94 108 } 95 109 break; -
trunk/catalog/admin/includes/classes/drivers/sqlorder.php
r3964 r4051 164 164 165 165 if(!isset($row->activate) || empty($row->activate) ) 166 $shipping = false ;166 $shipping = false ; 167 167 else 168 $shipping = true ;168 $shipping = true ; 169 169 170 170 171 171 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'); 183 183 } 184 184 else { 185 // force reset data186 $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'); 197 197 } 198 198 } … … 203 203 204 204 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 selected211 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 history216 */217 self::$comment[] = __('orders inline comment update method payment');218 break;219 case 'shipping':220 221 /**222 TODO Add no methode force223 */224 // if($shipping) {225 $sql_data_array['class_shipping'] = (string)$row ;226 227 /// force check and save module payment selected228 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 history234 */235 self::$comment[] = __('orders inline comment update method delivery');236 // }237 // else238 // // $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 } 242 242 243 243 } … … 260 260 261 261 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 value276 // 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 308 262 309 263 if($error !=false) … … 456 410 $par = array( 457 411 '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 469 413 ( 470 414 'orders_id' => '', … … 495 439 ), 496 440 497 'totals' => Array441 'totals' => Array 498 442 ( 499 443 // '0' => Array … … 517 461 ), 518 462 519 'products' => Array463 'products' => Array 520 464 ( 521 465 '0' => Array … … 552 496 ), 553 497 554 'customer' => Array498 'customer' => Array 555 499 ( 556 500 'id' => '', … … 569 513 ), 570 514 571 'delivery' => Array515 'delivery' => Array 572 516 ( 573 517 'name' =>'', … … 582 526 ), 583 527 584 'content_type' =>'',585 'coupon' =>'',586 'billing' => Array528 'content_type' =>'', 529 'coupon' =>'', 530 'billing' => Array 587 531 ( 588 532 'name' =>'', … … 597 541 ), 598 542 599 'history' => Array543 'history' => Array 600 544 ( 601 545 // '0' => Array … … 609 553 ), 610 554 611 'lasthistory' => Array555 'lasthistory' => Array 612 556 ( 613 557 // 'date_added' => 10/11/2011 16:05:05 -
trunk/catalog/admin/includes/gabarit/orders/display_view.edit.gab
r4039 r4051 1 1 <?php 2 2 /** 3 @licence GPL 2005-201 1The osCSS developers - osCSS Open Source E-commerce3 @licence GPL 2005-2012 The osCSS developers - osCSS Open Source E-commerce 4 4 @portion code Copyright (c) 2002 osCommerce 5 5 @package osCSS-2 <www http://www.oscss.org> 6 6 @version 2.1.1 7 @date 01/ 11/11, 11:357 @date 01/03/2012, 11:35 8 8 @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr> 9 9 @encode UTF-8 … … 433 433 434 434 <?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> 436 445 <?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; ?> 477 464 <?php endforeach; ?> 478 </ul> 465 </tbody> 466 </table> 479 467 <?php endif; ?> 480 468 481 469 <br /> 482 470 471 <div> 472 <h4><?php echo __('heading form expedition'); ?></h4> 483 473 <!-- DEB Form add expedition --> 484 474 <?php echo tep_draw_form('add_deliv', orders::FILENAME,'oID='.orders::$oID.'&action=shipping&method=add', 'post', ' class="block_form"'); ?> … … 546 536 </div> 547 537 <?php endif; ?> 538 </div> 548 539 <!-- END Form add expedition --> 549 540 … … 620 611 621 612 622 <?php 613 614 <div class="main-orders block fleft w_50 padd_w"> 615 </div> 616 617 618 <?php 623 619 /** 624 620 DRAW BLOCK DOCS EXISTS OR LINK PDF CREATE 625 621 */ 626 ?>622 $datadocs=new DatasFiles; ?> 627 623 <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&file_type=packingslip&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&file_type=invoice&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&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"> </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&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&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> 668 688 669 689 -
trunk/catalog/admin/includes/languages/fr_FR/modules/pages/orders.txt
r4048 r4051 15 15 $lang['heading documents']="Documents" ; 16 16 17 $lang['tab orders briefs']="D étails" ;17 $lang['tab orders briefs']="Details" ; 18 18 $lang['tab orders details']="Commande" ; 19 19 $lang['tab orders history']="Suivi" ; … … 30 30 $lang['table heading id']="Id" ; 31 31 $lang['table heading action']="Action" ; 32 $lang['table heading quantity']="Q té." ;32 $lang['table heading quantity']="Qté." ; 33 33 $lang['table heading products model']="ModÚle" ; 34 34 $lang['table heading products']="Produits" ; … … 47 47 $lang['table heading current status']="Statut" ; 48 48 $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é" ; 51 51 $lang['table heading quantity in order']="Commande" ; 52 52 … … 78 78 $lang['entry shipping address actived']="Utilisation d'une adresse de livraison" ; 79 79 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" ; 82 84 83 85 … … 85 87 $lang['heading title search montant']="Montant : " ; 86 88 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']="U RLde 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 : " ; 90 92 91 93 $lang['not this status']="Sauf " ; … … 97 99 $lang['text info multi action detail']="Changer les status pour : " ; 98 100 $lang['text info multi heading upload order']="Actions multiples " ; 99 $lang['image modify multi']="Ex écuter " ;101 $lang['image modify multi']="Executer " ; 100 102 101 103 $lang['text info heading delete order']="Supprimer la commande" ; … … 120 122 $lang['pdf generate']="Generer" ; 121 123 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 122 134 $lang['error order not update address']="Erreur : adresse de la commande non mise à jour" ; 123 $lang['success order update address']="Suc es, mise à jour de l'adresse de la commande" ;135 $lang['success order update address']="Succes, mise à jour de l'adresse de la commande" ; 124 136 125 $lang['error order not update mod']="Erreur : m éthode de la commande non mise à jour" ;126 $lang['success order update mod']="Suc es, 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" ; 127 139 $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" ; 129 141 $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" ; 131 143 132 144 $lang['error order does not exist']="Erreur : La commande n'existe pas." ; 133 145 $lang['success order updated']="SuccÚs : La commande est mise à jour avec succÚs." ; 134 146 $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']="Sup pression de la commande effectué" ;136 $lang['error order not delete']="Erreur lors de la suppres sion 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" ; 137 149 ?> -
trunk/catalog/admin/includes/modules/pages/orders.php
r4050 r4051 207 207 */ 208 208 case 'pdf': 209 $ oID=(int)$_REQUEST['oID'];209 $ID=(int)$_REQUEST['id']; 210 210 $type=$_REQUEST['file_type'] ; 211 211 global $pdf, $currencies; 212 212 osCSS_pdf::getInstance(); 213 213 214 header("Content-Type: text/html; charset=iso8859-16"); 214 215 self::$orders_statuses = array_merge(tep_get_status_array('orders'),array(array('id'=>'','text'=>TEXT_NONE))); 215 216 self::$file_type_array= osCSS_pdf::get_module(); … … 218 219 $DF = new DatasFiles; 219 220 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 } 222 234 223 235 osCSS_pdf::OutputAddPage(); … … 225 237 include(osCSS_pdf::getPathModele()); 226 238 227 $file=$DF->GetDoc(osCSS_pdf::GetPdfType(),$ oID);239 $file=$DF->GetDoc(osCSS_pdf::GetPdfType(),$ID); 228 240 229 241 if(file_exists($file)) … … 235 247 $pdf=osCSS_pdf::OutputEnd(); 236 248 249 tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit')); 237 250 break; 238 251 … … 419 432 } 420 433 434 // adjust date update 435 sqlorder::update(array('id'=>$oID)); 421 436 422 437 tep_redirect(tep_href_link(self::FILENAME, 'oID='.$oID.'&action=edit')); … … 534 549 535 550 case 'edit': 536 537 // if(self::test_oID((int)self::$oID)) { 551 $activ_add = array(); 552 538 553 $res= sqlorder::fetch(array('id'=>self::$oID)); 539 554 … … 543 558 $res->service = array(); 544 559 $res->pshipping = array(); 545 560 $pdt_db_arr = array(); 546 561 547 562 /** … … 549 564 */ 550 565 foreach($res->products as $rows){ 551 566 $pdt_db_arr[$rows['rowid']] = $rows; 567 // print_r($rows); 568 // exit; 552 569 /// No physical 553 570 if(in_array($rows['type'], explode(',', TYPE_VIRTUAL_PRODUCTS)) ){ … … 570 587 else { 571 588 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 ". 573 590 " FROM ".TABLE_SHIPPING." cc ". 574 591 " LEFT JOIN ".TABLE_SHIPPING_PRODUCTS." cp ON (cc.row_id = cp.shipping_id) ". … … 578 595 $_query2 = $DB->query($sql); 579 596 $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 587 599 588 600 if($_query2->__get('numRows')){ 589 601 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']; 594 603 } 604 $result['qt_expedie'] = $qt; 605 $result['qt_orders'] = $rows['qty']; 595 606 $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; 597 608 $res->pshipping[]=$robj; 598 609 } 599 610 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); 601 614 $activ_add[] = true; 602 615 } … … 610 623 else 611 624 $res->allshipping[] = $result4; 612 // } 625 626 // foreach($rows) 627 613 628 614 629 $res->display_service = (count($res->service) <= 0 )? false : true; 615 630 $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; 618 634 return $res; 619 635 break; … … 627 643 628 644 /** 629 @remarks hoose address book if active module adress book645 @remarks choose address book if active module adress book 630 646 */ 631 647 if(isset($res->mod['address_book'])) { … … 671 687 $adjust=new objectInfo(self::$InitInfo['adjust']); 672 688 673 // var_dump($adjust->sWhere);674 // exit;675 689 if(tep_not_null($adjust->sWhere)){ 676 690 $adjust->sWhere=str_replace( … … 681 695 } 682 696 683 // var_dump($adjust->sWhere);684 // exit;685 697 $wh=''; 686 698 if(self::$view =='opened') … … 699 711 $_split = new splitPageResults($adjust->page, $adjust->rowbyp, $query_raw, $query_numrows); 700 712 701 // var_dump($query_raw);702 713 $_query = $DB->query($query_raw); 703 714 -
trunk/catalog/common/classes/DatasFiles.php
r3817 r4051 100 100 case 'customer': 101 101 case 'customers': 102 return 40;102 return 40; 103 103 break; 104 104 … … 107 107 case 'categorie': 108 108 case 'categories': 109 return 30;109 return 30; 110 110 break; 111 111 112 112 case 'product': 113 113 case 'products': 114 return 20;114 return 20; 115 115 break; 116 116 … … 119 119 case 'orders': 120 120 case 'order': 121 return 10;121 return 10; 122 122 break; 123 123 124 124 case 'packingslip': 125 return 11;125 return 11; 126 126 break; 127 127 … … 130 130 case 'invoices': 131 131 case 'invoice': 132 return 12; 133 break; 132 return 12; 133 break; 134 135 case 'delivery': 136 return 13; 137 break; 138 134 139 } 135 140 return 0; … … 144 149 switch($type_int){ 145 150 case 20: 146 $obj->prefix = '';147 $obj->format = '%s';148 $obj->folder = 'products';149 $obj->ext = '';// fichier image151 $obj->prefix = ''; 152 $obj->format = '%s'; 153 $obj->folder = 'products'; 154 $obj->ext = '';// fichier image 150 155 break; 151 156 152 157 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'; 157 162 break; 158 163 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'; 163 168 break; 164 169 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'; 169 180 break; 170 181 } … … 203 214 $pathid=self::PathForId($id); 204 215 205 // $typeint = ;206 216 $type=self::SpecificType(self::ConvertType($type)); 207 217 $path = self::InitFolder($type->folder); … … 227 237 228 238 $typeobj=self::SpecificType($typeint); 229 // var_dump($ path.$pathid.sprintf($type->format, $type->prefix,$Id,$type->ext));239 // var_dump($typeobj); 230 240 $path = self::InitFolder($typeobj->folder); 231 241 self::GetPathid($type, $id); 232 242 // var_dump($path.$pathid.sprintf($typeobj->format, $typeobj->prefix,$Id,$typeobj->ext)); 233 243 return $path.$pathid.sprintf($typeobj->format, $typeobj->prefix,$Id,$typeobj->ext); 234 244 } -
trunk/catalog/common/classes/osCSS_pdf.php
r4027 r4051 42 42 require_once(DIR_FS_CATALOG.DIR_WS_COMMON_FUNCTIONS.'pdf_output.php'); 43 43 44 // if module modele exists load 45 include_once(DIR_FS_ROOT_DOCS . 'modeles/pdf/'. USE_MODELE_PDF.'/'.USE_MODELE_PDF.'.php'); 46 44 47 define('LOGO_SHOP_FOR_PRINT',HTTP_SERVER. 'document.php?mod=img&i='. str_replace('//','/',STORE_LOGO_PRINT) ); 45 48 } … … 66 69 /// BO 67 70 if(is_object($oscss)) 68 $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/mod ules/template_pdf/'.self::$type.'.txt');71 $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modeles/pdf/'.USE_MODELE_PDF.'.txt'); 69 72 70 73 /// FO … … 83 86 84 87 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(); 87 91 else self::$pdf=new PDF(); 88 92 … … 121 125 */ 122 126 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'; 124 128 } 125 129 … … 131 135 public static function get_module($pull_down=true){ 132 136 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'); 134 139 135 140 $file_type_array = array(); 136 141 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); 141 146 } 142 147 return $file_type_array; -
trunk/catalog/common/functions/pdf_output.php
r4027 r4051 290 290 */ 291 291 function tep_correct_entitie_put_pdf($chaine,$utf8=true){ 292 $array=array('€','â¬' );293 $array2=array(chr(128),chr(128) );292 $array=array('€','â¬','\r\n'); 293 $array2=array(chr(128),chr(128), chr(10)); 294 294 if($utf8)$chaine=str_replace($array,$array2,utf8_decode($chaine)); 295 295 else $chaine=str_replace($array,$array2,$chaine);