WebApi 1.06 - VatNumber null in api-backend/Order/Search and api-frontend/Order/Details/ methods

5 days ago
CustomerId = 1 have this VatNumber

Id           KeyGroup  Key                    Value                EntityId  StoreId          CreatedOrUpdatedDateUTC
49869  Customer  VatNumber  IT33344455567  1        0                     2021-11-22 17:27:59..

But in JSON returned by https://xxxxx/api-backend/Order/Search?createdFromUtc=2021-11-21T18%3A16%3A14.848Z  --> the vat_number is NULL:

"items": [
        {
            "order_guid": "6b7dcdd7-e0fa-403d-918a-bd50a80073fc",
            "store_id": 1,
            "customer_id": 1,
            "billing_address_id": 224,
            "shipping_address_id": 225,
            "pickup_address_id": null,
            "pickup_in_store": false,
            "order_status_id": 10,
            "shipping_status_id": 20,
            "payment_status_id": 10,
            "payment_method_system_name": "Payments.CheckMoneyOrder",
            "customer_currency_code": "EUR",
            "currency_rate": 1.0000,
            "customer_tax_display_type_id": 10,
            "vat_number": null,
            "order_subtotal_incl_tax": 4.2700,
            "order_subtotal_excl_tax": 3.5000,

Also the method
https://xxxxx/api-frontend/Order/Details/104
return  "vat_number": null

It's probably a bug ...  ! ? !
4 days ago
Did you check the VatNumber on the order orderGuid = '6b7dcdd7-e0fa-403d-918a-bd50a80073fc', is it set? The methods which you describe do not take into account a customer VatNumber, only VatNumber which saved on the order table
4 days ago
VatNumber in order is null.

It would seem that the VatNumber, although present in the customer id = 1 (genericAttribute), is NOT included in the order.

what can be the reason?

P.S. I also tried to place a new order, but the problem persists.
3 days ago
How did you try to place the order?
3 days ago
The order is placed by standard checkout of Nop 4.40.4

It is not inserted by API
3 days ago
Please check the TaxSettings.EuVatEnabled setting, it should be true for placing the Customer.VatNumber to the order
3 days ago
TaxSettings.EuVatEnabled --> It is already TRUE   --> But in order VatNumber is null

All config TaxSettings:

Name  Value
taxsettings.taxbasedon  DefaultAddress
taxsettings.taxbasedonpickuppointaddress  False
taxsettings.taxdisplaytype  ExcludingTax
taxsettings.activetaxprovidersystemname  Tax.FixedOrByCountryStateZip
taxsettings.defaulttaxaddressid  216
taxsettings.displaytaxsuffix  True
taxsettings.displaytaxrates  True
taxsettings.pricesincludetax  False
taxsettings.allowcustomerstoselecttaxdisplaytype  False
taxsettings.hidezerotax  False
taxsettings.hidetaxinordersummary  False
taxsettings.forcetaxexclusionfromordersubtotal  False
taxsettings.defaulttaxcategoryid  0
taxsettings.shippingistaxable  False
taxsettings.shippingpriceincludestax  False
taxsettings.shippingtaxclassid  0
taxsettings.paymentmethodadditionalfeeistaxable  False
taxsettings.paymentmethodadditionalfeeincludestax  False
taxsettings.paymentmethodadditionalfeetaxclassid  0
taxsettings.euvatenabled  True
taxsettings.euvatshopcountryid  111
taxsettings.euvatallowvatexemption  False
taxsettings.euvatusewebservice  False
taxsettings.euvatassumevalid  False
taxsettings.euvatemailadminwhennewvatsubmitted  True
taxsettings.logerrors  False

do you have any other suggestions?
3 days ago
In this case, please check the status of the customer VatNumber in the customer details page (admin area), it should be valid
3 days ago
Ok, setting it as valid, now it works and the VatNumber is also evaluated in the Json Order.

THANKS !