1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
factura.php
См. документацию.
1<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();?><?
2/*
3Данный документ учитывает только налог с мнемоническим кодом "NDS". Остальные налоги при формировании документа не отображаются
4
5Скопируйте этот файл в папку /bitrix/admin/reports и измените по своему усмотрению
6
7$ORDER_ID - ID текущего заказа
8
9$arOrder - массив атрибутов заказа (ID, доставка, стоимость, дата создания и т.д.)
10Следующий PHP код:
11print_r($arOrder);
12выведет на экран содержимое массива $arOrder.
13
14$arOrderProps - массив свойств заказа (вводятся покупателями при оформлении заказа) следующей структуры:
15array(
16 "мнемонический код (или ID если мнемонический код пуст) свойства" => "значение свойства"
17 )
18
19$arParams - массив из настроек Печатных форм
20
21$arUser - массив из настроек пользователя, совершившего заказ
22*/
23?><html xmlns:o="urn:schemas-microsoft-com:office:office"
24xmlns:x="urn:schemas-microsoft-com:office:excel"
25xmlns="http://www.w3.org/TR/REC-html40">
26
27<head>
28<meta http-equiv=Content-Type content="text/html; charset=<?=LANG_CHARSET?>">
29<meta name=ProgId content=Excel.Sheet>
30<title langs="ru">Счет-фактура</title>
31<style>
32<!--table
33 {mso-displayed-decimal-separator:"\.";
34 mso-displayed-thousand-separator:" ";}
35@page
36 {margin:.2in .39in .28in .59in;
37 mso-header-margin:.2in;
38 mso-footer-margin:.28in;
39 mso-page-orientation:landscape;}
40tr
41 {mso-height-source:auto;}
42col
43 {mso-width-source:auto;}
44br
45 {mso-data-placement:same-cell;}
46.style0
47 {mso-number-format:General;
48 text-align:general;
49 vertical-align:bottom;
50 white-space:nowrap;
51 mso-rotate:0;
52 mso-background-source:auto;
53 mso-pattern:auto;
54 color:windowtext;
55 font-size:10.0pt;
56 font-weight:400;
57 font-style:normal;
58 text-decoration:none;
59 font-family:"Arial Cyr";
60 mso-generic-font-family:auto;
61 mso-font-charset:204;
62 border:none;
63 mso-protection:locked visible;
64 mso-style-name:Обычный;
65 mso-style-id:0;}
66.style22
67 {mso-number-format:General;
68 text-align:general;
69 white-space:nowrap;
70 mso-rotate:0;
71 mso-background-source:auto;
72 mso-pattern:auto;
73 color:windowtext;
74 font-size:10.0pt;
75 font-weight:400;
76 font-style:normal;
77 text-decoration:none;
78 font-family:"Arial Cyr";
79 mso-generic-font-family:auto;
80 mso-font-charset:204;
81 border:none;
82 mso-protection:locked visible;
83 mso-style-name:Обычный_Sf_131;}
84.style27
85 {mso-number-format:0%;
86 mso-style-name:Процентный;
87 mso-style-id:5;}
88td
89 {mso-style-parent:style0;
90 padding-top:1px;
91 padding-right:1px;
92 padding-left:1px;
93 mso-ignore:padding;
94 color:windowtext;
95 font-size:10.0pt;
96 font-weight:400;
97 font-style:normal;
98 text-decoration:none;
99 font-family:"Arial Cyr";
100 mso-generic-font-family:auto;
101 mso-font-charset:204;
102 mso-number-format:General;
103 text-align:general;
104 vertical-align:bottom;
105 border:none;
106 mso-background-source:auto;
107 mso-pattern:auto;
108 mso-protection:locked visible;
109 white-space:nowrap;
110 mso-rotate:0;}
111.xl32
112 {mso-style-parent:style22;}
113.xl33
114 {mso-style-parent:style22;
115 font-size:8.0pt;
116 font-family:"Arial Cyr", sans-serif;
117 mso-font-charset:204;}
118.xl34
119 {mso-style-parent:style22;
120 font-size:2.0pt;
121 font-family:"Arial Cyr", sans-serif;
122 border-top:none;
123 border-right:none;
124 border-bottom:2.0pt double windowtext;
125 border-left:none;}
126.xl35
127 {mso-style-parent:style22;
128 text-align:right;
129 border-top:none;
130 border-right:none;
131 border-bottom:2.0pt double windowtext;
132 border-left:none;}
133.xl36
134 {mso-style-parent:style22;
135 font-family:"Arial Cyr", sans-serif;
136 mso-font-charset:204;}
137.xl37
138 {mso-style-parent:style22;
139 vertical-align:middle;
140 white-space:normal;}
141.xl38
142 {mso-style-parent:style22;
143 font-size:8.0pt;
144 font-family:"Arial Cyr", sans-serif;
145 mso-font-charset:204;
146 text-align:center;
147 vertical-align:middle;
148 border:.5pt solid windowtext;}
149.xl39
150 {mso-style-parent:style22;
151 vertical-align:middle;}
152.xl40
153 {mso-style-parent:style22;
154 font-family:"Arial Cyr", sans-serif;
155 mso-font-charset:204;
156 text-align:center;
157 vertical-align:top;
158 border:.5pt solid windowtext;
159 white-space:normal;}
160.xl41
161 {mso-style-parent:style22;
162 font-size:9.0pt;
163 font-family:"Arial Cyr", sans-serif;
164 mso-font-charset:204;
165 text-align:center;
166 vertical-align:top;
167 border:.5pt solid windowtext;}
168.xl42
169 {mso-style-parent:style22;
170 font-size:9.0pt;
171 font-family:"Arial Cyr", sans-serif;
172 mso-font-charset:204;
173 mso-number-format:Standard;
174 vertical-align:top;
175 border:.5pt solid windowtext;}
176.xl43
177 {mso-style-parent:style22;
178 font-family:"Arial Cyr", sans-serif;
179 mso-font-charset:204;
180 text-align:center;
181 vertical-align:middle;
182 border:.5pt solid windowtext;}
183.xl44
184 {mso-style-parent:style27;
185 font-size:9.0pt;
186 font-family:"Arial Cyr", sans-serif;
187 mso-font-charset:204;
188 mso-number-format:0%;
189 vertical-align:top;
190 border:.5pt solid windowtext;
191 white-space:normal;}
192.xl45
193 {mso-style-parent:style22;
194 font-size:9.0pt;
195 font-family:"Arial Cyr", sans-serif;
196 mso-font-charset:204;
197 mso-number-format:Standard;
198 vertical-align:top;
199 border:.5pt solid windowtext;
200 white-space:normal;}
201.xl46
202 {mso-style-parent:style22;
203 font-size:9.0pt;
204 font-family:"Arial Cyr", sans-serif;
205 mso-font-charset:204;
206 mso-number-format:Standard;
207 text-align:center;
208 vertical-align:top;
209 border:.5pt solid windowtext;
210 white-space:normal;}
211.xl47
212 {mso-style-parent:style22;
213 font-weight:700;
214 font-family:"Arial Cyr", sans-serif;
215 mso-font-charset:204;
216 vertical-align:top;}
217.xl48
218 {mso-style-parent:style22;
219 font-size:9.0pt;
220 font-family:"Arial Cyr", sans-serif;
221 mso-font-charset:204;
222 vertical-align:top;}
223.xl49
224 {mso-style-parent:style22;
225 font-size:9.0pt;
226 font-weight:700;
227 font-family:"Arial Cyr", sans-serif;
228 mso-font-charset:204;
229 vertical-align:top;}
230.xl50
231 {mso-style-parent:style22;
232 vertical-align:top;}
233.xl51
234 {mso-style-parent:style0;
235 vertical-align:top;}
236.xl52
237 {mso-style-parent:style22;
238 text-align:right;
239 vertical-align:top;}
240.xl53
241 {mso-style-parent:style22;
242 font-size:9.0pt;
243 font-family:"Arial Cyr", sans-serif;
244 mso-font-charset:204;
245 mso-number-format:Standard;
246 text-align:center;
247 vertical-align:top;
248 border:.5pt solid windowtext;
249 white-space:normal;}
250.xl54
251 {mso-style-parent:style22;
252 font-size:8.0pt;
253 font-family:"Arial CYR", sans-serif;
254 mso-font-charset:204;
255 text-align:center;
256 vertical-align:middle;
257 border:.5pt solid windowtext;
258 white-space:normal;}
259.xl55
260 {mso-style-parent:style22;
261 font-size:9.0pt;
262 font-weight:700;
263 font-family:"Arial Cyr", sans-serif;
264 mso-font-charset:204;
265 text-align:center;
266 vertical-align:middle;
267 border:.5pt solid windowtext;
268 white-space:normal;}
269.xl56
270 {mso-style-parent:style22;
271 font-size:6.0pt;
272 font-weight:700;
273 font-family:"Arial Cyr", sans-serif;
274 mso-font-charset:204;
275 text-align:center;
276 vertical-align:middle;
277 border:.5pt solid windowtext;
278 white-space:normal;}
279.xl57
280 {mso-style-parent:style22;
281 font-size:7.0pt;
282 font-weight:700;
283 font-family:"Arial Cyr", sans-serif;
284 mso-font-charset:204;
285 text-align:center;
286 vertical-align:middle;
287 border:.5pt solid windowtext;
288 white-space:normal;}
289.xl58
290 {mso-style-parent:style22;
291 font-size:9.0pt;
292 font-weight:700;
293 font-family:"Arial Cyr", sans-serif;
294 mso-font-charset:204;
295 border-top:none;
296 border-right:none;
297 border-bottom:.5pt solid windowtext;
298 border-left:.5pt solid windowtext;}
299.xl59
300 {mso-style-parent:style22;
301 border-top:none;
302 border-right:none;
303 border-bottom:.5pt solid windowtext;
304 border-left:none;}
305.xl60
306 {mso-style-parent:style22;
307 mso-number-format:Standard;
308 font-size:9.0pt;
309 border:.5pt solid windowtext;
310 white-space:normal;}
311.xl61
312 {mso-style-parent:style22;
313 font-size:9.0pt;
314 border-top:none;
315 border-right:.5pt solid windowtext;
316 border-bottom:.5pt solid windowtext;
317 border-left:.5pt solid windowtext;}
318.xl62
319 {mso-style-parent:style22;
320 mso-number-format:Standard;
321 font-size:9.0pt;
322 border-top:.5pt solid windowtext;
323 border-right:.5pt solid windowtext;
324 border-bottom:.5pt solid windowtext;
325 border-left:none;
326 white-space:normal;}
327.xl63
328 {mso-style-parent:style22;
329 font-size:9.0pt;
330 font-weight:700;
331 font-family:"Arial Cyr", sans-serif;
332 mso-font-charset:204;
333 mso-number-format:Standard;
334 border-top:.5pt solid windowtext;
335 border-right:.5pt solid windowtext;
336 border-bottom:.5pt solid windowtext;
337 border-left:none;
338 white-space:normal;}
339.xl64
340 {mso-style-parent:style22;
341 font-family:"Arial Cyr", sans-serif;
342 mso-font-charset:204;
343 vertical-align:top;}
344.xl65
345 {mso-style-parent:style22;
346 font-size:14.0pt;
347 font-weight:700;
348 font-family:"Arial Cyr", sans-serif;
349 mso-font-charset:204;
350 text-align:center;}
351.xl66
352 {mso-style-parent:style22;
353 font-size:9.0pt;
354 font-family:"Arial Cyr", sans-serif;
355 mso-font-charset:204;
356 text-align:left;
357 vertical-align:top;
358 border:.5pt solid windowtext;
359 white-space:normal;}
360.xl67
361 {mso-style-parent:style22;
362 font-size:14.0pt;
363 font-weight:700;
364 font-family:"Arial Cyr", sans-serif;
365 mso-font-charset:204;
366 text-align:left;}
367.xl68
368 {mso-style-parent:style0;
369 text-align:left;
370 vertical-align:top;
371 white-space:normal;}
372.xl69
373 {mso-style-parent:style0;
374 text-align:left;
375 vertical-align:top;}
376.xl70
377 {mso-style-parent:style0;
378 font-size:9.0pt;
379 font-family:"Arial Cyr", sans-serif;
380 mso-font-charset:204;
381 mso-number-format:"\@";
382 vertical-align:top;}
383.xl71
384 {mso-style-parent:style0;
385 font-size:9.0pt;
386 font-family:"Arial Cyr", sans-serif;
387 mso-font-charset:204;
388 vertical-align:top;}
389.xl72
390 {mso-style-parent:style0;
391 mso-number-format:"\@";
392 text-align:left;
393 vertical-align:top;}
394.xl73
395 {mso-style-parent:style22;
396 mso-number-format:"\@";
397 text-align:left;
398 vertical-align:top;}
399-->
400</style>
401<title>Счет-фактура</title>
402</head>
403
404<body link=blue vlink=purple class=xl32>
405
406<table x:str border=0 cellpadding=0 cellspacing=0 width=987 style='border-collapse:
407collapse;table-layout:fixed;width:740pt'>
408<col class=xl32 width=311 style='mso-width-source:userset;mso-width-alt:11373;
409width:233pt'>
410<col class=xl32 width=40 style='mso-width-source:userset;mso-width-alt:1462;
411width:30pt'>
412<col class=xl32 width=39 style='mso-width-source:userset;mso-width-alt:1426;
413width:29pt'>
414<col class=xl32 width=71 style='mso-width-source:userset;mso-width-alt:2596;
415width:53pt'>
416<col class=xl32 width=80 style='mso-width-source:userset;mso-width-alt:2925;
417width:60pt'>
418<col class=xl32 width=31 style='mso-width-source:userset;mso-width-alt:1133;
419width:23pt'>
420<col class=xl32 width=43 style='mso-width-source:userset;mso-width-alt:1572;
421width:32pt'>
422<col class=xl32 width=78 style='mso-width-source:userset;mso-width-alt:2852;
423width:59pt'>
424<col class=xl32 width=83 style='mso-width-source:userset;mso-width-alt:3035;
425width:62pt'>
426<col class=xl32 width=97 style='mso-width-source:userset;mso-width-alt:3547;
427width:73pt'>
428<col class=xl32 width=114 style='mso-width-source:userset;mso-width-alt:4169;
429width:86pt'>
430
431<tr height=24 style='mso-height-source:userset;height:18.6pt'>
432 <td nowrap height=24 class=xl67 colspan=11 style='height:18.6pt;mso-ignore:
433 colspan;'>СЧЕТ-ФАКТУРА №
434 <input size="25" style="border:0px solid #000000;font-size:16px;font-style:bold;" type="text" value="_____ от '__' _______ ">
435 </td>
436 </tr>
437
438 <tr height=24 style='mso-height-source:userset;height:18.6pt'>
439 <td nowrap height=24 class=xl67 colspan=11 style='height:18.6pt;mso-ignore:
440 colspan;'>ИСПРАВЛЕНИЕ №
441 <input size="25" style="border:0px solid #000000;font-size:16px;font-style:bold;" type="text" value="_____ от '__' _______ ">
442 </td>
443</tr>
444<tr height=12 style='mso-height-source:userset;height:9.6pt'>
445 <td colspan=11 height=12 class=xl34 style='height:9.6pt'>&nbsp;</td>
446</tr>
447<tr class=xl50 height=19 style='mso-height-source:userset;height:14.25pt'>
448 <td height=19 class=xl47 style='height:14.25pt'>Продавец</td>
449 <td class=xl64 colspan=10 style='mso-ignore:colspan'><?=$arParams["COMPANY_NAME"]?></td>
450</tr>
451<tr class=xl50 height=18 style='mso-height-source:userset;height:13.5pt'>
452 <td height=18 class=xl50 style='height:13.5pt'>Адрес</td>
453 <td class=xl50 colspan=10 style='mso-ignore:colspan'><? echo $arParams["COUNTRY"].", ".$arParams["INDEX"].", г. ".$arParams["CITY"].", ".$arParams["ADDRESS"];?></td>
454</tr>
455<tr class=xl50 height=18 style='mso-height-source:userset;height:13.5pt'>
456 <td height=18 class=xl50 style='height:13.5pt'>ИНН/КПП продавца</td>
457 <td colspan=10 class=xl73><?=$arParams["INN"]?> / <?=$arParams["KPP"]?></td>
458</tr>
459<tr class=xl50 height=18 style='mso-height-source:userset;height:13.5pt'>
460 <td height=18 class=xl50 style='height:13.5pt'>Грузоотправитель и его адрес</td>
461 <td colspan=10 class=xl50><?=$arParams["COMPANY_NAME"]?>, <?=$arParams["COUNTRY"]?>, <?=$arParams["INDEX"]?>, г. <?=$arParams["CITY"]?>, <?=$arParams["ADDRESS"]?></td>
462</tr>
463<tr class=xl50 height=18 style='mso-height-source:userset;height:13.5pt'>
464 <td height=18 class=xl50 style='height:13.5pt'>Грузополучатель и его адрес</td>
465 <td class=xl64 colspan=10 style='mso-ignore:colspan'>
466 <?if(empty($arParams))
467 { ?>
468 <?//изменить F_NAME, F_INDEX,... на реальные мнемонические коды свойств?>
469 <?echo $arOrderProps["F_NAME"];?>,
470 <?echo $arOrderProps["F_INDEX"];?>
471 <?
472 $arVal = CSaleLocation::GetByID($arOrderProps["F_LOCATION"], "ru");
473 echo htmlspecialcharsbx($arVal["COUNTRY_NAME"]." - ".$arVal["CITY_NAME"]);
474 ?>
475 <?if ($arOrderProps["F_CITY"] <> '') echo ", г. ".$arOrderProps["F_CITY"];?>
476 <?if ($arOrderProps["F_ADDRESS"] <> '') echo ", ".$arOrderProps["F_ADDRESS"];?>
477 <?
478 }
479 else
480 {
481 if($arParams["BUYER_COMPANY_NAME"] <> '')
482 $buyerName = $arParams["BUYER_COMPANY_NAME"];
483 else
484 $buyerName = $arParams["BUYER_LAST_NAME"]." ".$arParams["BUYER_FIRST_NAME"]." ".$arParams["BUYER_SECOND_NAME"];
485 ?>
486 <?=$buyerName;?>, <?=$arParams["BUYER_COUNTRY"]?>, <?=$arParams["BUYER_INDEX"]?>, г. <?=$arParams["BUYER_CITY"]?>, <?=$arParams["BUYER_ADDRESS"]?>
487 <?
488 }
489 ?>
490</td>
491</tr>
492<tr class=xl50 height=19 style='mso-height-source:userset;height:14.25pt'>
493 <td height=19 class=xl50 style='height:14.25pt'>К платежно-расчетному документу</td>
494 <td colspan=10 class=xl64 style='mso-ignore:colspan'>
495 <input size="50" style="border:0px solid #000000;" type="text" value="№_______ от _______________">
496 </td>
497</tr>
498<tr class=xl50 height=18 style='mso-height-source:userset;height:13.5pt'>
499 <td height=18 class=xl47 style='height:13.5pt'>Покупатель</td>
500 <td class=xl64 colspan=10>
501 <?if(empty($arParams))
502 {
503 //изменить F_NAME на реальный мнемонический код свойства заказа "название компании"
504 echo $arOrderProps["F_NAME"];
505 }
506 else
507 {
508 echo $arParams["BUYER_COMPANY_NAME"];
509 }?>
510 </td>
511</tr>
512<tr class=xl50 height=18 style='mso-height-source:userset;height:13.5pt'>
513 <td height=18 class=xl50 style='height:13.5pt'>Адрес</td>
514 <td colspan=10 class=xl50 style='mso-ignore:colspan'>
515 <?if(empty($arParams))
516 {
517
518 //изменить F_INDEX, F_LOCATION,... на реальные мнемонические коды свойств
519 echo $arOrderProps["F_INDEX"];
520 $arVal = CSaleLocation::GetByID($arOrderProps["F_LOCATION"], "ru");
521 echo htmlspecialcharsbx($arVal["COUNTRY_NAME"]." - ".$arVal["CITY_NAME"]);
522 if ($arOrderProps["F_CITY"] <> '') echo ", г. ".$arOrderProps["F_CITY"];
523 if ($arOrderProps["F_ADDRESS"] <> '') echo ", ".$arOrderProps["F_ADDRESS"];
524
525 }
526 else
527 {
528 echo $arParams["BUYER_COUNTRY"].", ".$arParams["BUYER_INDEX"].", г. ".$arParams["BUYER_CITY"].", ".$arParams["BUYER_ADDRESS"];
529 }?>
530
531 </td>
532</tr>
533<tr class=xl50 height=18 style='mso-height-source:userset;height:13.5pt'>
534 <td height=18 class=xl50 style='height:13.5pt'>ИНН/КПП покупателя</td>
535 <td colspan=10 class=xl68>
536 <?if(empty($arParams))
537 {
538 //изменить F_INN на реальный мнемонический код свойства заказа "INN компании"
539 echo $arOrderProps["F_INN"];
540 }
541 else
542 {
543 echo $arParams["BUYER_INN"]." / ".$arParams["BUYER_KPP"];
544 }?>
545
546 </td>
547</tr>
548<tr class=xl50 height=19 style='mso-height-source:userset;height:14.25pt'>
549 <td height=19 class=xl50 style='height:14.25pt;mso-ignore:colspan'>Валюта: наименование, код </td>
550 <td colspan=6 class=xl50 style='mso-ignore:colspan'><input size="50" style="border:0px solid #000000;" type="text" value="__________________________"></td>
551</tr>
552<tr height=15 style='mso-height-source:userset;height:11.25pt'>
553 <td height=15 colspan=11 class=xl32 style='height:11.25pt;mso-ignore:colspan'></td>
554</tr>
555
556<tr>
557 <td colspan="11">
558 <table cellpadding=0 cellspacing=0 width=987 style='border-collapse:collapse;table-layout:fixed;width:100%'>
559 <tr class=xl37 height=44 style='mso-height-source:userset;height:33.6pt'>
560 <td rowspan="2" class="xl54" style='width:150pt'>Наименование товара (описание <br>выполненных работ, оказанных услуг), <br>имущественного права</td>
561 <td colspan="2" class="xl54" style='width:80pt'>Единица измерения</td>
562 <td rowspan="2" class="xl54" style='width:30pt'>Коли-<br>чество<br>(объем)</td>
563 <td rowspan="2" class="xl54" style='width:60pt'>Цена<br>(тариф)<br>за единицу<br>измерения</td>
564 <td rowspan="2" class="xl54" style='width:60pt'>Стоимость товаров (работ, услуг), имущественных прав без налога - всего</td>
565 <td rowspan="2" class="xl54" style='width:30pt'>В том числе сумма акциза</td>
566 <td rowspan="2" class="xl54" style='width:40pt'>Налоговая<br>ставка</td>
567 <td rowspan="2" class="xl54" style='width:60pt'>Сумма налога, предъяв-ляемая покупателю</td>
568 <td rowspan="2" class="xl54" style='width:60pt'>Стоимость товаров (работ, услуг), имущественных прав с налогом - всего</td>
569 <td colspan="2" class="xl54" style='width:70pt'>Страна происхождения товара</td>
570 <td rowspan="2" class="xl56" style='width:40pt'>Номер таможенной декларации</td>
571 </tr>
572 <tr>
573 <td class="xl56" style='width:20pt'>код</td>
574 <td class="xl56" style='width:60pt'>условное обозначение (националь<br>ное)</td>
575 <td class="xl56" >цифровой код</td>
576 <td class="xl56" >краткое наименова<br>ние</td>
577 </tr>
578 <tr>
579 <td class="xl38">1</td>
580 <td class="xl38">2</td>
581 <td class="xl38">2a</td>
582 <td class="xl38">3</td>
583 <td class="xl38">4</td>
584 <td class="xl38">5</td>
585 <td class="xl38">6</td>
586 <td class="xl38">7</td>
587 <td class="xl38">8</td>
588 <td class="xl38">9</td>
589 <td class="xl38">10</td>
590 <td class="xl38">10a</td>
591 <td class="xl38">11</td>
592 </tr>
593<?
595$bUseVat = false;
597for ($i = 0, $max = count($arBasketIDs); $i < $max; $i++)
598{
599 $arBasketTmp = CSaleBasket::GetByID($arBasketIDs[$i]);
600
601 if (floatval($arBasketTmp["VAT_RATE"]) > 0 )
602 $bUseVat = true;
603
604 $priceTotal += $arBasketTmp["PRICE"]*$arBasketTmp["QUANTITY"];
605
606 $arBasketTmp["PROPS"] = array();
607 if (isset($_GET["PROPS_ENABLE"]) && $_GET["PROPS_ENABLE"] == "Y")
608 {
609 $dbBasketProps = CSaleBasket::GetPropsList(
610 array("SORT" => "ASC", "NAME" => "ASC"),
611 array("BASKET_ID" => $arBasketTmp["ID"]),
612 false,
613 false,
614 array("ID", "BASKET_ID", "NAME", "VALUE", "CODE", "SORT")
615 );
616 while ($arBasketProps = $dbBasketProps->GetNext())
617 $arBasketTmp["PROPS"][$arBasketProps["ID"]] = $arBasketProps;
618 }
619
620 $arBasketOrder[] = $arBasketTmp;
621}
622
623if ($arOrder['DELIVERY_VAT_RATE'] > 0)
624{
625 $bUseVat = true;
626}
627
628if (is_array($arBasketOrder) && !empty($arBasketOrder))
629{
631}
632
633//разбрасываем скидку на заказ по товарам
634if (floatval($arOrder["DISCOUNT_VALUE"]) > 0)
635{
636 $arBasketOrder = GetUniformDestribution($arBasketOrder, $arOrder["DISCOUNT_VALUE"], $priceTotal);
637}
638
639//налоги
641$db_tax_list = CSaleOrderTax::GetList(array("APPLY_ORDER"=>"ASC"), Array("ORDER_ID"=>$ORDER_ID));
642$iNds = -1;
643$i = 0;
644while ($ar_tax_list = $db_tax_list->Fetch())
645{
646 $arTaxList[$i] = $ar_tax_list;
647 // определяем, какой из налогов - НДС
648 // НДС должен иметь код NDS, либо необходимо перенести этот шаблон
649 // в каталог пользовательских шаблонов и исправить
650 if ($arTaxList[$i]["CODE"] == "NDS")
651 $iNds = $i;
652 $i++;
653}
654
655//состав заказа
659$bVat = false;
660$mi = 0;
661
662foreach ($arBasketOrder as $arBasket):
663 $nds_val = 0;
665
666 if (floatval($arQuantities[$mi]) <= 0)
667 $arQuantities[$mi] = DoubleVal($arBasket["QUANTITY"]);
668
669 $b_AMOUNT = DoubleVal($arBasket["PRICE"]);
670
671 //определяем начальную цену
673
675 $taxRate = 0;
676 if(DoubleVal($arBasket["VAT_RATE"]) > 0)
677 {
678 $bVat = true;
679 $nds_val = ($b_AMOUNT - DoubleVal($b_AMOUNT/(1+$arBasket["VAT_RATE"])));
681 $taxRate = $arBasket["VAT_RATE"]*100;
682 }
684 {
685 $basket_tax = CSaleOrderTax::CountTaxes($b_AMOUNT*$arQuantities[$mi], $arTaxList, $arOrder["CURRENCY"]);
686
687 for ($i = 0, $max = count($arTaxList); $i < $max; $i++)
688 {
689 if ($arTaxList[$i]["IS_IN_PRICE"] == "Y")
690 {
691 $item_price -= $arTaxList[$i]["TAX_VAL"];
692 }
693 $nds_val += DoubleVal($arTaxList[$i]["TAX_VAL"]);
694 $taxRate += ($arTaxList[$i]["VALUE"]);
695 }
696 }
697
698?>
699<tr class=xl39>
700 <td class=xl66 width=213 style='border-top:none;width:233pt'>
701 <?echo htmlspecialcharsEx($arBasket["NAME"]) ?>
702 <?
703 if (is_array($arBasket["PROPS"]) && $_GET["PROPS_ENABLE"] == "Y")
704 {
705 foreach($arBasket["PROPS"] as $vv)
706 {
707 if($vv["VALUE"] <> '' && $vv["CODE"] != "CATALOG.XML_ID" && $vv["CODE"] != "PRODUCT.XML_ID")
708 echo "<div style=\"font-size:8pt\">".$vv["NAME"].": ".$vv["VALUE"]."</div>";
709 }
710 }
711 ?>
712 </td>
713 <td class=xl40>---</td>
714 <td class=xl40 width=40 style='border-top:none;border-left:none;width:30pt'><?=$arBasket['MEASURE_TEXT']?></td>
715 <td class=xl41 style='border-top:none;border-left:none'><?echo Bitrix\Sale\BasketItem::formatQuantity($arQuantities[$mi]);?></td>
716 <td align="right" class=xl42 style='border-top:none;border-left:none'><?=CCurrencyLang::CurrencyFormat($item_price, $arOrder["CURRENCY"], false);?></td>
717 <td class=xl42 align=right style='border-top:none;border-left:none' x:num>
718 <?
719 echo CCurrencyLang::CurrencyFormat($item_price * $arQuantities[$mi], $arOrder["CURRENCY"], false);
720 if (empty($arBasket['SET_PARENT_ID']))
721 {
722 $total_price += ($item_price*$arQuantities[$mi]);
723 }
724 ?>
725 </td>
726 <td class=xl43 style='border-top:none;border-left:none'>&nbsp;</td>
727 <td class=xl44 align=right width=43 style='border-top:none;border-left:none;
728 width:32pt'><?=($taxRate > 0 || count($arTaxList) > 0) ? $taxRate."%" : "Без НДС";?></td>
729 <td class=xl45 align=right width=78 style='border-top:none;border-left:none;
730 width:59pt' x:num>
731 <?
732 echo CCurrencyLang::CurrencyFormat($nds_val*$arQuantities[$mi], $arOrder["CURRENCY"], false);
733 if (empty($arBasket['SET_PARENT_ID']))
734 {
735 $total_nds += $nds_val*$arQuantities[$mi];
736 }
737 ?>
738 </td>
739
740 <td class=xl45 align=right width=83 style='border-top:none;border-left:none;
741 width:62pt' x:num>
742 <?
743 echo CCurrencyLang::CurrencyFormat($item_price*$arQuantities[$mi]+$nds_val*$arQuantities[$mi], $arOrder["CURRENCY"], false);
744 if (empty($arBasket['SET_PARENT_ID']))
745 {
746 $total_sum += $item_price*$arQuantities[$mi]+$nds_val*$arQuantities[$mi];
747 }
748 ?>
749 </td>
750 <td class=xl46 ><input size="5" style="border:0px solid #000000;font-size:14px;font-style:bold;text-align:center;" type="text" value="---"></td>
751 <td class=xl46 ><input size="5" style="border:0px solid #000000;font-size:14px;font-style:bold;text-align:center;" type="text" value="---"></td>
752 <td class=xl53 width=114 style='border-top:none;border-left:none;width:86pt'>---</td>
753</tr>
754<?
755$mi++;
757
758if ($arOrder["DELIVERY_ID"]):
759 $basket_tax = CSaleOrderTax::CountTaxes(DoubleVal($arOrder["PRICE_DELIVERY"]), $arTaxList, $arOrder["CURRENCY"]);
760 //определяем начальную цену
761 $nds_val = $arOrder['DELIVERY_VAT_SUM'];
762 $taxRate = $arOrder['DELIVERY_VAT_RATE'] * 100;
763 $item_price = DoubleVal($arOrder["PRICE_DELIVERY"]) - $arOrder['DELIVERY_VAT_SUM'];
764 ?>
765<tr class=xl39>
766 <td class=xl66 width=213 style='border-top:none;
767 width:213px'>Доставка</td>
768 <td class=xl40>---</td>
769 <td class=xl40 width=40 style='border-top:none;border-left:none;width:30pt'></td>
770 <td class=xl41 style='border-top:none;border-left:none'>1</td>
771 <td align="right" class=xl42 style='border-top:none;border-left:none'><?=CCurrencyLang::CurrencyFormat($item_price, $arOrder["CURRENCY"], false);?></td>
772 <td class=xl42 align=right style='border-top:none;border-left:none' x:num><?=CCurrencyLang::CurrencyFormat($item_price, $arOrder["CURRENCY"], false); $total_price += $item_price;?></td>
773 <td class=xl43 style='border-top:none;border-left:none'>&nbsp;</td>
774 <td class=xl44 align=right width=43 style='border-top:none;border-left:none;
775 width:32pt'><?=($taxRate > 0 || count($arTaxList) > 0) ? $taxRate."%" : "Без НДС";?></td>
776 <td class=xl45 align=right width=78 style='border-top:none;border-left:none;
777 width:59pt' x:num><?=CCurrencyLang::CurrencyFormat($nds_val, $arOrder["CURRENCY"], false); $total_nds += $nds_val;?></td>
778 <td class=xl45 align=right width=83 style='border-top:none;border-left:none;
779 width:62pt' x:num><?=CCurrencyLang::CurrencyFormat($nds_val+$item_price, $arOrder["CURRENCY"], false); $total_sum += $nds_val+$item_price?></td>
780 <td class=xl46 ><input size="5" style="border:0px solid #000000;font-size:14px;font-style:bold;text-align:center;" type="text" value="---"></td>
781 <td class=xl46 ><input size="5" style="border:0px solid #000000;font-size:14px;font-style:bold;text-align:center;" type="text" value="---"></td>
782 <td class=xl53 width=114 style='border-top:none;border-left:none;width:86pt'>---</td>
783</tr>
785<tr>
786 <td class=xl58>Всего к оплате:</td>
787 <td class=xl59>&nbsp;</td>
788 <td class=xl59>&nbsp;</td>
789 <td class=xl59>&nbsp;</td>
790 <td class=xl59>&nbsp;</td>
791 <td class=xl60 align=right width=80 style='border-top:none;width:60pt' x:num><?=CCurrencyLang::CurrencyFormat($total_price, $arOrder["CURRENCY"], false);?></td>
792 <td class=xl61 style='border-left:none'>&nbsp;</td>
793 <td class=xl61 style='border-left:none'>&nbsp;</td>
794 <td class=xl62 align=right width=78 style='border-top:none;width:59pt' x:num><?=CCurrencyLang::CurrencyFormat($total_nds, $arOrder["CURRENCY"], false);?></td>
795 <td class=xl63 align=right width=83 style='border-top:none;width:62pt;white-space:nowrap' x:num><?=CCurrencyLang::CurrencyFormat($total_sum, $arOrder["CURRENCY"], false);?></td>
796</tr>
797<tr height=26 style='mso-height-source:userset;height:19.5pt'>
798 <td height=26 class=xl36 style='height:19.5pt'></td>
799 <td colspan=5 class=xl32 style='mso-ignore:colspan'></td>
800 <td class=xl36></td>
801 <td class=xl32></td>
802 <td class=xl36></td>
803 <td colspan=2 class=xl32 style='mso-ignore:colspan'></td>
804</tr>
805<tr valign="top">
806 <td colspan=4 class=xl36>Руководитель организации<br> или иное уполномоченное лицо
807 _______________ <input size="16" style="border:0px solid #000000;font-size:14px;font-style:bold;" type="text" value="/ <?echo (($arParams["DIRECTOR"] <> '') ? $arParams["DIRECTOR"] : "_______________")?> /"></td>
808 <td class=xl36 colspan=2 style='mso-ignore:colspan'></td>
809 <td colspan=6 class=xl32 style='mso-ignore:colspan'>Главный бухгалтер<br> или иное уполномоченное лицо _______________ <input size="16" style="border:0px solid #000000;font-size:14px;font-style:bold;" type="text" value="/ <?echo (($arParams["BUHG"] <> '') ? $arParams["BUHG"] : "_______________")?> /"></td>
810</tr>
811<tr height=0 style='display:none'>
812 <td height=0 colspan=11 class=xl32 style='mso-ignore:colspan'></td>
813</tr>
814<tr height=17 style='height:12.75pt'>
815 <td height=17 colspan=11 class=xl32 style='height:12.75pt;mso-ignore:colspan'></td>
816</tr>
817<tr height=17 style='height:12.75pt'>
818 <td height=17 colspan=11 class=xl32 style='height:12.75pt;mso-ignore:colspan'></td>
819</tr>
820<tr height=22 style='mso-height-source:userset;height:16.5pt'>
821 <td height=22 colspan=5 class=xl32 style='height:16.5pt;mso-ignore:colspan'>Индивидуальный предприниматель _____________ / <input size="16" style="border:0px solid #000000;font-size:14px;font-style:bold;" type="text" value="_______________"> /</td>
822 <td height=22 colspan=1 class=xl32 style='height:16.5pt;mso-ignore:colspan'></td>
823 <td colspan=5 class=xl36><input size="40" style="border:0px solid #000000;font-size:14px;font-style:bold;" type="text" value="_____________________________________"> </td>
824</tr>
825<tr height=20 style='mso-height-source:userset;height:15.0pt'>
826 <td height=20 colspan=5 class=xl33 style='height:15.0pt;mso-ignore:colspan'></td>
827 <td height=20 colspan=1 class=xl32 style='height:15.0pt;mso-ignore:colspan'></td>
828 <td class=xl33 colspan=5 style='mso-ignore:colspan' align="center">(реквизиты свидетельства о государственной регистрации<br>
829индивидуального предпринимателя)</td>
830</tr>
831<tr height=9 style='mso-height-source:userset;height:6.75pt'>
832 <td height=9 colspan=11 class=xl32 style='height:6.75pt;mso-ignore:colspan'></td>
833</tr>
834</table>
835</body>
836</html>
$arParams
Определения access_dialog.php:21
$arVal
Определения options.php:1785
static formatQuantity($quantity)
Определения basketitem.php:884
static GetByID($ID)
Определения basket.php:1805
static CountTaxes($Price, &$arTaxList, $DefCurrency)
Определения order_tax.php:124
static CurrencyFormat($price, $currency, $useTemplate=true)
Определения currency_lang.php:655
static GetPropsList($arOrder=array(), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
Определения basket.php:317
static GetByID($primary, $strLang=LANGUAGE_ID)
Определения location.php:118
static GetList($arOrder=array("TAX_NAME"=> "ASC"), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
Определения order_tax.php:7
& nbsp
Определения epilog_main_admin.php:38
hidden PROPERTY[<?=$propertyIndex?>][CODE]<?=htmlspecialcharsEx( $propertyCode)?> height
Определения file_new.php:759
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
Определения file_new.php:677
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
background color
Определения file_new.php:745
bx_acc_lim_group_list limitGroupList[] multiple<?=$group[ 'ID']?> ID selected margin top
Определения file_new.php:657
<? if( $useEditor3):?>< tr class="heading">< td colspan="2"><? echo GetMessage("FILEMAN_OPTION_SPELL_SET");?></td ></tr ><? if(function_exists( 'pspell_config_create')):$use_pspell_checked=(COption::GetOptionString( $module_id, "use_pspell", "Y")=="Y") ? "checked" :"";?>< tr >< td valign="top">< label for="use_pspell"><?echo GetMessage("FILEMAN_OPTION_USE_PSPELL");?></label >< br >< a title="<?echo GetMessage("FILEMAN_OPTION_ADDISH_DICS_TITLE");?> http
Определения options.php:1473
hidden mSiteList<?=htmlspecialcharsbx(serialize( $siteList))?><?=htmlspecialcharsbx( $siteList[ $j]["ID"])?> _Propery<? if(((COption::GetOptionString( $module_id, "different_set", "N")=="Y") &&( $j !=0))||(COption::GetOptionString( $module_id, "different_set", "N")=="N")) echo "display: none;"?> top adm detail content cell l top adm detail content cell r heading center center ID left
Определения options.php:768
$total_nds
Определения invoice_en.php:282
endif
Определения csv_new_setup.php:990
htmlspecialcharsEx($str)
Определения tools.php:2685
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
Определения tools.php:2701
white space
Определения options.php:321
global_menu_<?echo $menu["menu_id"]?> adm main menu item icon adm main menu item text text adm main menu hover adm submenu menucontainer menu_id menu_id items_id items_id desktop menu_id block none adm global submenu<?=($subMenuDisplay=="block" ? " adm-global-submenu-active" :"")?> global_submenu_<?echo $menu["menu_id"]?> text MAIN_PR_ADMIN_FAV items adm submenu items wrap adm submenu items stretch wrap BX adminMenu itemsStretchScroll()"> <table class if (!empty( $menu["items"])) elseif ( $menu[ 'menu_id']=='desktop') if ( $menu[ 'menu_id']=='desktop') endforeach
Определения prolog_main_admin.php:255
<? endif;?> window document title
Определения prolog_main_admin.php:76
die
Определения quickway.php:367
будьте внимательны при оплате заказа</div >< h4 > Процедура оплаты</h4 >< p > Перед нажатием убедитесь что< i > Кошелек у вас запущен</i > После нажатия кнопки магазин выставит вашему Кошельку требование об оплате
Определения payment.php:31
$bUseVat
Определения factura.php:595
foreach($arBasketOrder as $arBasket) $taxRate
Определения factura.php:664
for( $i=0, $max=count( $arBasketIDs);$i< $max;$i++) if($arOrder['DELIVERY_VAT_RATE'] > 0) if(is_array( $arBasketOrder) &&!empty( $arBasketOrder)) if(floatval($arOrder["DISCOUNT_VALUE"]) > 0) $arTaxList
Определения factura.php:640
$b_AMOUNT
Определения factura.php:669
$db_tax_list
Определения factura.php:641
$iNds
Определения factura.php:642
else $buyerName
Определения factura.php:484
$i
Определения factura.php:643
$arBasketOrder
Определения factura.php:596
$total_sum
Определения factura.php:657
$priceTotal
Определения factura.php:594
$item_price
Определения factura.php:672
if(DoubleVal( $arBasket["VAT_RATE"]) > 0) elseif(! $bUseVat)
Определения factura.php:683
while($ar_tax_list=$db_tax_list->Fetch()) $total_price
Определения factura.php:656
$bVat
Определения factura.php:659
$mi
Определения factura.php:660
$nds_val
Определения factura.php:674
if($arParams["BUYER_PHONE"]<> '') echo "<br>Телефон<?=$currency;?></td><td nowrap align="center" style="border:1pt solid #000000;"> Сумма
Определения invoice.php:127
font style
Определения invoice.php:442
if($arParams["BUYER_INN"]<> '') echo "<br>ИНН/КПП г BUYER_ADDRESS BUYER_CONTACT<br> Контактное лицо
Определения invoice.php:125
</p ></td ></tr >< tr >< td >< p class=MsoNormal > Гл бухгалтер
Определения invoice.php:442
font size
Определения invoice.php:442
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936
$ORDER_ID
Определения html.php:2
text align
Определения template.php:556
getMeasures($arBasketItems)
Определения include.php:360
margin right
Определения options_user_settings.php:273
$max
Определения template_copy.php:262