<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="form.xslt"?>
<PrnForm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="form.xsd" Orientation="Portrait">
  <DocHeader FontFamily="GenericSansSerif" FontSize="3">
  	<Column Width="45"/>
  	<Column Width="45"/>
  	<Column Width="30"/>
  	<Column Width="30"/>
  	<Column Width="30"/>
  	<Row Height="15">
  		<Cell ColSpan="5" Align="TopLeft" FontSize="2" Text="Оплата данного счета означает согласие с условиями поставки товара.&#xD;&#xA;
  																 Уведомление об оплате обязательно, в противном случае не гарантируется наличие&#xD;&#xA;
  																 товара на складе. Товар отпускается по факту прихода денег на р/с Поставщика,&#xD;&#xA;
  												 				 самовывозом, при наличии доверенности и паспорта."/>
  	</Row>
  	<Row  Height="3">															 
  		<Cell ColSpan="5" Align="TopLeft" FontSize="3" FontStyle="Bold" Text="Образец платежного поручения" />
  	</Row>
  	<Row Height="7">
		<Cell ColSpan="3" FontStyle="Bold" Text="Бенефициар:" Align="TopLeft" FontSize="3" BorderLeft="Single" BorderTop="Single" BorderRight="Single"/>
		<Cell ColSpan="1" FontStyle="Bold" Text="ИИК" Align="MiddleCenter" FontSize="3" BorderLeft="Single" BorderTop="Single" BorderRight="Single"/>
		<Cell ColSpan="1" FontStyle="Bold" Text="Кбе" Align="MiddleCenter" FontSize="3" BorderLeft="Single" BorderTop="Single" BorderRight="Single"/>
	</Row>
	<Row Height="7">
		<Cell ColSpan="3" Text="replace(Firm.OfficialName, '&#xA0;', '&#x0D;&#x0A;')" Align="TopLeft" BorderLeft="Single" BorderRight="Single" FontStyle="Bold" LabelType="Expression" />
		<Cell ColSpan="1"  Text="KZ96722S000049741751" Align="MiddleCenter" BorderLeft="Single" BorderRight="Single" FontStyle="Bold"/>
		<Cell ColSpan="1" Text="19" Align="MiddleCenter" BorderLeft="Single" BorderRight="Single" FontStyle="Bold" LabelType="Expression"/>
		
	</Row>

	<Row Height="7">
		<Cell ColSpan="3" Text="БИН:" Align="TopLeft" BorderLeft="Single" BorderRight="Single" BorderBottom="Single"/>
		<Cell ColSpan="1" Align="TopLeft" BorderLeft="Single" BorderRight="Single"/>
		<Cell ColSpan="1" Align="TopLeft" BorderLeft="Single" BorderRight="Single"/>
	</Row>

	<Row Height="7">
		<Cell ColSpan="3" Text="Firm.INN" Align="TopLeft" BorderLeft="Single" BorderRight="Single" BorderBottom="Single"  LabelType="Expression"/>
		<Cell ColSpan="1" Align="TopLeft" BorderLeft="Single" BorderRight="Single" BorderBottom="Single"/>
		<Cell ColSpan="1" Align="TopLeft" BorderLeft="Single" BorderRight="Single" BorderBottom="Single"/>
	</Row>


	<Row Height="3">
		<Cell ColSpan="2" Align="BottomLeft" Text="'Банк бенефициара:'||Firm.PaymentReq" BorderLeft="Single" BorderBottom="Single" BorderRight="Single" FontSize="3" LabelType="Expression"/>
		<Cell ColSpan="1" Align="BottomLeft" Text="БИК: CASPKZKA" BorderLeft="Single" BorderBottom="Single" BorderRight="Single" FontSize="3" FontStyle="Bold"/>
		<Cell ColSpan="2" Align="BottomLeft" Text="Код назначения платежа: 710" BorderLeft="Single" BorderBottom="Single" BorderRight="Single" FontSize="3" FontStyle="Bold"/>
		
	</Row>

	<Row Height="12">
  		<Cell ColSpan="5" Text="'Счет на оплату №'||Doc.Number||' от '||Doc.DateLong" Align="MiddleLeft" LabelType="Expression" BorderBottom="Single" FontSize="4" FontStyle="Bold"/>
  	</Row>
  	<Row Height="5">
  		<Cell ColSpan="1" Text="Поставщик:" Align="MiddleLeft"/>
  		<Cell ColSpan="4" Text="'БИН/ИИН '||Firm.INN||'/'||Firm.KPP||','||Firm.OfficialName||', '||Firm.OfficialAddress" 
  				Align="MiddleLeft" FontStyleType="Bold" FontStyle="Bold" LabelType="Expression"/>
  	</Row>
  	
  	<Row Height="5">
  		<Cell ColSpan="1" Text="Покупатель:" Align="MiddleLeft"/>
  		<Cell ColSpan="4" Text="Client.OfficialName||', '||Client.OfficialAddress" Align="MiddleLeft" 
  		 FontStyle="Bold" LabelType="Expression"/>
  	</Row>
  	
  	<Row Height="5">
  		<Cell ColSpan="1" Text="Договор:" Align="MiddleLeft"/>
  		<Cell ColSpan="4" Text="Contract.Name" Align="MiddleLeft" 
  		 FontStyle="Bold" LabelType="Expression"/>
  	</Row>
  	
  </DocHeader>
  <PageHeader>
  	<Column Width="10"/>
  	<!-- <Column Width="20"/> -->
  	<Column Width="100"/>
  	<Column Width="15"/>
  	<Column Width="15"/>
  	<Column Width="20"/>
  	<Column Width="25"/>
	<Row Height="5">
		<Cell Text="№" FontStyle="Bold" Align="MiddleCenter" BorderLeft="Single" BorderTop="Single" BorderBottom="Single"/>
		<!-- <Cell Text="Артикул" Align="MiddleCenter" BorderLeft="Single" BorderTop="Single" BorderBottom="Single"/> -->
		<Cell Text="Товары (работы, услуги)" FontStyle="Bold" Align="MiddleCenter" BorderLeft="Single" BorderTop="Single" BorderBottom="Single"/>
		<Cell Text="Кол-во" FontStyle="Bold" Align="MiddleCenter" BorderLeft="Single" BorderTop="Single" BorderBottom="Single"/>
		<Cell Text="Ед." FontStyle="Bold" Align="MiddleCenter" BorderLeft="Single" BorderTop="Single" BorderBottom="Single"/>
		<Cell Text="Цена" FontStyle="Bold" Align="MiddleCenter" BorderLeft="Single" BorderTop="Single" BorderBottom="Single"/>
		<Cell Text="Сумма" FontStyle="Bold" Align="MiddleCenter" BorderLeft="Single" BorderTop="Single" BorderRight="Single" BorderBottom="Single"/>		
	</Row>  	
  </PageHeader>
  <DocRow>
  	<Column Width="10"/>
  	<!-- <Column Width="20"/> -->
  	<Column Width="100"/>
  	<Column Width="15"/>
  	<Column Width="15"/>
  	<Column Width="20"/>
  	<Column Width="25"/>
	<Row Height="4">
		<Cell Text="Row.Number" Align="MiddleCenter" FontSize="3" BorderLeft="Single" BorderBottom="Single" LabelType="Expression"/>
		<!-- <Cell Text="'Артикул'" Align="MiddleLeft" FontSize="3" BorderLeft="Single" BorderBottom="Single" LabelType="Expression"/> -->
		<Cell Text="Row.GoodFullName" Align="MiddleLeft" BorderLeft="Single" BorderBottom="Single" LabelType="Expression"/>
		<Cell Text="Row.Count+Row.Bonus" Align="MiddleRight" BorderLeft="Single" BorderBottom="Single" LabelType="Expression" MaxPrecision="3"/>
		<Cell Text="Row.UnitDescr" Align="MiddleLeft" BorderLeft="Single" BorderBottom="Single" LabelType="Expression"/>
		<Cell Text="(Row.Sum-Row.VAT)/(Row.Count+Row.Bonus)" Align="MiddleRight" BorderLeft="Single" BorderBottom="Single" LabelType="Expression" FixPrecision="2"/>
		<Cell Text="Row.Sum-Row.VAT" Align="MiddleRight" BorderLeft="Single" BorderBottom="Single" BorderRight="Single" LabelType="Expression" FixPrecision="2"/>
	</Row>
  </DocRow>
  <DocFooter>
  	<Column Width="35"/>
  	<Column Width="15"/>
  	<Column Width="20"/>
  	<Column Width="5"/>
  	<Column Width="50"/>
  	<Column Width="5"/>
  	<Column Width="30"/>
  	<Column Width="25"/>
  	<!--<Row Height="7">
  		<Cell ColSpan="7" Text="Итого:" Align="MiddleRight"/>
  		<Cell Text="Doc.Sum - Doc.VAT" Align="MiddleRight" LabelType="Expression" FixPrecision="2"/>
  	</Row>-->
  	<Row Height="7">
  		<!--<Cell ColSpan="7" Text="Всего к оплате:" FontStyle="Bold" Align="MiddleRight"/>-->
  		<Cell ColSpan="7" Text="Итого:" FontStyle="Bold" Align="MiddleRight"/>
  		<Cell Text="Doc.Sum" Align="MiddleRight" LabelType="Expression" FixPrecision="2"/>
  	</Row>
  	<Row Height="7">
  		<Cell ColSpan="7" Text="В том числе НДС:" FontStyle="Bold" Align="MiddleRight"/>
  		<Cell Text="CASE WHEN Firm.UseVAT > 0.1 THEN Doc.VAT ELSE 'Без НДС' END" Align="MiddleRight" LabelType="Expression"/>
  	</Row>
  	
  	<Row Height="7">
  		<!--<Cell ColSpan="8" Text="'Всего наименований: '||Doc.Count||' ,на сумму:'||Doc.Sum" Align="MiddleLeft" LabelType="Expression"/>-->
  		<Cell Text="Всего наименований:" Align="MiddleLeft"/>
  		<Cell Text="Doc.Count" Align="MiddleLeft" LabelType="Expression" FixPrecision="0"/>
  		<Cell Text=",на сумму: " Align="MiddleRight"/>
  		<Cell ColSpan="5" Text="Doc.Sum" Align="MiddleLeft" LabelType="Expression" FixPrecision="2"/>
  	</Row>
  	<Row Height="7">
  		<Cell Text="Всего к оплате:" FontStyle="Bold" Align="MiddleLeft"/>
  		<Cell ColSpan="7" Text="Doc.Sum" Align="MiddleLeft" FontStyle="Bold" LabelType="Expression" InWords="Sum"/>
  	</Row>
  	<Row Height="7">	
  		<Cell ColSpan="8" BorderBottom="Single"/>
  	</Row>
  	  	
  	<Row Height="20">
  		<Cell ColSpan="8" Text="'Исполнитель _______________________________________________________('||Agent.Descr||')'" Align="MiddleLeft" LabelType="Expression"/>
  	</Row>
  	<Row Height="50">
		<Cell ColSpan="4" Text=""/>
		<Cell Image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz AAALEwAACxMBAJqcGAAAAiJJREFUOI2Nks9LVFEUxz/nvDfjNGYZEi4szShLKppkqAQpkgQjF5VY ixZBC120cWjh/xCBlCQ2u6CdhhC2MEjCRUgoRUS0KBGKosCM0l44vnNbvHHSUcQDl3PPvef7PT+F IrF3Fxucr10414xPDQKIziA2pr43ILsGX6/0l+WLm2xLWiLRp8p1BND8b5E2dVlBurV6KCgQuMm2 pGl8VH1t2ghcIBHGRWnV6qFAAYxEnzptIoTNHDVOudB6AcReXG4Qz02hjrvDP1BPOJ1KcmRfyZro oxMLqActjaXRu8oxdRZ2YUAoNB0u5fe8kX08F0UzVulM7zcyt78XbFuyTh+jGaIIwR8jc6mCREke 5PIZ5PWd7krUk4hUAXHNEo61L6qvsfWb5jZuptqiTxgZA6Nz3BqeLV6LdaXnagVdF8qjhoLOEEJ9 VcmmwACHauL5Pui0T8gYyv6muiS7K2J8ms3RoeXsJLYK9JUcw/aTmsoYjfVJ8pk/EzfSkcLjFQoT HwKu3fvClB5E/y8pADkcJ9x7HvZUkT6QAHU4dUcFIHzSfl9FO1F4+TFgz0AZW52uIvilIZ8zC6Tr EqBgQr93cvCGAsi8dNuSGyeE47Vb2J5aW/eONKT3JqL5hzzXIHkTooGgV4YCCWi10LIYxFtDZJsr gKUc4udtGdyvueQ5OfPgL1BUKOBGOlJm1mnztIRv/VoEvAab1jL3VNRl9eyjNyv9/wF00c7KoatP MwAAAABJRU5ErkJggg==" Scale="Fit" Align="TopCenter"/>
		<Cell ColSpan="3" Text=""/>
	</Row>
  </DocFooter>
 </PrnForm>