public IwbPosWithCpvGrd(IWBPos iwbpos, decimal?iwbPosAdjustmentReason, string iwbPosAdjustmentReasonDesc) { IwbPosId = iwbpos.IWBPosID; IWBPosNum = iwbpos.IWBPosNumber; SKUName = iwbpos.VSkuName; IWBPosCount = iwbpos.IWBPosCount; IWBPosProductCount = iwbpos.IWBPosProductCount; IWBPosAdjustmentReason = iwbPosAdjustmentReason; MandantId = iwbpos.MandantID; IWBPosAdjustmentReasonDesc = iwbPosAdjustmentReasonDesc; }
private void TestWmsIWBPos2IWBPos(WmsIWBPos source = null, IWBPos target = null) { if (source == null && target == null) { return; } target.ID.ShouldBeEquivalentTo(source.IWBPosID); target.Line.ShouldBeEquivalentTo(source.IWBPosNumber); target.ArtName.ShouldBeEquivalentTo(source.SKU.Art.ArtName); target.ArtHostRef.ShouldBeEquivalentTo(source.SKU.Art.ArtHostRef); target.MeasureCode.ShouldBeEquivalentTo(source.SKU.Measure.MeasureCode); target.Count.ShouldBeEquivalentTo(source.IWBPosCount); target.Count2SKU.ShouldBeEquivalentTo(source.IWBPosCount2SKU); target.StatusCode.ShouldBeEquivalentTo(source.Status.StatusCode); target.Color.ShouldBeEquivalentTo(source.IWBPosColor); target.Tone.ShouldBeEquivalentTo(source.IWBPosTone); target.Size.ShouldBeEquivalentTo(source.IWBPosSize); target.Batch.ShouldBeEquivalentTo(source.IWBPosBatch); target.Lot.ShouldBeEquivalentTo(source.IWBPosLot); target.ExpiryDate.ShouldBeEquivalentTo(source.IWBPosExpiryDate); target.ProductDate.ShouldBeEquivalentTo(source.IWBPosProductDate); target.SerialNumber.ShouldBeEquivalentTo(source.IWBPosSerialNumber); target.FactoryHostRef.ShouldBeEquivalentTo(source.Factory?.FactoryHostRef); target.QLFCode.ShouldBeEquivalentTo(source.QLF?.QLFCode); // TODO нет аналога в WMS //target.QLFDetailCode.ShouldBeEquivalentTo(source.Detail); target.PriceValue.ShouldBeEquivalentTo(source.IWBPosPriceValue); target.IsManual.ShouldBeEquivalentTo(source.IWBPosManual); target.TECode.ShouldBeEquivalentTo(source.IWBPosTE); target.BatchCode.ShouldBeEquivalentTo(source.IWBBatchCode); target.BoxNumber.ShouldBeEquivalentTo(source.IWBPosBoxNumber); target.KitArtName.ShouldBeEquivalentTo(source.IWBPosKitArtName); target.Owner.ShouldBeEquivalentTo(source.IWBPosOwner.PartnerCode); target.InvoiceNumber.ShouldBeEquivalentTo(source.IWBPosInvoiceNumber); target.InvoiceDate.ShouldBeEquivalentTo(source.IWBPosInvoiceDate); target.ProductCount.ShouldBeEquivalentTo(source.IWBPosProductCount); target.Priority.ShouldBeEquivalentTo(source.IWBPosProductPriority); target.GTD.ShouldBeEquivalentTo(source.IWBPosGTD); target.HostRef.ShouldBeEquivalentTo(source.IWBPosHostRef); if (source.CPV_List == null) { target.CPVList.Should().NotBeNull(); } else { TestWmsCPVList2CPVList(source.CPV_List.Select(c => (WmsCustomParamValue)c).ToList(), target.CPVList); } }