~agilebg/account-invoice-report/7.0-bug-1284049-hurrinico

« back to all changes in this revision

Viewing changes to invoice_webkit/report/account_invoice.mako

  • Committer: nicolas.bessi at camptocamp
  • Author(s): romain.deheele at camptocamp
  • Date: 2013-07-31 15:26:45 UTC
  • mfrom: (34.1.1 account-invoice-report2)
  • Revision ID: nicolas.bessi@camptocamp.com-20130731152645-15ypimgkv6qqnhip
[MRG] [IMP] banking infos : div replaces table to avoid broken table on page-break

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
.list_bank_table {
44
44
    text-align:center;
45
45
    border-collapse: collapse;
46
 
}
47
 
.list_bank_table th {
 
46
    page-break-inside: avoid;
 
47
    display:table;
 
48
}
 
49
 
 
50
.act_as_row {
 
51
   display:table-row;
 
52
}
 
53
.list_bank_table .act_as_thead {
48
54
    background-color: #EEEEEE;
49
55
    text-align:left;
50
56
    font-size:12;
51
57
    font-weight:bold;
52
58
    padding-right:3px;
53
59
    padding-left:3px;
 
60
    white-space:nowrap;
 
61
    background-clip:border-box;
 
62
    display:table-cell;
54
63
}
55
 
.list_bank_table td {
 
64
.list_bank_table .act_as_cell {
56
65
    text-align:left;
57
66
    font-size:12;
58
67
    padding-right:3px;
59
68
    padding-left:3px;
60
69
    padding-top:3px;
61
70
    padding-bottom:3px;
 
71
    white-space:nowrap;
 
72
    display:table-cell;
62
73
}
63
74
 
64
75
 
332
343
    <%
333
344
      inv_bank = inv.partner_bank_id
334
345
    %>
335
 
    <table class="list_bank_table" width="100%" >
 
346
    <div class="list_bank_table act_as_table" style="width:100%;" >
336
347
      <!-- vat value are taken back from commercial id -->
337
 
        <tr>
338
 
            <th style="width:20%;">${_("Bank")}</th>
339
 
            <td style="width:30%;text-align:left;">${inv_bank and inv_bank.bank_name or '-' } </td>
 
348
        <div class="act_as_row">
 
349
            <div class="act_as_thead" style="width:20%;">${_("Bank")}</div>
 
350
            <div class="act_as_cell" style="width:40%;text-align:left;">${inv_bank and inv_bank.bank_name or '-' } </div>
340
351
            %if inv.partner_id and inv.partner_id.vat :
341
 
            <th style="width:20%;">${_("Customer VAT No")}</th>
342
 
            <td style="width:30%;">${inv.partner_id.vat or '-'}</td>
 
352
            <div class="act_as_thead" style="width:20%;">${_("Customer VAT No")}</div>
 
353
            <div class="act_as_cell" style="width:20%;">${inv.partner_id.vat or '-'}</div>
343
354
            %else:
344
355
            <!-- conserve table's cells widths -->
345
 
            <td style="width:20%;"></td>
346
 
            <td style="width:30%;"></td>
 
356
            <div class="act_as_cell" style="width:20%;"></div>
 
357
            <div class="act_as_cell" style="width:20%;"></div>
347
358
            %endif
348
 
        </tr>
349
 
        <tr>
350
 
            <th style="width:20%;">${_("Bank account")}</th>
351
 
            <td style="width:50%;text-align:left;">${ inv_bank and inv_bank.acc_number or '-' }</td>
352
 
            <th style="width:20%;">${_("Our VAT No")}</th>
353
 
            <td style="width:30%;" class="vat">${inv.company_id.partner_id.vat or '-'}</td>
354
 
        </tr>
355
 
        <tr>
356
 
            <th width="20%">${_("BIC")}</th>
357
 
            <td style="width:30%;">${inv_bank and inv_bank.bank_bic or '-' }</td>
358
 
        </tr>
359
 
    </table>
 
359
        </div>
 
360
        <div class="act_as_row">
 
361
            <div class="act_as_thead" style="width:20%;">${_("Bank account")}</div>
 
362
            <div class="act_as_cell" style="width:40%;text-align:left;">${ inv_bank and inv_bank.acc_number or '-' }</div>
 
363
            <div class="act_as_thead" style="width:20%;">${_("Our VAT No")}</div>
 
364
            <div class="act_as_cell" style="width:20%;" class="vat">${inv.company_id.partner_id.vat or '-'}</div>
 
365
        </div>
 
366
        <div class="act_as_row">
 
367
            <div class="act_as_thead" style="width:20%;">${_("BIC")}</div>
 
368
            <div class="act_as_cell"  style="width:40%;">${inv_bank and inv_bank.bank_bic or '-' }</div>
 
369
        </div>
 
370
    </div>
360
371
    <br/>
361
372
    %if inv.comment :
362
373
        <p class="std_text">${inv.comment | carriage_returns}</p>