Projekt

Allgemein

Profil

GX-Bug #43875 » OrderDetailsCurrencyFix.patch

/admin/html/compatibility/order_details.php - Till Tepelmann, 02.12.2015 15:43

Unterschiede anzeigen:

src/admin/html/compatibility/order_details.php (revision )
157 157
										</div>
158 158
									</div>
159 159
								</th>
160
								<?php if($productInformation['allow_tax']) { ?>
160
								<th class="text-right">
161
									<div class="grid">
162
										<div class="span12">
163
											<?php echo TABLE_HEADING_GROSS; ?>
164
										</div>
165
									</div>
166
								</th>
161
									<th class="text-right">
162
										<div class="grid">
163
											<div class="span12">
164
												<?php echo TABLE_HEADING_GROSS; ?>
165
											</div>
166
										</div>
167
									</th>
168
								<?php } ?>
167 169
								<th class="text-right">
168 170
									<div class="grid">
169 171
										<div class="span12">
......
250 252
										<div class="grid">
251 253
											<div class="span12">
252 254
												<?php
255
												$net = $productInformation['price'];
256

  
257
												if($productInformation['allow_tax'])
258
												{
253
												$divideValue = 100 + (int)$productInformation['tax'];
254
												$net         = ($productInformation['price'] / $divideValue) * 100;
259
													$divideValue = 100 + (int)$productInformation['tax'];
260
													$net         = ($productInformation['price'] / $divideValue) * 100;
261
												}
255 262

  
256
												echo number_format($net, 2) . ' ' . $_SESSION['currency'];
263
												echo number_format($net, 2) . ' ' . $GLOBALS['order']->info['currency'];
257 264
												?>
258 265
											</div>
259 266
										</div>
......
265 272
											</div>
266 273
										</div>
267 274
									</td>
275
									<?php if($productInformation['allow_tax']) { ?>
268
									<td class="text-right">
269
										<div class="grid">
270
											<div class="span12">
271
												<?php echo number_format($productInformation['price'], 2) . ' '
276
										<td class="text-right">
277
											<div class="grid">
278
												<div class="span12">
279
													<?php echo number_format($productInformation['price'], 2) . ' '
272
												           . $_SESSION['currency']; ?>
280
													           . $GLOBALS['order']->info['currency']; ?>
273
											</div>
274
										</div>
275
									</td>
281
												</div>
282
											</div>
283
										</td>
284
									<?php } ?>
276 285
									<td class="text-right">
277 286
										<div class="grid">
278 287
											<div class="span12">
279 288
												<?php echo number_format($productInformation['final_price'], 2) . ' '
280
												           . $_SESSION['currency']; ?>
289
												           . $GLOBALS['order']->info['currency']; ?>
281 290
											</div>
282 291
										</div>
283 292
									</td>
284 293
								</tr>
285 294
							<?php endforeach; ?>
286 295
							<tr id="order-sum-row">
287
								<td colspan="6" class="text-right">
296
								<td colspan="<?php if($productInformation['allow_tax']) { ?>6<?php } else { ?>5<?php } ?>" class="text-right">
288 297
									<div class="grid">
289 298
										<?php
290 299
										$counter          = 0;
......
319 328
						</tbody>
320 329
						<tfoot>
321 330
							<tr>
322
								<td colspan="6" class="text-right total">
331
								<td colspan="<?php if($productInformation['allow_tax']) { ?>6<?php } else { ?>5<?php } ?>" class="text-right total">
323 332
									<label><?php echo $GLOBALS['order']->totals[count($GLOBALS['order']->totals)
324 333
									                                            - 1]['title']; ?></label>
325 334
								</td>
......
720 729
									<?php echo $amountOfOrders; ?>
721 730
								</a>
722 731
							</span><br />
723
							<span><?php echo $sumOrderTotal . ' ' . $_SESSION['currency']; ?></span>
732
							<span><?php echo $sumOrderTotal . ' ' . $GLOBALS['order']->info['currency']; ?></span>
724 733
						</div>
725 734
					</div>
726 735
				</div>
(1-1/2)