fix: inline styles to classes

This commit is contained in:
2024-09-12 00:52:00 +04:00
parent 15bb43e89d
commit 03aba9649a
2 changed files with 19 additions and 28 deletions

View File

@@ -149,16 +149,16 @@ class BillingService(BaseService):
services.append( services.append(
CreateBillingRequestValue( CreateBillingRequestValue(
name=f'[{product.product.name}] - {service.service.name}', name=f'[{product.product.name}] - {service.service.name}',
price=to_locale_number(service.price), price=service.price,
amount=to_locale_number(product.quantity) amount=product.quantity
) )
) )
for service in deal.services: for service in deal.services:
services.append( services.append(
CreateBillingRequestValue( CreateBillingRequestValue(
name=f'{service.service.name}', name=f'{service.service.name}',
price=to_locale_number(service.price), price=service.price,
amount=to_locale_number(service.quantity) amount=service.quantity
) )
) )

View File

@@ -35,8 +35,6 @@
margin-top: 8px; margin-top: 8px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
/*flex-direction: column;*/
/*text-align: right;*/
} }
.footer-block { .footer-block {
@@ -80,8 +78,6 @@
td, th { td, th {
padding: 16px 13px; padding: 16px 13px;
/*word-wrap: unset;*/
} }
td:first-child, th:first-child { td:first-child, th:first-child {
@@ -96,10 +92,21 @@
text-align: left; text-align: left;
} }
td:first-child {
white-space: normal;
word-wrap: break-word;
}
td:not(:first-child), th:not(:first-child) { td:not(:first-child), th:not(:first-child) {
text-align: right; text-align: right;
} }
td:not(:first-child) {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
img { img {
width: 170px; width: 170px;
margin-bottom: 15px; margin-bottom: 15px;
@@ -109,10 +116,6 @@
border-top: 2px solid black; border-top: 2px solid black;
} }
.footer-right {
text-align: right;
}
.footer-line-right { .footer-line-right {
font-size: medium; font-size: medium;
font-weight: bolder; font-weight: bolder;
@@ -166,23 +169,13 @@
<tbody> <tbody>
{% for service in services %} {% for service in services %}
<tr> <tr>
<td <td>{{ service.name }}</td>
style=" white-space: normal; word-wrap: break-word;" <td>{{ '{:,}'.format(service.amount) }} шт.</td>
>{{ service.name }} <td>{{ '{:,}'.format(service.price).replace(',', ' ') }} ₽</td>
</td> <td>{{ '{:,}'.format(service.price * service.amount).replace(',', ' ') }} ₽</td>
<td style=" white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; ">{{ service.amount }} шт.</td>
<td style=" white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; ">{{ service.price }} ₽</td>
<td style=" white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; ">{{ '{:,}'.format(service.price * service.amount).replace(',', ' ') }}dshfghfghfghfg ₽</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="footer"> <div class="footer">
@@ -195,8 +188,6 @@
</div> </div>
<div class="footer-words"> <div class="footer-words">
<div class="footer-line-right">{{ deal_price_words }}</div> <div class="footer-line-right">{{ deal_price_words }}</div>
</div> </div>
</div> </div>
</div> </div>