Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions openTRANS/ORDER/Order.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial class Order
public string xsiSchemaLocation = "http://www.opentrans.org/XMLSchema/2.1%20opentrans_2_1.xsd";

[XmlAttribute("version")]
public string Version = "2.1";
public string Version => "2.1";

[XmlAttribute("type")]
public string Type = OrderType.Standard;
Expand All @@ -27,10 +27,7 @@ public partial class Order
[XmlElement("ORDER_SUMMARY")]
public OrderSummary OrderSummary
{
get
{
return new OrderSummary(this);
}
get => new OrderSummary(this);
set { /* required for xml serialization */ }
}
}
Expand Down
6 changes: 3 additions & 3 deletions openTRANS/ORDER/OrderHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ public partial class OrderHeader
[XmlElement("CONTROL_INFO")]
public ControlInfo ControlInfo = new ControlInfo();

[XmlElement("ORDER_INFO")]
public OrderInfo OrderInfo = new OrderInfo();

[XmlElement("SOURCING_INFO")]
public SourcingInfo SourcingInfo = new SourcingInfo();

[XmlElement("ORDER_INFO")]
public OrderInfo OrderInfo = new OrderInfo();
}
}
36 changes: 30 additions & 6 deletions openTRANS/ORDER/OrderInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,48 @@ public partial class OrderInfo
[XmlElement("DELIVERY_DATE")]
public DeliveryDate DeliveryDate = new DeliveryDate();

[XmlElement("LANGUAGE")]
public Language Language { get; set; }

[XmlElement("MIME_ROOT")]
public string MimeRoot { get; set; }

[XmlArray("PARTIES")]
[XmlArrayItem("PARTY")]
public List<Party> Parties = new List<Party>();

[XmlElement("ORDER_PARTIES_REFERENCE")]
public OrderPartiesReference OrderPartiesReference = new OrderPartiesReference();

[XmlElement("CUSTOMER_ORDER_REFERENCE")]
public CustomerOrderReference CustomerOrderReference = new CustomerOrderReference();

//will be serialized as array without a "remarks" parent
[XmlElement("REMARKS")]
public List<TypedItem> Remarks = new List<TypedItem>();
[XmlElement("ORDER_PARTIES_REFERENCE")]
public OrderPartiesReference OrderPartiesReference = new OrderPartiesReference();

[XmlElement("DOCEXCHANGE_PARTIES_REFERENCE")]
public DocExchangePartiesReference DocExchangePartiesReference { get; set; }

[XmlElement("CURRENCY", Namespace = Namespace.bmecat)]
public string Currency;

[XmlElement("PAYMENT")]
public Payment Payment { get; set; }

[XmlElement("TERMS_AND_CONDITIONS")]
public string TermsAndConditions { get; set; }

[XmlElement("PARTIAL_SHIPMENT_ALLOWED")]
public bool? PartialShipmentAllowed;

[XmlElement("TRANSPORT")]
public Transport Transport { get; set; }

[XmlElement("INTERNATIONAL_RESTRICTIONS")]
public TypedItem InternationalRestrictions { get; set; }

[XmlElement("MIME_INFO")]
public MimeInfo MimeInfo { get; set; }

//will be serialized as array without a "remarks" parent
[XmlElement("REMARKS")]
public List<TypedItem> Remarks = new List<TypedItem>();
}
}
44 changes: 37 additions & 7 deletions openTRANS/ORDER/OrderItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ public partial class OrderItem
[XmlArrayItem("FEATURE")]
public List<Feature> ProductFeatures = new List<Feature>();

[XmlElement("PRODUCT_COMPONENTS")]
public ProductComponents ProductComponents { get; set; }

[XmlElement("QUANTITY")]
public decimal Quantity;

[XmlElement("ORDER_UNIT", Namespace = Common.Namespace.bmecat)]
[XmlElement("ORDER_UNIT", Namespace = Namespace.bmecat)]
public string OrderUnit;

[XmlElement("PRODUCT_PRICE_FIX")]
Expand All @@ -28,18 +31,45 @@ public partial class OrderItem
[XmlElement("PRICE_LINE_AMOUNT")]
public decimal PriceLineAmount
{
get
{
return Quantity * ProductPriceFix.PriceAmount;
}
get => Quantity * ProductPriceFix.PriceAmount;
set { /* required for xml serialization */ }
}

[XmlElement("REMARKS")]
public List<TypedItem> Remarks = new List<TypedItem>();
[XmlElement("PARTIAL_SHIPMENT_ALLOWED")]
public bool PartialShipmentAllowed { get; set; }

[XmlElement("DELIVERY_DATE")]
public DeliveryDate DeliveryDate = new DeliveryDate();

[XmlArray("PARTIAL_DELIVERY_LIST")]
[XmlArrayItem("PARTIAL_DELIVERY")]
public List<PartialDelivery> PartialDeliveryList { get; set; }

[XmlElement("SOURCING_INFO")]
public SourcingInfo SourcingInfo { get; set; }

[XmlElement("CUSTOM_ORDER_REFERENCE")]
public CustomerOrderReference CustomerOrderReference { get; set; }

[XmlElement("ACCOUNTING_INFO", Namespace = Namespace.bmecat)]
public AccountingInfo AccountingInfo { get; set; }

[XmlElement("SHIPMENT_PARTIES_REFERENCE")]
public ShipmentPartiesReference ShipmentPartiesReference { get; set; }

[XmlElement("TRANSPORT", Namespace = Namespace.bmecat)]
public Transport Transport { get; set; }

[XmlElement("INTERNATIONAL_RESTRICTIONS", Namespace = Namespace.bmecat)]
public TypedItem InternationalRestriction { get; set; }

[XmlElement("SPECIAL_TREATMENT_CLASS", Namespace = Namespace.bmecat)]
public TypedItem SpecialTreatmentClass { get; set; }

[XmlElement("MIME_INFO")]
public MimeInfo MimeInfo { get; set; }

[XmlElement("REMARKS")]
public List<TypedItem> Remarks = new List<TypedItem>();
}
}
6 changes: 0 additions & 6 deletions openTRANS/SHARED/Components.cs

This file was deleted.

37 changes: 37 additions & 0 deletions openTRANS/SHARED/__delete_after_pull_request_7.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using System;

/// <summary>
/// Delete this file completly, if open Pulls are merged
/// </summary>

namespace openTRANS {

[Obsolete("This class is implemented in one of the open Pull-Requests", true)]
public class Card {
}

[Obsolete("This class is implemented in one of the open Pull-Requests", true)]
public class Payment {

}

[Obsolete("This class is implemented in one of the open Pull-Requests", true)]
public class PaymentTerms {
}

[Obsolete("This class is implemented in one of the open Pull-Requests", true)]
public class TimeForPayment {
}

[Obsolete("This class is implemented in one of the open Pull-Requests", true)]
public class AccountingInfo {
}

[Obsolete("This class is implemented in one of the open Pull-Requests", true)]
public class Transport {
}

[Obsolete("This class is implemented in one of the open Pull-Requests", true)]
public class PartialDelivery {
}
}