/// <summary>Updates this delivery based on a webCRM delivery, excluding the delivery lines.</summary> protected void UpdateExcludingLines( DeliveryDto webcrmDelivery, long powerofficeCustomerCode) { CustomerCode = powerofficeCustomerCode; OrderDate = webcrmDelivery.DeliveryOrderDate; Status = OutgoingInvoiceStatus.Approved; }
private static DeliveryDtoDeliveryStatus ToWebcrmStatus(OutgoingInvoiceStatus powerofficeStatus) { switch (powerofficeStatus) { case OutgoingInvoiceStatus.Draft: return(DeliveryDtoDeliveryStatus.New); case OutgoingInvoiceStatus.Approved: return(DeliveryDtoDeliveryStatus.Planned); case OutgoingInvoiceStatus.Sent: return(DeliveryDtoDeliveryStatus.OnGoing); case OutgoingInvoiceStatus.Paid: return(DeliveryDtoDeliveryStatus.Completed); default: throw new ArgumentOutOfRangeException(nameof(powerofficeStatus), powerofficeStatus, null); } }