Advertisement
Guest User

Untitled

a guest
Jul 21st, 2021
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. PLAIN:
  2. {$subPosition = 0}
  3. {foreach item=details key=position from=$sOrderDetails}
  4. {if $details.swkweSetArticles || !in_array($details.modus, [20, 21])}
  5. {if $details.swkweSetArticles}
  6. {if is_array($details.swkweSetArticles)}
  7. {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles['netAmount'] : $details.swkweSetArticles['grossAmount']}
  8. {$detailPrice = $detailAmount / $details['quantity']}
  9. {else}
  10. {$detailPrice = (!$additional.show_net) ? $details.swkweSetArticles->getNetPrice() : $details.swkweSetArticles->getGrossPrice()}
  11. {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles->getNetAmount() : $details.swkweSetArticles->getGrossAmount()}
  12. {/if}
  13. {else}
  14. {$detailPrice = $details.price}
  15. {$detailAmount = $details.amount}
  16. {/if}
  17.  
  18. {{$position-$subPosition+1}|fill:4} {$details.ordernumber|fill:20} {$details.articlename|fill:49} {$details.quantity|fill:6} {$detailPrice|padding:8|currency|unescape:"htmlall"} {$detailAmount|padding:8|currency|unescape:"htmlall"}
  19. {if $details.swkweSetArticles}
  20. {if is_array($details.swkweSetArticles)}
  21. {foreach $details.swkweSetArticles['options'] as $option}
  22. - {if $option['quantity'] != 1}{$option['quantity']}x {/if}{$option['name']}
  23. {if $option['subSetOrder']}
  24. {foreach $option['subSetOrder']['options'] as $subSetOption}
  25. - {if {$subSetOption['quantity']} != 1}{$subSetOption['quantity']}x {/if}{$subSetOption['name']}
  26. {/foreach}
  27. {/if}
  28. {/foreach}
  29. {else}
  30. {foreach $details.swkweSetArticles->getOptions() as $option}
  31. - {if $option->getQuantity() != 1}{$option->getQuantity()}x {/if}{$option->getName()}
  32. {if $option->getSubSetOrder()}
  33. {foreach $option->getSubSetOrder()->getOptions() as $subSetOption}
  34. - {if {$subSetOption->getQuantity()} != 1}{$subSetOption->getQuantity()}x {/if}{$subSetOption->getName()}
  35. {/foreach}
  36. {/if}
  37. {/foreach}
  38. {/if}
  39. {/if}
  40. {elseif in_array($details.modus, [20, 21])}
  41. {$subPosition = $subPosition + 1}
  42. {/if}
  43. {/foreach}
  44.  
  45. HTML:
  46. {$subPosition = 0}
  47. {foreach item=details key=position from=$sOrderDetails}
  48. {if $details.swkweSetArticles || !in_array($details.modus, [20, 21])}
  49. <tr>
  50. <td style="border-bottom:1px solid #cccccc;">{$position-$subPosition+1|fill:4} </td>
  51. <td style="border-bottom:1px solid #cccccc;">{if $details.image.src.0 && in_array($details.modus, [0, 20])}<img style="height: 57px;" height="57" src="{$details.image.src.0}" alt="{$details.articlename}" />{else} {/if}</td>
  52. <td style="border-bottom:1px solid #cccccc;">
  53. {$details.articlename|wordwrap:80|indent:4}<br>
  54. Artikel-Nr: {$details.ordernumber|fill:20}
  55. {if $details.swkweSetArticles}
  56. {if is_array($details.swkweSetArticles)}
  57. {foreach $details.swkweSetArticles['options'] as $option}
  58. <br>- {if $option['quantity'] != 1}{$option['quantity']}x {/if}{$option['name']}
  59. {if $option['subSetOrder']}
  60. {foreach $option['subSetOrder']['options'] as $subSetOption}
  61. <br> - {if $subSetOption['quantity'] != 1}{$subSetOption['quantity']}x {/if}{$subSetOption['name']}
  62. {/foreach}
  63. {/if}
  64. {/foreach}
  65. {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles['netAmount'] : $details.swkweSetArticles['grossAmount']}
  66. {$detailPrice = $detailAmount / $details['quantity']}
  67. {else}
  68. {foreach $details.swkweSetArticles->getOptions() as $option}
  69. <br>- {if $option->getQuantity() != 1}{$option->getQuantity()}x {/if}{$option->getName()}
  70. {if $option->getSubSetOrder()}
  71. {foreach $option->getSubSetOrder()->getOptions() as $subSetOption}
  72. <br> - {if $subSetOption->getQuantity() != 1}{$subSetOption->getQuantity()}x {/if}{$subSetOption->getName()}
  73. {/foreach}
  74. {/if}
  75. {/foreach}
  76. {$detailPrice = (!$additional.show_net) ? $details.swkweSetArticles->getNetPrice() : $details.swkweSetArticles->getGrossPrice()}
  77. {$detailAmount = (!$additional.show_net) ? $details.swkweSetArticles->getNetAmount() : $details.swkweSetArticles->getGrossAmount()}
  78. {/if}
  79. {else}
  80. {$detailPrice = $details.price}
  81. {$detailAmount = $details.amount}
  82. {/if}
  83. </td>
  84. <td style="border-bottom:1px solid #cccccc;">{$details.quantity|fill:6}</td>
  85. <td style="border-bottom:1px solid #cccccc;">{$detailPrice|padding:8|currency}</td>
  86. <td style="border-bottom:1px solid #cccccc;">{$detailAmount|padding:8|currency}</td>
  87. </tr>
  88. {elseif in_array($details.modus, [20, 21])}
  89. {$subPosition = $subPosition + 1}
  90. {/if}
  91. {/foreach}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement