Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduction in timeout, code cleaning #52

Merged
merged 1 commit into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def _update_integration_request(self, response, stock_movement_data, doc, status
doc.error = ""
doc.save()
except Exception as e:
frappe.publish_realtime("msgprint", f"Problem while saving Integration Request: {str(e)}", user=frappe.session.user)
frappe.log_error(f"Error saving Integration Request: {str(e)}")
else:
self.create_integration_request(stock_movement_data, str(response),'Null',doc, status=status)
Expand All @@ -53,7 +52,6 @@ def post_stock_movement(self, stock_movement_data, doc):
response_data = response.json()
if response_data.get("success")==False:
try:
frappe.publish_realtime("msgprint", f"Failed Check on:<div style='color:red'> {str(response_data)}</div>", user=frappe.session.user)
self._update_integration_request(response_data, stock_movement_data,doc, status="Failed")
except Exception as e:
frappe.log_error(f"Error while creating Integration Request: {str(e)}")
Expand Down
2 changes: 1 addition & 1 deletion burundi_compliance/burundi_compliance/api_classes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def authenticate(self, max_retries=1):
try:
return self.authenticate_with_retry()
except AuthenticationError as auth_error:
time.sleep(10)
time.sleep(5)

def authenticate_with_retry(self):
auth_details = self.get_auth_details()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ <h4> Le client</h4>
<th>Nature de l’article ou service</th>
<th>QUANTITE</th>
<th>PU</th>
<th>PVHTVA</th>
<th>PVHTVA(BIF)</th>
</tr>
</thead>
<tbody>
Expand All @@ -228,17 +228,17 @@ <h4> Le client</h4>
<!-- Additional Rows for PVT HTVA, TVA, and Total TVAC -->
<tr>
<td colspan="3" class="text-right"> TOTAL HTVA:</td>
<td>Fr. <b>{{ '{:,.0f}'.format(doc.base_total | round) }}</b></td>
<td> <b>{{ '{:,.0f}'.format(doc.base_total | round) }}</b></td>
</tr>
{% if doc.exempt_from_sales_tax == 0 %}
<tr>
<td colspan="3" class="text-right">TVA:</td>
<td>Fr. <strong>{{ '{:,.0f}'.format(doc.base_total_taxes_and_charges | round) }}</strong></td>
<td> <strong>{{ '{:,.0f}'.format(doc.base_total_taxes_and_charges | round) }}</strong></td>
</tr>
{% endif %}
<tr>
<td colspan="3" class="text-right"><strong>Total TVAC:</strong></td>
<td>Fr. <strong>{{ '{:,.0f}'.format(doc.base_grand_total | round) }}</strong></td>
<td> <strong>{{ '{:,.0f}'.format(doc.base_grand_total | round) }}</strong></td>
</tr>

</tbody>
Expand Down
Loading