hougaard / BCCL_support

BCCL Support Repository
3 stars 0 forks source link

Missing support for closing dates #23

Open curateideas opened 1 year ago

curateideas commented 1 year ago

Describe the bug We exported data with closing date information from SQL to a CSV-file (NAV 2018 G/L Entry Table as source). On importing these dates the closing date information is not transferred to the target date fields (with parameter ClosingDate = Yes).

To Reproduce Steps to reproduce the behavior:

  1. Command Line

.\BCCL -t putdata -s table=$tableID -i $importfile.FullName -f csv -m $mappingfilename -l ";" -d true

  1. Mapping File

    { "FieldNo": 4, "FieldName": "Posting Date", "MappedName": "Posting Date", "Format": "dd.MM.yyyy HH:mm:ss.fff", "Validate": false },

  2. Data example

"Entry No_";"GL Account No";"Posting Date";"Document Type";"Document No";"Description";"Bal Account No";"Amount";"Global Dimension 1 Code";"Global Dimension 2 Code";"Quantity";"VAT Amount";"Gen Posting Type";"Gen Bus Posting Group";"Gen Prod Posting Group";"Bal Account Type";"Debitor Amount";"Credit Amount";"Document Date";"External Document No";"Source Type";"Source No";"VAT Bus Posting Group";"VAT Prod_ Posting Group";"Reversed" "1";"0090";"31.12.2018 23:59:59.999";"0";"START";"Eröffnungsposten";"";"2052148.41000000000000000000";"";"";"0.00000000000000000000";"0.00000000000000000000";"0";"";"";"0";"2052148.41000000000000000000";"0.00000000000000000000";"31.12.2018";"";"0";"";"";"";"0"

  1. See error

No error message during import but missing "C" for closing date information in the imported record:

image

Expected behavior Date values should be presented as closing dates. Desktop (please complete the following information):

hougaard commented 1 year ago

I'm out today, I'll check tomorrow....

hougaard commented 1 year ago

Yeah, that seems to be stripped in the date conversion toolchain.

I have made a fix, and it will trickle to appsource "soon".

curateideas commented 1 year ago

Did the link to the download section change?

When I enter https://www.hougaard.com/download/

I get this site:

image

curateideas commented 1 year ago

Can you give me a hint for formatting date values when I directly import from SQL? If I omit the "Format" in the mapping, I get error: An error has occurred: Unable to convert from Microsoft.Dynamics.Nav.Runtime.NavJsonValue to Microsoft.Dynamics.Nav.Runtime.NavDate.

hougaard commented 1 year ago

What field types are you trying to connect? (On both sides)?

curateideas commented 1 year ago

SQL: Date (Standard field "Posting Date" in Table 17) or is it DateTime since the SQL field type determines the format?

Target BC: Date ("Posting Date" in a new Table)