Skip to content

Commit

Permalink
Merge pull request #2473 from resilient-tech/version-14-hotfix
Browse files Browse the repository at this point in the history
chore: release v14
  • Loading branch information
vorasmit authored Jul 25, 2024
2 parents b6529db + fb68175 commit 695e1bd
Show file tree
Hide file tree
Showing 25 changed files with 439 additions and 239 deletions.
7 changes: 5 additions & 2 deletions india_compliance/gst_india/api_classes/taxpayer_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ def request_otp(self):
if response.status_cd != 1:
return

return response.update({"error_type": "otp_requested"})
return response.update(
{"error_type": "otp_requested", "gstin": self.company_gstin}
)

def autheticate_with_otp(self, otp=None):
if not otp:
Expand Down Expand Up @@ -263,7 +265,7 @@ def _request(
):
auth_token = self.get_auth_token()

if not auth_token:
if not auth_token or otp:
response = self.autheticate_with_otp(otp=otp)
if response.error_type in ["otp_requested", "invalid_otp"]:
return response
Expand Down Expand Up @@ -344,6 +346,7 @@ def is_ignored_error(self, response):

if error_code in self.IGNORED_ERROR_CODES:
response.error_type = self.IGNORED_ERROR_CODES[error_code]
response.gstin = self.company_gstin
return True

def generate_app_key(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function get_generate_e_waybill_dialog(opts, frm) {
fieldname: "gst_transporter_id",
fieldtype: "Data",
default:
frm.doc.gst_transporter_id?.length == 15
frm.doc.gst_transporter_id?.length === 15
? frm.doc.gst_transporter_id
: "",
onchange: () => validate_gst_transporter_id(d),
Expand Down Expand Up @@ -432,7 +432,7 @@ function get_generate_e_waybill_dialog(opts, frm) {
];

if (frm.doctype === "Delivery Note") {
const same_gstin = frm.doc.billing_address_gstin == frm.doc.company_gstin;
const same_gstin = frm.doc.billing_address_gstin === frm.doc.company_gstin;
let options;

if (frm.doc.is_return) {
Expand Down Expand Up @@ -461,6 +461,7 @@ function get_generate_e_waybill_dialog(opts, frm) {
fieldtype: "Select",
options: options.join("\n"),
default: options[0],
read_only: options.length === 1,
reqd: 1,
});
}
Expand Down Expand Up @@ -811,7 +812,7 @@ function show_update_transporter_dialog(frm) {
reqd: 1,
default:
frm.doc.gst_transporter_id &&
frm.doc.gst_transporter_id.length == 15
frm.doc.gst_transporter_id.length === 15
? frm.doc.gst_transporter_id
: "",
onchange: () => validate_gst_transporter_id(d),
Expand Down Expand Up @@ -1022,7 +1023,7 @@ async function show_extend_validity_dialog(frm) {
},
callback: () => frm.refresh(),
});
d.hide();
if (can_extend_now) d.hide();
},
});
if (!can_extend_now) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@
"default": "0",
"fieldname": "is_generated_in_sandbox_mode",
"fieldtype": "Check",
"label": "Is Generated in Sandbox Mode"
"label": "Is Generated in Sandbox Mode",
"read_only": 1
},
{
"depends_on": "eval: doc.extension_scheduled == 1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@
<div class="download_data">
<table class="table table-bordered table-hover">
<thead>
<tr>
{% for(let i=0; i<columns.length; i++) { %} <th class="text-left">{{ columns[i] }}
</th>
{% if typeof(data) == "string" %}
<div class="text-center no-preview-available mb-5">{{ data }}</div>
{% else %}
<table class="table table-bordered table-hover">
<thead>
<tr>
{% for(let i=0; i<columns.length; i++) { %}
<th class="text-left">{{ columns[i] }}</th>
{% } %}
</tr>
</thead>
<tbody>
{% for(let period in data) { %}
<tr>
<td rowspan="{{ data[period].length }}" style="width:50%">{{period}}</td>
<td>{{ data[period][0] }}</td>
</tr>

{% for(let i=1;i < data[period].length;i++){ %}
<tr>
<td>{{ data[period][i] }}</td>
</tr>
{% } %}
</tr>
</thead>
<tbody>
{% let previous_period = ''; %}
{% for(let period in data) { %}
<!-- for first class -->
<tr>
{% if(period != previous_period) { %}
<td rowspan="{{data[period].length}}">{{period}}</td>
{% previous_period = period; %}
{% } %}
{% for(let value of Object.values(data[period].shift())) { %}
<td>{{ value }}</td>
{% } %}
</tr>

<!-- for more than one class -->
{% if(data[period].length > 0) { %}
{% for(let category of data[period]) { %}
<tr>
{% for(let value of Object.values(category)) { %}
<td>{{ value }}</td>
{% } %}
</tr>
{% } %}
{% } %}
{% } %}
</tbody>
</table>

</tbody>
</table>
{% endif %}
</div>
Loading

0 comments on commit 695e1bd

Please sign in to comment.