You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm interested in extending erpnext-shipping to include EasyPost.com.
How to best handle currency?
Should we change the hardcoded value "EUR" by creating a peferred_currency setting in
ERPNext-shipping settings or is there a more elegant solution using the company default currency?
If the currency is dependant on the service provider's output, perhaps we should have a 'currency' field in each shipper's docType?
EDIT-1
I tried editing the following files, changing "EUR" to "USD" but shipping rates are still displayed in Euros:
erpnext_shipping/erpnext_shipping/public/dist/js/shipping.bundle.QIZQZYU7.js.map
erpnext_shipping/erpnext_shipping/public/dist/js/shipping.bundle.QIZQZYU7.js.
erpnext_shipping/erpnext_shipping/public/js/shipment_service_selector.html
EDIT-2
There must have been some sort of caching going on. After enabling (was disabled) SendCloud, USD now shows in "Fetch Shipping Rates".
I'm still interested in best practice to make this more dynamic. Perhaps creating an erpnext-shippping settings doctype with preferred currency and perhaps metric vs SAE will be helpful.
Shouldn't currency be dynamically displayed based on user or global settings?
frappe@f15:~/frappe-bench/apps/erpnext_shipping$ grep -rl "currency" ./ ./.github/workflows/linters.yml ./.eslintrc ./erpnext_shipping/public/js/shipment_service_selector.html ./erpnext_shipping/public/dist/js/shipping.bundle.QIZQZYU7.js.map ./erpnext_shipping/public/dist/js/shipping.bundle.QIZQZYU7.js frappe@f15:~/frappe-bench/apps/erpnext_shipping$ less erpnext_shipping/public/js/shipment_service_selector.html frappe@f15:~/frappe-bench/apps/erpnext_shipping$ less erpnext_shipping/public/js/shipment_service_selector.html | grep "currency" <td class="service-info" style="width:20%;">{{ format_currency(data.preferred_services[i].total_price, "EUR", 2) }}</td> <td class="service-info" style="width:20%;">{{ format_currency(data.other_services[i].total_price, "EUR", 2) }}</td>
The text was updated successfully, but these errors were encountered: