|
Tried it. No change. Ug!!
All "support" is in India and only during the day there. All responses I get from them are around 3am here.
Request
{
"from_country": "US",
"from_zip": "54603",
"from_state": "WI",
"from_city": "La Crosse",
"from_street": "2600 Hemstock St",
"to_country": "US",
"to_zip": "53532-9139",
"to_state": "WI",
"to_city": "DEFOREST",
"to_street": "6669 CHURCH HILL CT",
"amount": 1000.00,
"shipping": 0,
"line_items": [
{
"id": "1",
"quantity": 1,
"unit_price": 1000.00,
"discount": 0
}
]
}
Response
{"tax":{"amount_to_collect":55.0,"breakdown":{"city_tax_collectable":0
.0,"city_tax_rate":0.0,"city_taxable_amount":0.0,"combined_tax_rate":0
.055,"county_tax_collectable":5.0,"county_tax_rate":0.005,"county_taxa
ble_amount":1.0e3,"line_items":[{"city_amount":0.0,"city_tax_rate":0.0
,"city_taxable_amount":0.0,"combined_tax_rate":0.055,"county_amount":5
.0,"county_tax_rate":0.005,"county_taxable_amount":1.0e3,"id":"1","spe
cial_district_amount":0.0,"special_district_taxable_amount":0.0,"speci
al_tax_rate":0.0,"state_amount":50.0,"state_sales_tax_rate":0.05,"stat
e_taxable_amount":1.0e3,"tax_collectable":55.0,"taxable_amount":1.0e3}
],"shipping":{"city_amount":0.0,"city_tax_rate":0.0,"city_taxable_amou
nt":0.0,"combined_tax_rate":0.055,"county_amount":0.0,"county_tax_rate
":0.005,"county_taxable_amount":0.0,"special_district_amount":0.0,"spe
cial_tax_rate":0.0,"special_taxable_amount":0.0,"state_amount":0.0,"st
ate_sales_tax_rate":0.05,"state_taxable_amount":0.0,"tax_collectable":
0.0,"taxable_amount":0.0},"special_district_tax_collectable":0.0,"spec
ial_district_taxable_amount":0.0,"special_tax_rate":0.0,"state_tax_col
lectable":50.0,"state_tax_rate":0.05,"state_taxable_amount":1.0e3,"tax
_collectable":55.0,"taxable_amount":1.0e3},"freight_taxable":true,"has
_nexus":true,"jurisdictions":{"city":"DE
FOREST","country":"US","county":"DANE
COUNTY","state":"WI"},"order_total_amount":1.0e3,"rate":0.055,"shippin
g":0.0,"tax_source":"destination","taxable_amount":1.0e3}}
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jon
Paris
Sent: Monday, September 18, 2023 9:13 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: External DATA-INTO not matching variable
Why on earth would they convert it to an exponent form? Makes no sense.
If you included a decimal e.g. 1000.00 would they still do that?
Jon P
On Sep 18, 2023, at 9:53 AM, (WalzCraft) Jerry Forss <JForss@xxxxxxxxxxxxx> wrote:
Fortunately, the element in question is a repeat of what I am sending them. Rather inconsequential.
So I just changed it to send 1001 instead of 1000.
This is using the TaxJar web service so I can verify our taxes on an order.
All I am interested in is the Tax Rates that are returned for the ship to address.
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jon
Paris
Sent: Monday, September 18, 2023 8:44 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: External DATA-INTO not matching variable
Data-Into uses %Dec rules to convert the character string to numeric. Those rules state:
If the parameter is a character expression • See Rules for converting
character values to numeric values using built-in functions for the rules for character expressions for %DEC.
• Floating point data, for example '1.2E6', is not allowed.
• If invalid numeric data is found, an exception occurs with status code 105.
In other words the exact symptoms you are experiencing.
The only simple thing I can think of - assuming the folks who send you the JSON won't change it - is to change any fields that may exhibit this issue to character and then manually convert them using $Dec or whatever. That would allow you to use Monitor blocks to trap conversion errors and process them appropriately.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.