소스 검색

[Admin] Export étiquettes avancées : ajustements

feature/souke
Guillaume Bourgeois 11 달 전
부모
커밋
b33a8249e0
2개의 변경된 파일11개의 추가작업 그리고 9개의 파일을 삭제
  1. +1
    -1
      backend/views/distribution/shopping-cart-labels.php
  2. +10
    -8
      common/logic/Distribution/Distribution/Export/DistributionShoppingCartLabelsPdfGenerator.php

+ 1
- 1
backend/views/distribution/shopping-cart-labels.php 파일 보기

@@ -8,7 +8,7 @@ $i = 0;
foreach($ordersArray as $key => $order) {
$index ++;

echo $distributionShoppingCartLabelsPdfGenerator->getShoppingCartLabelAsHtml($order);
echo $distributionShoppingCartLabelsPdfGenerator->getShoppingCartLabelAsHtml($order, $index);

if($index == $shoppingCartLabelsPerColumn) {
$index = 0;

+ 10
- 8
common/logic/Distribution/Distribution/Export/DistributionShoppingCartLabelsPdfGenerator.php 파일 보기

@@ -145,20 +145,22 @@ class DistributionShoppingCartLabelsPdfGenerator extends AbstractGenerator imple
}';

if($isSpecificFormat) {
$paddingShoppingCartLabel = 3;
$specificFormatWidth = $specificFormatWidth - 2 * $paddingShoppingCartLabel;
$specificFormatHeight = $specificFormatHeight - 2 * $paddingShoppingCartLabel;
$paddingWidthShoppingCartLabel = 8;
$paddingHeightShoppingCartLabel = 5;
$specificFormatWidth = $specificFormatWidth - 2 * $paddingWidthShoppingCartLabel;
$specificFormatHeight = $specificFormatHeight - 2 * $paddingHeightShoppingCartLabel + 1;

$css .= '
.shopping-cart-label {
box-sizing: border-box;
padding: '.$paddingShoppingCartLabel.'mm;
padding-top: '.$paddingHeightShoppingCartLabel.'mm;
padding-bottom: '.$paddingHeightShoppingCartLabel.'mm;
padding-left: '.$paddingWidthShoppingCartLabel.'mm;
padding-right: '.$paddingWidthShoppingCartLabel.'mm;
width: '.$specificFormatWidth.'mm;
height: '.$specificFormatHeight.'mm;
display: block;
float: left;
/*border: solid 1px red;*/
}';
}
else {
@@ -179,9 +181,9 @@ class DistributionShoppingCartLabelsPdfGenerator extends AbstractGenerator imple
return $css;
}

public function getShoppingCartLabelAsHtml(Order $order): string
public function getShoppingCartLabelAsHtml(Order $order, int $index): string
{
return '<div class="shopping-cart-label">
return '<div class="shopping-cart-label shopping-cart-label-'.$index.'">
<div class="inner">
<div class="username">
'.$this->orderSolver->getOrderUsername($order).'

Loading…
취소
저장