Skip to content

Commit

Permalink
fix: update address mapping; variable names; conditional IRN being set
Browse files Browse the repository at this point in the history
  • Loading branch information
vorasmit committed Jan 21, 2025
1 parent 9c12c22 commit f8d4c06
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 71 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.align-middle{
.align-middle {
vertical-align: middle;
}

Expand All @@ -7,62 +7,51 @@
color: black;
}

.qr-code{

}

.attribute{

}

.barcode{

}

.no-border{
.no-border {
border: none !important;
}

.no-border > *{
.no-border > * {
border: none;
}
.attribute-value{

.attribute-value {
font-weight: bold;
}

.bold{
.bold {
font-weight: bold;
}

.table-element{
.table-element {
font-size: 10px;
}

.table-element > .table-heading{
.table-element > .table-heading {
font-size: 13px;
font-weight: bold;
}

.table-heading{
.table-heading {
font-size: 13px;
font-weight: bold;
}

thead > th{
thead > th {
background-color: white !important;
}

table, th, td {
table,
th,
td {
border: 1px solid black;
border-collapse: collapse;
}

.table-element .border div{
.table-element .border div {
border: 1px solid black !important;
width: 100%;
padding: 5px;

}

@media print {
Expand All @@ -73,8 +62,8 @@ table, th, td {
}
}

.print-format tbody>tr>td,
.print-format tbody>tr>th {
.print-format tbody > tr > td,
.print-format tbody > tr > th {
padding: 6px !important;
border-top: none;
color: black;
Expand Down Expand Up @@ -129,4 +118,4 @@ table, th, td {
margin-top: 5px;
width: 95px !important;
image-rendering: -webkit-optimize-contrast;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@ <h1 class="title">e-Waybill</h1>
<span class="attribute-value">{{ get_transport_type(data.transactionType) }}</span>
</td>
</tr>
{% if irn %}
<tr>
<td colspan="3">
<span class="attribute">Irn: </span>
<span class="attribute-value">{{data.irn}}</span>
<span class="attribute-value">{{irn}}</span>
</td>
</tr>
{% endif %}
</tbody>
</table>

Expand All @@ -90,37 +92,34 @@ <h1 class="title">e-Waybill</h1>
<tbody class="table-element">
<tr>
<td style="width: 50%;">
{% set from_state = get_state(data.fromStateCode) %}

<div class="bold mb-2">From</div>
<div>
<div style="margin-bottom: 10px;">
<div>GSTIN: {{ add_spacing(data.fromGstin,5) }}</div>
<div>{{data.fromTrdName}}</div>
<div>{{ from_state }}</div> {# get_state_by_state_code #}
<div>{{ get_state(data.fromStateCode) }}</div> {# get_state_by_state_code #}
</div>
<div>
:: Dispatch From ::
<div>{{ data.fromAddr1 }}</div>
<div>{{ data.fromAddr2 }}</div>
<div>{{ data.fromPlace }}, {{ from_state }}-{{ data.fromPincode }}</div>
<div>{{ data.fromPlace }}, {{ get_state(data.actFromStateCode) }}-{{ data.fromPincode }}</div>
</div>
</div>
</td>
<td style="width: 50%;">
{% set to_state = get_state(data.toStateCode) %}
<div class="bold mb-2">To</div>
<div>
<div style="margin-bottom: 10px;">
<div>GSTIN: {{ add_spacing(data.toGstin,5) }}</div>
<div>{{data.toTrdName}}</div>
<div>{{ to_state }}</div> {# get_state_by_state_code #}
<div>{{ get_state(data.toStateCode) }}</div> {# get_state_by_state_code #}
</div>
<div>
:: Ship to ::
<div>{{ data.toAddr1 }}</div>
<div>{{ data.toAddr2 }}</div>
<div>{{ data.toPlace }}, {{ to_state }}-{{ data.toPincode }}</div>
<div>{{ data.toPlace }}, {{ get_state(data.actToStateCode) }}-{{ data.toPincode }}</div>
</div>
</div>
</td>
Expand Down Expand Up @@ -257,11 +256,11 @@ <h1 class="title">e-Waybill</h1>
<tr>
<td style="width: 50%;">
<span class="attribute">Transporter ID & Name: </span>
<span class="attribute-value">{{ data.transporterId }} & {{ data.transporterName }} </span>
<span class="attribute-value">{{ add_spacing(data.transporterId, 5) or "None" }} & {{ data.transporterName or "None" }} </span>
</td>
<td style="width: 50%;">
<span class="attribute">Transporter Doc. No & Date:</span>
<span class="attribute-value"> {{ data.transDocNo|default('') }} - {{ data.transDocDate|default('') }} </span>
<span class="attribute-value"> {{ data.transDocNo or "None" }} & {{ data.transDocDate or "None" }} </span>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -295,28 +294,28 @@ <h1 class="title">e-Waybill</h1>
</td>
</tr>
<tr>
{% for item in data.VehiclListDetails %}
{% for detail in data.VehiclListDetails %}
<tr>
<td>
{{ get_transport_mode(item.transMode) }}
{{ get_transport_mode(detail.transMode) }}
</td>
<td>
{{ item.vehicleNo }}
{{ detail.vehicleNo }}
</td>
<td>
{{ item.fromPlace }}
{{ detail.fromPlace }}
</td>
<td>
{{ item.enteredDate }}
{{ detail.enteredDate }}
</td>
<td>
{{ item.userGSTINTransin }}
{{ detail.userGSTINTransin }}
</td>
<td>
{{ item.cebwNo | default('-') }}
{{ detail.cebwNo | default('-') }}
</td>
<td>
{{ item.multiVehInfo | default('-') }}
{{ detail.multiVehInfo | default('-') }}
</td>

</tr>
Expand All @@ -337,27 +336,6 @@ <h1 class="title">e-Waybill</h1>
</tr>
</tbody>
</table>








{#<div class="borderless" style="width: 100%;">
<span class="text-left float-left">
<h1 class="title">e-Waybill</h1>
</span>
<span class="text-right float-right">
<img
src="https://upload.wikimedia.org/wikipedia/commons/d/d0/QR_code_for_mobile_English_Wikipedia.svg"
class="qr-code"
/>
</span>
</div>
#}

</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"custom_format": 0,
"default_print_language": "en",
"disabled": 0,
"doc_type": "Print-E waybill",
"doc_type": "e-Waybill Log",
"docstatus": 0,
"doctype": "Print Format",
"font_size": 14,
Expand All @@ -15,11 +15,11 @@
"margin_left": 0.0,
"margin_right": 0.0,
"margin_top": 0.0,
"modified": "2025-01-16 12:01:14.556660",
"modified_by": "admin@example.com",
"modified": "2025-01-21 10:42:52.756385",
"modified_by": "Administrator",
"module": "GST India",
"name": "e-Waybill Detailed",
"owner": "admin@example.com",
"owner": "Administrator",
"page_number": "Hide",
"print_format_builder": 0,
"print_format_builder_beta": 0,
Expand Down

0 comments on commit f8d4c06

Please sign in to comment.