Skip to content

Commit

Permalink
Reduction in timeout, code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
maniamartial committed Apr 13, 2024
1 parent 27490ba commit 7a8e1f6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
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

0 comments on commit 7a8e1f6

Please sign in to comment.