# Tekpal cXML

## Documentation

- AI promt create this file and this documentation
- tässä on tiedosto jonka perusteella tehdään import ja saman tiedoston perusteella tehdään export
- ei suoraan ERPiin koska jos vikaa, varaa numerosarjan
- tee mermaid kaavio

## Questions

- can orderType be anything else than ,OrderRequestHeader orderTy

## Manageri C900 EDI fields

### C9000_so_EDI Orders

so_kCustomer_Order_Number, "field_name": "Customer_Order_Number", company_reference_number
so_kOrder_Date, "field_name": "Order_Date", order_date
so_kNotes, "field_name": "Notes", note
so_kYour_Reference, "field_name": "Your_Reference", your_reference
so_kOur_Reference, "field_name": "Our_Reference", our_reference
so_kCurrency_id, "field_name": "Currency_id", currency_id
so_kWay_Of_Delivery, "field_name": "Way_Of_Delivery", way_of_delivery

### C9000_so_EDI Order_Rows

sor_kCustomer_Row_Number, "field_name": "Customer_Row_Number", json_data.customer_row_number
sor_kOrdered_Amount, "field_name": "Ordered_Amount", order_amount
sor_kDelivered_Date, "field_name": "Delivered_Date", delivery_date
sor_kPrice__unit, "field_name": "Price__unit", unit_price
sor_kVAT_Percentage, "field_name": "VAT_Percentage", vat_percent

### C9000_ordrsp_EDI Response

so_kSales_Order_ID, "field_name": "Sales_Order_ID, order_id
so_kConfirmation_Date, "field_name": "Confirmation_Date", confirmation_date
so_kOrder_Date, "field_name": "Order_Date", order_date
so_kCustomer_Order_Number, "field_name": "Customer_Order_Number", company_reference_number
so_kYour_Reference, "field_name": "Your_Reference", your_reference
so_kOur_Reference, "field_name": "Our_Reference", our_reference
so_kCurrency_id, "field_name": "Currency_id", currency_id
so_kTerms_Of_Payment_id, "field_name": "Terms_Of_Payment_id", terms_of_payment_id

co_kName, "field_name": "Name", name
co_kName_2, "field_name": "Name_2", name_2
co_kPost_Code, "field_name": "Post_Code", post_code
co_kPost_Office, "field_name": "Post_Office", post_office

top_kName, "field_name": "Name", name

### C9000_ordrsp_EDI Response_Rows

sor_kCustomer_Row_Number, "field_name": "Customer_Row_Number", json_data.customer_row_number
sor_kProduct_id, "field_name": "Product_id", product_id
sor_kOrdered_Amount, "field_name": "Ordered_Amount", order_amount
sor_kDelivered_Date, "field_name": "Delivered_Date", delivery_date
sor_kPrice__unit, "field_name": "Price__unit", unit_price

pr_kSupplier_Material_Code, "field_name": "Supplier_Material_Code", json_data.supplier_product_code
pr_kName, "field_name": "Name", name

### C9000_out_EDI Invoices

in_kInvoice_id, "field_name": "Invoice_id", order_id
in_kDate_, "field_name": "Date_", order_date
in_kReference_Number, "field_name": "Reference_Number", json_data.bank_reference_number
in_kYour_Reference, "field_name": "Your_Reference", your_reference
in_kCurrency_id, "field_name": "Currency_id", currency_id
in_kOur_Reference, "field_name": "Our_Reference", our_reference
in_kExchange_Rate, "field_name": "Exchange_Rate", exchange_rate
in_kDue_Date, "field_name": "Due_Date", due_date
in_kPenalty_Interest, "field_name": "Penalty_Interest", json_data.penalty_interest_percent
in_kCash_Discount_Due_Date, "field_name": "Cash_Discount_Due_Date", cash_discount_due_date
in_kWay_Of_Delivery, "field_name": "Way_Of_Delivery", way_of_delivery
in_kTotal_Amount, "field_name": "Total_Amount", price_with_vat
in_kVAT_Total, "field_name": "VAT_Total", vat_price
in_kPrice_Total, "field_name": "Price_Total", price_without_vat

inr_kVAT_Percentage, "field_name": "VAT_Percentage", vat_percent

co_kName, "field_name": "Name", name
co_kAddress, "field_name": "Address", address
co_kPost_Code, "field_name": "Post_Code", post_code
co_kPost_Office, "field_name": "Post_Office", post_office
co_kName_2, "field_name": "Name_2", name_2

top_kExport_Code, "field_name": "Export_Code", json_data.export_code
top_kName, "field_name": "Name", name
top_kDiscount_Days, "field_name": "Discount_Days", discount_days
top_kDiscount_Percentage, "field_name": "Discount_Percentage", discount_percent

### C9000_out_EDI Invoice_Rows

inr_kCustomer_Row_Number, "field_name": "Customer_Row_Number", json_data.customer_row_number
inr_kProduct_id, "field_name": "Product_id", product_id
inr_kOrder_Amount, "field_name": "Order_Amount", order_amount
inr_kDelivered_Quantity, "field_name": "Delivered_Quantity", delivery_amount
inr_kPrice_Total, "field_name": "Price_Total", price_without_vat
inr_kPrice__Unit, "field_name": "Price__Unit", unit_price
inr_kDelivery_Date, "field_name": "Delivery_Date", delivery_date
inr_kDispatch_Note, "field_name": "Dispatch_Note", dispatch_note_id
inr_kVAT_Percentage, "field_name": "VAT_Percentage", vat_percent
inr_kVAT_Price, "field_name": "VAT_Price", vat_price

in_kCurrency_id, "field_name": "Currency_id", currency_id

so_kCustomer_Order_Number, "field_name": "Customer_Order_Number", company_reference_number
