1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
|
{*
* New BSD License
* ---------------
*
* Copyright (c) 2009, Ondřej Brejla <ondrej@brejla.cz>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the "Eciovni" nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*}
{*
* @param string $title
* @param string $id
*
* @param string $supplierName
* @param string $supplierStreet
* @param string $supplierHouseNumber
* @param string $supplierCity
* @param string $supplierZip
* @param string $supplierIn
* @param string $supplierTin
* @param string $supplierAccountNumber
*
* @param string $dateOfIssuance
* @param string $expirationDate
* @param string $dateOfVatRevenueRecognition
*
* @param string $variableSymbol
* @param string $specificSymbol
* @param string $constantSymbol
*
* @param string $customerName
* @param string $customerStreet
* @param string $customerHouseNumber
* @param string $customerCity
* @param string $customerZip
* @param string $customerIn
* @param string $customerTin
* @param string $customerAccountNumber
*
* @param Item[] $items
*
* @param float $finalUntaxedValue
* @param float $finalTaxValue
* @param float $finalValue
*}
<html lang="cs">
<head>
<meta http-equiv="Content-Language" content="cs">
</head>
<body>
<style type="text/css">
body {
font-family: Arial;
}
table {
font-size: 12px;
}
</style>
<div>
<div style="text-align:right;border-bottom:2px solid #000000;color:#1A5DAC;font-weight:bold;font-size:20px">
{$title} - {$id}
</div>
<table>
<tr>
<td width="{$contactSizeRatio}%">
<span style="color:#1A5DAC;font-weight:bold;font-size:12px">Dodavatel:</span>
<table style="font-weight:bold;margin-bottom:15px">
<tr>
<td>{$supplierName}</td>
</tr>
<tr>
<td>{$supplierStreet} {$supplierHouseNumber}</td>
</tr>
<tr>
<td>{$supplierCity}, {$supplierZip}</td>
</tr>
</table>
<table style="color:#1A5DAC;margin-bottom:15px">
<tr n:if="$supplierIn">
<td>IČ:</td>
<td>{$supplierIn}</td>
</tr>
<tr n:if="$supplierTin">
<td>DIČ:</td>
<td>{$supplierTin}</td>
</tr>
</table>
<table style="width:100%;margin-bottom:15px" n:if="$supplierAccountNumber">
<tr>
<td>Číslo účtu:</td>
<td style="text-align:center;border:3px solid #000000;font-weight:bold" width="220">
{$supplierAccountNumber}
</td>
</tr>
</table>
<table style="width:100%">
<tr>
<td>Forma úhrady:</td>
<td style="text-align:right">{$paymentMethod}</td>
</tr>
<tr n:if="$dateOfIssuance">
<td>Datum vystavení:</td>
<td style="text-align:right">{$dateOfIssuance|replace:' ':' '|noescape}</td>
</tr>
<tr n:if="$expirationDate">
<td>Datum splatnosti:</td>
<td style="text-align:right">{$expirationDate|replace:' ':' '|noescape}</td>
</tr>
<tr n:if="$dateOfVatRevenueRecognition">
<td>Datum uskutečnění zdanitelného plnění:</td>
<td style="text-align:right">{$dateOfVatRevenueRecognition|replace:' ':' '|noescape}</td>
</tr>
</table>
</td>
<td width="{100 - $contactSizeRatio}%" align="right">
<table style="margin-bottom:15px" n:if="$constantSymbol || $specificSymbol || $variableSymbol">
<tr n:if="$variableSymbol">
<td style="text-align:right">Variabilní symbol:</td>
<td style="text-align:left">{$variableSymbol}</td>
</tr>
<tr n:if="$specificSymbol">
<td style="text-align:right">Specifický symbol:</td>
<td style="text-align:left">{$specificSymbol}</td>
</tr>
<tr n:if="$constantSymbol">
<td style="text-align:right">Konstantní symbol:</td>
<td style="text-align:left">{$constantSymbol}</td>
</tr>
</table>
<table style="border: 3px solid #000000">
<tr>
<td width="350">
<span style="color:#1A5DAC;font-weight:bold;font-size:12px">Odběratel:</span>
<table style="margin-bottom:15px">
<tr n:if="$customerIn">
<td>IČ:</td>
<td>{$customerIn == 0 ? '' : $customerIn}</td>
</tr>
<tr n:if="$customerTin">
<td>DIČ:</td>
<td>{$customerTin}</td>
</tr>
<tr n:if="$customerAccountNumber">
<td>Číslo účtu:</td>
<td>{$customerAccountNumber}</td>
</tr>
</table>
<table style="font-weight:bold;margin-bottom:15px">
<tr n:if="$customerName">
<td>{$customerName}</td>
</tr>
<tr n:if="$customerStreet || $customerHouseNumber">
<td>{$customerStreet} {$customerHouseNumber}</td>
</tr>
<tr n:if="$customerCity || $customerZip">
<td>{$customerCity}, {$customerZip}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div style="border:1px solid #BEC8CE;clear:both;margin-bottom:15px">
<table style="width:100%">
<tr>
<td><strong>Položka</strong></td>
<td style="text-align:right"><strong>Cena/jedn.</strong></td>
<td style="text-align:right"><strong>Počet</strong></td>
<td style="text-align:right"><strong>%DPH</strong></td>
<td style="text-align:right"><strong>DPH</strong></td>
<td style="text-align:right"><strong>Cena (Kč)</strong></td>
</tr>
{foreach $items as $item}
<tr>
<td>{$item->getDescription()}</td>
<td style="text-align:right">{$item->countUntaxedUnitValue()|round|replace:' ':' '|noescape}</td>
<td style="text-align:right">{$item->getUnits()|round|replace:' ':' '|noescape}</td>
<td style="text-align:right">{$item->getTax()->inUpperDecimal() * 100 - 100|round|replace:' ':' '|noescape}</td>
<td style="text-align:right">{$item->countTaxValue()|round|replace:' ':' '|noescape}</td>
<td style="text-align:right">{$item->countFinalValue()|round|replace:' ':' '|noescape}</td>
</tr>
{/foreach}
</table>
</div>
<div style="border:2px solid #000000;margin-bottom:15px">
<table style="width:100%">
<tr>
<td>Celkem bez DPH (Kč):</td>
<td style="text-align:right">{$finalUntaxedValue|round|replace:' ':' '|noescape}</td>
</tr>
<tr>
<td>DPH (Kč):</td>
<td style="text-align:right">{$finalTaxValue|round|replace:' ':' '|noescape}</td>
</tr>
<tr style="font-size:20px">
<td><strong>Cena celkem s DPH (Kč):</strong></td>
<td style="text-align:right"><strong>{$finalValue|round|replace:' ':' '|noescape}</strong></td>
</tr>
</table>
</div>
<div n:if="$stampPath" style="text-align:right;padding-right:100px">
<div style="font-weight:bold">Vystavil, razítko, podpis:</div>
<img src="data:image/png;base64,{base64_encode(file_get_contents($stampPath))|noescape}" alt="Razitko s podpisem"/>
</div>
</div>
</body>
</html>
|