如何在页面的自定义地方定位pernament div [英] How to position pernament div in custom place on page
问题描述
我有问题的positiong div的内容在自定义的地方在页pernament的方式,这意味着div将是20px的底部,无论什么:)。问题是,我为我的公司使用在线发票管理器,我想要我的发票littel自定义。也就是说我想在发票上的签名将从底部的20px,beacuse现在签名正在向下移动添加内容。在这个经理的职位:相对被关闭,我可以't弄明白如何做到。
我包含发票的html代码,带签名的div是class =podpis,里面有与txt的div。
< style>
/ * body {
margin-bottom:177px;
margin-top:118px;
}
* /
页面{
padding:20 15 20 15;
font-size:8;
font-family:LiberationSans;
}
td,th {
padding:0.5 1 0 1;
}
翻译{
< ;? if($ invoice ['Invoice'] ['translation_language_id']):?>
font-size:6;
font-style:italic;
display:inline;
< ;? else:// w przypadku faktury wjęzykupolskimtłumaczeniasąukryte?>
display:none;
< ;? endif?>
}
< / style>
< ;? foreach($ parameters ['pages'] as $ page):?>
< page>
< header id =topheight =85>
< style>
.invoice-header {
position:absolute;
y:-10;
text-align:center;
}
#top {
margin-top:118px;
}
/ * logo * /
.invoice-logo {
width:45%;
height:40;
float:left;
}
/ *主信息 - 开始* /
.invoice-main-info {
width:48%;
float:right;
}
.invoice-main-info tr th {
padding:1.5 0 1.5 0;
}
.invoice-main-info tr td {
padding:1 0 1 1;
}
.invoice-main-info tr:child(0){
font-size:9;
text-align:center;
background-gradient-type:linear;
background-gradient-color1:white;
background-gradient-color2:lightgrey;
}
.invoice-main-info tr td div:child(0){
width:49%;
float:left;
}
.invoice-main-info tr td div:child(1){
width:49%;
float:right;
}
.invoice-main-info tr td div div:child(0){
width:57%;
float:left;
}
.invoice-main-info tr td div div:child(1){
width:42%;
float:right;
}
/ *主要信息 - 停止* /
/ *交易方 - 开始* /
.invoice-交易方:child 0){
width:48%;
float:left;
}
.invoice-transaction-side:child(1){
width:48%;
float:right;
}
/ *交易方 - stop * /
.invoice-bar {
position:absolute;
y:71;
font-size:10;
text-align:right;
padding:0 1 -0.5 0;
margin-top:2;
border-bottom:1px;
background-gradient-type:linear;
background-gradient-color1:white;
background-gradient-color2:lightgrey;
background-gradient-coordinates:0 0 1 0;
}
< / style>
< ;? if($ invoice ['Invoice'] ['header']):?>
< p class =invoice-header><?= $ xml-> sanitize($ invoice ['Invoice'] ['header']);?>< / p&
< ;? endif?>
< div class =invoice-logo>
< ;? if($ parameters ['logo_path']):?>
< img width =80src =<?= $ parameters ['logo_path']?>/>
< ;? endif?>
< / div>
< div class =invoice-main-info>
< table>
< tr>
< th> Faktura<?= $ xml-> sanitize($ parameters ['document_name_suffix'])?> nr<?= $ xml-> sanitize($ invoice ['Invoice'] ['fullnumber'])?>< / th>
< / tr>
< tr>
< td>
< div>
< div> Data wystawienia:< br />< translation><?= $ translation-> get('Invoice:Data wystawienia')?< / translate>< div>
< div><?= $ xml-> sanitize($ invoice ['Invoice'] ['date'])?>< / div>
< div clear =both/>
< / div>
< div>
< ;? if(!$ invoice ['Invoice'] ['disposaldate_empty']):?>
< div> Datasprzedaży:< br />< translation><?= $ translation-> get('Invoice:Datasprzedaży')?< / translate> div>
< div><?= $ xml-> sanitize($ invoice ['Invoice'] ['disposaldate_format'] =='month'?date('Y-m',strtotime($ invoice [ 'Invoice'] ['disposaldate'])):$ invoice ['Invoice'] ['disposaldate'])>< / div>
< ;? endif?>
< div clear =both/>
< / div>
< div clear =both/>
< / td>
< / tr>
< tr>
< td>
< div>
< div> Terminpłatności:< br />< translation><?= $ translation-> get('Invoice:Terminpłatności')?< / translate>< div>
< div><?= $ xml-> sanitize($ invoice ['Invoice'] ['paymentdate'])?>< / div>
< div clear =both/>
< / div>
< div>
< div> Metodapłatności:< br />< translation><?= $ translation-> get('Invoice:Metodapłatności')?< / translation> div>
< div><?= $ xml-> sanitize($ invoice ['Invoice'] ['paymentmethod'])?>< br /><><?= $ xml-> sanitize($ translation-> get('Invoice:'。$ invoice ['Invoice'] ['paymentmethod']))?>< / translation>< / div>
< div clear =both/>
< / div>
< div clear =both/>
< / td>
< / tr>
< / table>
< / div>
< div clear =both/>
< ;? if($ parameters ['duplicate']):?>
< div position =absolutex =50y =25>
< img width =40src =/ images / duplicate /<?= date(Y-m-d)?> .png/>
< / div>
< ;? endif?>
< div class =invoice-transaction-side>
< h3> Sprzedawca:< translation>(<?= $ translation-> get('Invoice:Sprzedawca')?>)< / translation>< / h3>
< p><?= nl2br($ xml-> sanitize($ invoice ['Invoice'] ['sellerinfo']))?>< / p&
< / div>
< div class =invoice-transaction-side>
< h3> Nabywca:< translation>(<?= $ translation-> get('Invoice:Nabywca')?>)< / translation>< / h3>
< p><?= nl2br($ xml-> sanitize($ invoice ['Invoice'] ['buyerinfo']))?>< / p&
< / div>
< div clear =both/>
< div class =invoice-bar>
< ;? if($ parameters ['show_page_type']):?>
<?= $ page =='original'? 'O R Y G I N AŁ':'K O P I A'?
< ;? else:?>
< br />
< ;? endif?>
< / div>
< / header>
< body>
< table>
< header>
< tr>
< td width =3%> Lp< br />< translation><?= $ translation-> get('Invoice:Lp')?< / translation& < / td>
< td> Nazwa< br />< translation><?= $ translation-> get('Invoice:Nazwa')?>< / translate>< / td>
< ;? if($ parameters ['show_classification']):?>
< td width =7%> PKWiU< br />< translation><?= $ translation-> get('Invoice:PKWiU')?< / translation> < / td>
< ;? endif?>
< td width =6%> Jedn。< br />< translation><?= $ translation-> get('Invoice:Jedn。')?& / translation>< / td>
< td width =6%>Ilość< br />< translation><?= $ translation-> get('Invoice:Ilość')?< / translation> < / td>
< td width =11%><?= $ invoice ['Invoice'] ['tax_evaluation_method'] =='netto'? 'Cena netto':'Cena brutto'?< br />< translation><?= $ translation-> get('Invoice:Cena')?>< / translate> td>
< ;? if($ parameters ['show_discount']):?>
< td column-span =2> Rabat< / td>
< ;? endif?>
< td width =8%> Stawka< br />< translation><?= $ translation-> get('Invoice:Stawka')?< / translation& < / td>
< td width =12%>Wartośćnetto< br />< translation><?= $ translation-> get('Invoice:Wartośćnetto')?>翻译>< / td>
< td width =12%>Wartośćbrutto< br />< translation><?= $ translation-> get('Invoice:Wartośćbrutto')?>翻译>< / td>
< / tr>
< / header>
< ;? foreach($ invoiceContents as $ key => $ invoiceContent):?>
< tr class =invoice-content>
< td><?= $ key + 1?>< / td>
< td><?= $ xml-> sanitize($ invoiceContent ['InvoiceContent'] ['name'])?>< / td>
< ;? if($ parameters ['show_classification']):?>
< td><?= $ xml-> sanitize($ invoiceContent ['InvoiceContent'] ['classification'])?>< / td>
< ;? endif?>
< td><?= $ xml-> sanitize($ invoiceContent ['InvoiceContent'] ['unit'])?>< / td>
< td class =invoice-content-count><?= $ xml-> niceFloat($ invoiceContent ['InvoiceContent'] ['count'])?>< / td&
< td class =invoice-content-price><?= $ xml-> currency($ invoiceContent ['InvoiceContent'] ['price'])?>< / td>
< ;? if($ parameters ['show_discount']):?>
< td width =5%><?= $ xml-> niceFloat($ invoiceContent ['InvoiceContent'] ['discount_percent'])?>%< / td&
< td width =9%><?= $ xml-> currency($ invoiceContent ['InvoiceContent'] ['discount_amount'])?>< / td&
< ;? endif?>
< td><?= $ invoiceContent ['InvoiceContent'] ['vatcode']?>< / td>
< td class =invoice-content-netto><?= $ xml-> currency($ invoiceContent ['InvoiceContent'] ['netto'])?>< / td>
< td class =invoice-content-brutto><?= $ xml-> currency($ invoiceContent ['InvoiceContent'] ['brutto'])?>< / td>
< / tr>
< ;? endforeach?>
< / table>
< / body>
< footer height =80margin-top =5>
< style>
/ * vat sums - start * /
.invoice-sums {
float:left;
width:50%;
}
.invoice-sums th {
font-style:normal;
}
/ * vat sums - stop * /
/ *付款信息 - 开始* /
.invoice-payment-info {
boundary:0;
float:right;
width:<?= $ invoice ['Invoice'] ['translation_language_id']? '40%':'30%'?> ;;
}
.invoice-payment-info tr td:child(1){
text-align:right;
}
/ *付款信息 - 停止* /
/ *注释 - 开始* /
.invoice注释{
float : 剩下;
width:48%;
}
.invoice-annotations p {
margin-top:3;
}
/ * annotations - stop * /
.invoice-qr-code {
width:25;
float:right;
text-align:center;
font-size:6;
}
.invoice-additional-image {
float:right;
width:70;
}
/ * signatures - start * /
.invoice-signature {
text-align:center;
width:45;
}
.invoice-signature:child(0){
float:left;
}
.invoice-signature:child(1){
float:right;
}
.invoice-signature span:child(0){
font-style:bold;
}
.invoice-signature span:child(1){
font-size:7;
}
/ * signatues - stop * /
.invoice-footer {
margin-top:5;
text-align:center;
}
< / style>
< table class =invoice-sums>
< tr>
< th width =25%> Stawka VAT< br />< translation><?= $ translation-> get('Invoice:Stawka VAT')?>翻译>< / th>
< th width =25%>WartośćNetto< br />< translation><?= $ translation-> get('Invoice:Wartośćnetto')?><翻译>< / th>
< th width =25%> Kwota VAT< br />< translation><?= $ translation-> get('Invoice:Kwota VAT')?>翻译>< / th>
< th width =25%>WartośćBrutto< br />< translation><?= $ translation-> get('Invoice:Wartośćbrutto')?>翻译>< / th>
< / tr>
< ;? foreach($ invoice ['VatContent'] as $ vatContent):?>
< tr>
< td><?= $ vatContent ['VatCode'] ['label']?>< / td>
< td><?= $ xml-> currency($ vatContent ['netto'])?>< / td>
< td><?= $ xml-> currency($ vatContent ['tax'])?>< / td>
< td><?= $ xml-> currency($ vatContent ['brutto'])?>< / td>
< / tr>
< ;? endforeach?>
< tr>
< td> Razem< translation>(<?= $ translation-> get('Invoice:Razem')?>)< / translate>< / td&
< td><?= $ xml-> currency($ invoice ['Invoice'] ['vat_content_netto'])?>< / td>
< td><?= $ xml-> currency($ invoice ['Invoice'] ['vat_content_tax'])?>< / td>
< td><?= $ xml-> currency($ invoice ['Invoice'] ['vat_content_brutto'])?>< / td>
< / tr>
< / table>
< table class =invoice-payment-info>
< tr>
< td> Razem:< translation>(<?= $ translation-> get('Invoice:Razem')?>)< / translate>< / td&
< td><?= $ xml-> currency($ invoice ['Invoice'] ['total'])? <?= $ invoice ['Invoice'] ['currency']?>< / td>
< / tr>
< tr>
< td width =60%>Zapłacono:< translation>(<?= $ translation-> get('Invoice:Zapłacono')?>)< / translation> / td>
< td width =40%><?= $ xml-> currency($ invoice ['Invoice'] ['alreadypaid_initial'])? <?= $ invoice ['Invoice'] ['currency']?>< / td>
< / tr>
< tr>
< td>Pozostało:< translation>(<?= $ translation-> get('Invoice:Dozapłaty')?>)< / translation>< / td>
< td><?= $ xml-> currency($ invoice ['Invoice'] ['total'] - $ invoice ['Invoice'] ['alreadypaid_initial']? <?= $ invoice ['Invoice'] ['currency']?>< / td>
< / tr>
< / table>
< div clear =both/>
< div class =invoice-annotations>
< ;? if($ invoice ['Invoice'] ['legal_annotations']):?>
< p><?= $ xml-> sanitize($ invoice ['Invoice'] ['legal_annotations'])?>< / p>
< ;? endif?>
< ;? if($ invoice ['Invoice'] ['associated_document_annotations']):?>
<?= $ xml-> sanitize($ invoice ['Invoice'] ['associated_document_annotations'])?>
< ;? endif?>
< ;? if($ invoice ['Invoice'] ['description']):?>
< p>
Uwagi:< translation>(<?= $ translation-> get('Invoice:Uwagi')?>)< / translation>< br /
<?= nl2br($ invoice ['Invoice'] ['description'])?>
< / p>
< ;? endif?>
< ;? if($ invoice ['Invoice'] ['currency']!='PLN'&&!$ parameters ['show_invoice_foreign_currency_vat_content']):?>
< p>
1<?= $ invoice ['Invoice'] ['currency']?> =<?= number_format($ invoice ['Invoice'] ['currency_exchange'],4,',','')? PLN< br />
Kurs z dnia:<?= $ invoice ['Invoice'] ['currency_date']?>< br />
数字tabeli:<?= $ invoice ['Invoice'] ['currency_label']?>
< / p>
< ;? endif?>
< / div>
< ;? if($ parameters ['invoice_send_external_type']!='none'):?>
< div class =invoice-qr-code>
< a href =http://<?= $ parameters ['app_server']?> / faktura /<?= $ invoice ['Invoice'] ['id']?> /<?= $ invoice ['Invoice'] ['hash']?>>
< qr-code> http://<?= $ parameters ['app_server']?> / faktura /<?= $ invoice ['Invoice'] ['id']?> /<?= $ invoice ['Invoice'] ['hash']?>< / qr-code>< br /
panel klienta
< / a>
< / div>
< ;? endif?>
< div clear =right/>
< ;? if($ parameters ['additional_image_path']):?>
< div class =invoice-additional-image>
< img width =70src =<?= $ parameters ['additional_image_path']?>/>
< / div>
< ;? endif?>
< div clear =bothmargin-bottom =5/>
< ;? if($ parameters ['signature_image_path']):?>
< img width =70src =<?= $ parameters ['signature_image_path']?>/>
< ;? endif?>
< div class =podpismargin-top =2>
< div class =invoice-signature>
< span><?= $ xml-> sanitize($ invoice ['Invoice'] ['user_name'])?< / span>< br /
< span> Imizi nazwisko osoby uprawnionej do wystawiania faktury< / span>
< / div>
< div class =invoice-signature>
< span>< br />< / span>< br />
< span>Imięi nazwisko osoby uprawnionej do odbioru faktury< / span>
< / div>
< div clear =both/>
< / div>
< ;? if($ invoice ['Invoice'] ['footer']):?>
< p class =invoice-footer><?= $ xml-> sanitize($ invoice ['Invoice'] ['footer']);?>< / p&
< ;? endif?>
< / footer>
< / page>
< ;? if($ page =='original'&& $ parameters ['address']):// opcja adresu korespondecyjnego na odwrocieoryginału?>
< page padding-left =119padding-top =255>
<?= nl2br($ xml-> sanitize($ invoice ['Invoice'] ['buyeraddress']));?>
< / page>
< ;? endif?>
< ;? endforeach?>
< ;? if($ parameters ['leaflet']):// druczek przelewu?>
< page padding =20 0 0 20>
< ;? for($ i = 0; $ i <2; $ i ++):?>
< div width =164height =106background-image =/ images / reports / invoices / leaflet_<?= $ i?> .png>
< style>
entry {
margin-left:22.5;
margin-top:4.6;
}
< / style>
< entry><?= $ xml-> sanitize($ invoice ['CompanyDetail'] ['name'])?>< / entry&
< entry>
<?= $ xml-> sanitize($ invoice ['CompanyDetail'] ['street'])?> <?= $ invoice ['CompanyDetail'] ['flat_number']?<?= $ xml-> sanitize($ invoice ['CompanyDetail'] ['building_number']) /\".$xml->sanitize($invoice['CompanyDetail']['flat_number']):?>,
<?= $ xml-> sanitize($ invoice [' CompanyDetail'] ['zip'])?> <?= $ xml-> sanitize($ invoice ['CompanyDetail'] ['city'])?>
< / entry>
< entry letter-spacing =5><?= str_replace(,,$ xml-> sanitize($ invoice ['CompanyDetail'] ['bank_account']) >< / entry>
< entry margin-left =98><?= str_replace(。,,,$ invoice ['Invoice'] ['remaining'])?>< / entry> ;
< entry>< br />< / entry>
< entry><?= $ xml-> sanitize($ invoice ['ContractorDetail'] ['name'])?>< / entry&
< entry>
<?= $ xml-> sanitize($ invoice ['ContractorDetail'] ['street'])?>,
<?= $ xml-> sanitize 'ContractorDetail'] ['zip'])?> <?= $ xml-> sanitize($ invoice ['ContractorDetail'] ['city'])?>
< / entry>
< entry><?= $ xml-> sanitize($ invoice ['Invoice'] ['fullnumber'])?>< / entry>
< / div>
< ;? endfor?
< / page>
< ;? endif?>感谢您的帮助!
< >解决方案我认为你正在寻找位置:fixed CSS属性。
请参阅这个小提琴。
.fixed {
位置:固定;
top:20px;
left:20px;
}
I have problem with positiong div with content in custom place on page pernament way , that means div will be 20px of bottom no matter what:). Problem is that i using online invoice manager for my company and i want littel customization for my invoice . Namely i want signature on invoice will be pernament 20px from bottom, beacuse now signature is moving down whem o add content . In this manager postition: relative is turn off and i can'f figure out how to do it .
I Include html code for invoice , div with signature is class="podpis" and there are inside to div's with txt.
<style>
/*body {
margin-bottom:177px;
margin-top:118px;
}
*/
page {
padding: 20 15 20 15;
font-size: 8;
font-family: LiberationSans;
}
td, th {
padding: 0.5 1 0 1;
}
translation {
<? if ($invoice['Invoice']['translation_language_id']):?>
font-size: 6;
font-style: italic;
display: inline;
<? else: // w przypadku faktury w języku polskim tłumaczenia są ukryte ?>
display: none;
<? endif ?>
}
</style>
<? foreach ($parameters['pages'] as $page): ?>
<page>
<header id="top" height="85">
<style>
.invoice-header {
position: absolute;
y: -10;
text-align: center;
}
#top {
margin-top:118px;
}
/* logo */
.invoice-logo {
width: 45%;
height: 40;
float: left;
}
/* main info - start */
.invoice-main-info {
width: 48%;
float: right;
}
.invoice-main-info tr th {
padding: 1.5 0 1.5 0;
}
.invoice-main-info tr td {
padding: 1 0 1 1;
}
.invoice-main-info tr:child(0) {
font-size: 9;
text-align: center;
background-gradient-type: linear;
background-gradient-color1: white;
background-gradient-color2: lightgrey;
}
.invoice-main-info tr td div:child(0) {
width: 49%;
float: left;
}
.invoice-main-info tr td div:child(1) {
width: 49%;
float: right;
}
.invoice-main-info tr td div div:child(0) {
width: 57%;
float: left;
}
.invoice-main-info tr td div div:child(1) {
width: 42%;
float: right;
}
/* main info - stop */
/* transaction sides - start */
.invoice-transaction-side:child(0) {
width: 48%;
float: left;
}
.invoice-transaction-side:child(1) {
width: 48%;
float: right;
}
/* transaction sides - stop */
.invoice-bar {
position: absolute;
y: 71;
font-size: 10;
text-align: right;
padding: 0 1 -0.5 0;
margin-top: 2;
border-bottom: 1px;
background-gradient-type: linear;
background-gradient-color1: white;
background-gradient-color2: lightgrey;
background-gradient-coordinates: 0 0 1 0;
}
</style>
<? if ($invoice['Invoice']['header']): ?>
<p class="invoice-header"><?=$xml->sanitize($invoice['Invoice']['header']);?></p>
<? endif ?>
<div class="invoice-logo">
<? if ($parameters['logo_path']): ?>
<img width="80" src="<?=$parameters['logo_path']?>"/>
<? endif ?>
</div>
<div class="invoice-main-info">
<table>
<tr>
<th>Faktura<?=$xml->sanitize($parameters['document_name_suffix'])?> nr <?=$xml->sanitize($invoice['Invoice']['fullnumber'])?></th>
</tr>
<tr>
<td>
<div>
<div>Data wystawienia:<br/><translation><?=$translation->get('Invoice:Data wystawienia')?></translation></div>
<div><?=$xml->sanitize($invoice['Invoice']['date'])?></div>
<div clear="both"/>
</div>
<div>
<? if(!$invoice['Invoice']['disposaldate_empty']): ?>
<div>Data sprzedaży:<br/><translation><?=$translation->get('Invoice:Data sprzedaży')?></translation></div>
<div><?=$xml->sanitize($invoice['Invoice']['disposaldate_format'] == 'month' ? date('Y-m', strtotime($invoice['Invoice']['disposaldate'])) : $invoice['Invoice']['disposaldate'])?></div>
<? endif ?>
<div clear="both"/>
</div>
<div clear="both"/>
</td>
</tr>
<tr>
<td>
<div>
<div>Termin płatności:<br/><translation><?=$translation->get('Invoice:Termin płatności')?></translation></div>
<div><?=$xml->sanitize($invoice['Invoice']['paymentdate'])?></div>
<div clear="both"/>
</div>
<div>
<div>Metoda płatności:<br/><translation><?=$translation->get('Invoice:Metoda płatności')?></translation></div>
<div><?=$xml->sanitize($invoice['Invoice']['paymentmethod'])?><br/><translation><?=$xml->sanitize($translation->get('Invoice:'.$invoice['Invoice']['paymentmethod']))?></translation></div>
<div clear="both"/>
</div>
<div clear="both"/>
</td>
</tr>
</table>
</div>
<div clear="both"/>
<? if ($parameters['duplicate']): ?>
<div position="absolute" x="50" y="25">
<img width="40" src="/images/duplicate/<?=date("Y-m-d")?>.png"/>
</div>
<? endif ?>
<div class="invoice-transaction-side">
<h3>Sprzedawca: <translation>(<?=$translation->get('Invoice:Sprzedawca')?>)</translation></h3>
<p><?=nl2br($xml->sanitize($invoice['Invoice']['sellerinfo']))?></p>
</div>
<div class="invoice-transaction-side">
<h3>Nabywca: <translation>(<?=$translation->get('Invoice:Nabywca')?>)</translation></h3>
<p><?=nl2br($xml->sanitize($invoice['Invoice']['buyerinfo']))?></p>
</div>
<div clear="both"/>
<div class="invoice-bar">
<? if ($parameters['show_page_type']): ?>
<?=$page == 'original' ? 'O R Y G I N A Ł' : 'K O P I A'?>
<? else: ?>
<br/>
<? endif ?>
</div>
</header>
<body>
<table>
<header>
<tr>
<td width="3%">Lp<br/><translation><?=$translation->get('Invoice:Lp')?></translation></td>
<td>Nazwa<br/><translation><?=$translation->get('Invoice:Nazwa')?></translation></td>
<? if ($parameters['show_classification']): ?>
<td width="7%">PKWiU<br/><translation><?=$translation->get('Invoice:PKWiU')?></translation></td>
<? endif ?>
<td width="6%">Jedn.<br/><translation><?=$translation->get('Invoice:Jedn.')?></translation></td>
<td width="6%">Ilość<br/><translation><?=$translation->get('Invoice:Ilość')?></translation></td>
<td width="11%"><?=$invoice['Invoice']['tax_evaluation_method'] == 'netto' ? 'Cena netto' : 'Cena brutto'?><br/><translation><?=$translation->get('Invoice:Cena')?></translation></td>
<? if ($parameters['show_discount']): ?>
<td column-span="2">Rabat</td>
<? endif ?>
<td width="8%">Stawka<br/><translation><?=$translation->get('Invoice:Stawka')?></translation></td>
<td width="12%">Wartość netto<br/><translation><?=$translation->get('Invoice:Wartość netto')?></translation></td>
<td width="12%">Wartość brutto<br/><translation><?=$translation->get('Invoice:Wartość brutto')?></translation></td>
</tr>
</header>
<? foreach ($invoiceContents as $key => $invoiceContent): ?>
<tr class="invoice-content">
<td><?=$key + 1?></td>
<td><?=$xml->sanitize($invoiceContent['InvoiceContent']['name'])?></td>
<? if ($parameters['show_classification']): ?>
<td><?=$xml->sanitize($invoiceContent['InvoiceContent']['classification'])?></td>
<? endif ?>
<td><?=$xml->sanitize($invoiceContent['InvoiceContent']['unit'])?></td>
<td class="invoice-content-count"><?=$xml->niceFloat($invoiceContent['InvoiceContent']['count'])?></td>
<td class="invoice-content-price"><?=$xml->currency($invoiceContent['InvoiceContent']['price'])?></td>
<? if ($parameters['show_discount']): ?>
<td width="5%"><?=$xml->niceFloat($invoiceContent['InvoiceContent']['discount_percent'])?>%</td>
<td width="9%"><?=$xml->currency($invoiceContent['InvoiceContent']['discount_amount'])?></td>
<? endif ?>
<td><?=$invoiceContent['InvoiceContent']['vatcode']?></td>
<td class="invoice-content-netto"><?=$xml->currency($invoiceContent['InvoiceContent']['netto'])?></td>
<td class="invoice-content-brutto"><?=$xml->currency($invoiceContent['InvoiceContent']['brutto'])?></td>
</tr>
<? endforeach ?>
</table>
</body>
<footer height="80" margin-top="5">
<style>
/* vat sums - start */
.invoice-sums {
float: left;
width: 50%;
}
.invoice-sums th {
font-style: normal;
}
/* vat sums - stop */
/* payment info - start */
.invoice-payment-info {
border:0;
float: right;
width: <?=$invoice['Invoice']['translation_language_id'] ? '40%' : '30%'?>;
}
.invoice-payment-info tr td:child(1) {
text-align: right;
}
/* payment info - stop */
/* annotations - start */
.invoice-annotations {
float: left;
width: 48%;
}
.invoice-annotations p {
margin-top:3;
}
/* annotations - stop */
.invoice-qr-code {
width: 25;
float: right;
text-align: center;
font-size: 6;
}
.invoice-additional-image {
float: right;
width: 70;
}
/* signatures - start */
.invoice-signature {
text-align: center;
width: 45;
}
.invoice-signature:child(0) {
float: left;
}
.invoice-signature:child(1) {
float: right;
}
.invoice-signature span:child(0) {
font-style: bold;
}
.invoice-signature span:child(1) {
font-size: 7;
}
/* signatues - stop */
.invoice-footer {
margin-top: 5;
text-align: center;
}
</style>
<table class="invoice-sums">
<tr>
<th width="25%">Stawka VAT<br/><translation><?=$translation->get('Invoice:Stawka VAT')?></translation></th>
<th width="25%">Wartość Netto<br/><translation><?=$translation->get('Invoice:Wartość netto')?></translation></th>
<th width="25%">Kwota VAT<br/><translation><?=$translation->get('Invoice:Kwota VAT')?></translation></th>
<th width="25%">Wartość Brutto<br/><translation><?=$translation->get('Invoice:Wartość brutto')?></translation></th>
</tr>
<? foreach ($invoice['VatContent'] as $vatContent): ?>
<tr>
<td><?=$vatContent['VatCode']['label']?></td>
<td><?=$xml->currency($vatContent['netto'])?></td>
<td><?=$xml->currency($vatContent['tax'])?></td>
<td><?=$xml->currency($vatContent['brutto'])?></td>
</tr>
<? endforeach ?>
<tr>
<td>Razem <translation>(<?=$translation->get('Invoice:Razem')?>)</translation></td>
<td><?=$xml->currency($invoice['Invoice']['vat_content_netto'])?></td>
<td><?=$xml->currency($invoice['Invoice']['vat_content_tax'])?></td>
<td><?=$xml->currency($invoice['Invoice']['vat_content_brutto'])?></td>
</tr>
</table>
<table class="invoice-payment-info">
<tr>
<td>Razem: <translation>(<?=$translation->get('Invoice:Razem')?>)</translation></td>
<td><?=$xml->currency($invoice['Invoice']['total'])?> <?=$invoice['Invoice']['currency']?></td>
</tr>
<tr>
<td width="60%">Zapłacono: <translation>(<?=$translation->get('Invoice:Zapłacono')?>)</translation></td>
<td width="40%"><?=$xml->currency($invoice['Invoice']['alreadypaid_initial'])?> <?=$invoice['Invoice']['currency']?></td>
</tr>
<tr>
<td>Pozostało: <translation>(<?=$translation->get('Invoice:Do zapłaty')?>)</translation></td>
<td><?=$xml->currency($invoice['Invoice']['total'] - $invoice['Invoice']['alreadypaid_initial'])?> <?=$invoice['Invoice']['currency']?></td>
</tr>
</table>
<div clear="both"/>
<div class="invoice-annotations">
<? if ($invoice['Invoice']['legal_annotations']): ?>
<p><?=$xml->sanitize($invoice['Invoice']['legal_annotations'])?></p>
<? endif ?>
<? if ($invoice['Invoice']['associated_document_annotations']): ?>
<?=$xml->sanitize($invoice['Invoice']['associated_document_annotations'])?>
<? endif ?>
<? if ($invoice['Invoice']['description']): ?>
<p>
Uwagi: <translation>( <?=$translation->get('Invoice:Uwagi')?>)</translation><br/>
<?=nl2br($invoice['Invoice']['description'])?>
</p>
<? endif ?>
<? if ($invoice['Invoice']['currency'] != 'PLN' && !$parameters['show_invoice_foreign_currency_vat_content']): ?>
<p>
1 <?=$invoice['Invoice']['currency']?> = <?=number_format($invoice['Invoice']['currency_exchange'], 4, ',', ' ')?> PLN<br/>
Kurs z dnia: <?=$invoice['Invoice']['currency_date']?><br/>
Numer tabeli: <?=$invoice['Invoice']['currency_label']?>
</p>
<? endif ?>
</div>
<? if ($parameters['invoice_send_external_type'] != 'none'): ?>
<div class="invoice-qr-code">
<a href="http://<?=$parameters['app_server']?>/faktura/<?=$invoice['Invoice']['id']?>/<?=$invoice['Invoice']['hash']?>">
<qr-code>http://<?=$parameters['app_server']?>/faktura/<?=$invoice['Invoice']['id']?>/<?=$invoice['Invoice']['hash']?></qr-code><br/>
panel klienta
</a>
</div>
<? endif ?>
<div clear="right"/>
<? if ($parameters['additional_image_path']): ?>
<div class="invoice-additional-image">
<img width="70" src="<?=$parameters['additional_image_path']?>"/>
</div>
<? endif ?>
<div clear="both" margin-bottom="5"/>
<? if ($parameters['signature_image_path']): ?>
<img width="70" src="<?=$parameters['signature_image_path']?>"/>
<? endif ?>
<div class="podpis" margin-top="2">
<div class="invoice-signature">
<span><?=$xml->sanitize($invoice['Invoice']['user_name'])?></span><br/>
<span>Imię i nazwisko osoby uprawnionej do wystawiania faktury</span>
</div>
<div class="invoice-signature">
<span><br/></span><br/>
<span>Imię i nazwisko osoby uprawnionej do odbioru faktury</span>
</div>
<div clear="both"/>
</div>
<? if ($invoice['Invoice']['footer']): ?>
<p class="invoice-footer"><?=$xml->sanitize($invoice['Invoice']['footer']);?></p>
<? endif ?>
</footer>
</page>
<? if ($page == 'original' && $parameters['address']): // opcja adresu korespondecyjnego na odwrocie oryginału ?>
<page padding-left="119" padding-top="255">
<?=nl2br($xml->sanitize($invoice['Invoice']['buyeraddress']));?>
</page>
<? endif ?>
<? endforeach ?>
<? if ($parameters['leaflet']): // druczek przelewu ?>
<page padding="20 0 0 20">
<? for ($i = 0; $i < 2; $i++): ?>
<div width="164" height="106" background-image="/images/reports/invoices/leaflet_<?=$i?>.png">
<style>
entry {
margin-left: 22.5;
margin-top: 4.6;
}
</style>
<entry><?=$xml->sanitize($invoice['CompanyDetail']['name'])?></entry>
<entry>
<?=$xml->sanitize($invoice['CompanyDetail']['street'])?> <?=$xml->sanitize($invoice['CompanyDetail']['building_number'])?><?=$invoice['CompanyDetail']['flat_number'] ? "/".$xml->sanitize($invoice['CompanyDetail']['flat_number']) : ""?>,
<?=$xml->sanitize($invoice['CompanyDetail']['zip'])?> <?=$xml->sanitize($invoice['CompanyDetail']['city'])?>
</entry>
<entry letter-spacing="5"><?=str_replace(" ", "", $xml->sanitize($invoice['CompanyDetail']['bank_account']))?></entry>
<entry margin-left="98"><?=str_replace(".", ",", $invoice['Invoice']['remaining'])?></entry>
<entry><br/></entry>
<entry><?=$xml->sanitize($invoice['ContractorDetail']['name'])?></entry>
<entry>
<?=$xml->sanitize($invoice['ContractorDetail']['street'])?>,
<?=$xml->sanitize($invoice['ContractorDetail']['zip'])?> <?=$xml->sanitize($invoice['ContractorDetail']['city'])?>
</entry>
<entry><?=$xml->sanitize($invoice['Invoice']['fullnumber'])?></entry>
</div>
<? endfor ?>
</page>
<? endif ?>
Thank you for your help !
解决方案 I think you're looking for the position:fixed CSS attribute.
See this fiddle.
.fixed {
position: fixed;
top:20px;
left:20px;
}
这篇关于如何在页面的自定义地方定位pernament div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!