Exemplo n.º 1
0
        public string Add_SU()
        {
            _e3035 = Eancom.NAD.E3035_SU;
            _e3164 = _orderInformations.GetSupplierCity();
            _e3251 = _orderInformations.GetSupplierPostCode();
            _e3207 = _orderInformations.GetSupplierCountry();

            ////c082 = new C082(_orderInformations.GetSupplierGLN(), Eancom.NAD.C082.E3055_9);
            //c082.E3039 = _orderInformations.GetSupplierGLN();

            c082.E3039   = String.Empty; // Discac want the manufacturer Id (IDM 1201) instead of _fileEDI.ManufacturerGLN() pos44 first line 100.
            c082.E3055   = Eancom.NAD.C082.E3055_9;
            c080.E3036_1 = _orderInformations.GetSupplierName1();
            c080.E3036_2 = _orderInformations.GetSupplierName2();
            c059.E3042   = _orderInformations.GetSupplierAddress();

            if (!_fileEDI.HasManufacturerGLNCode(c082.E3039))
            {
                c082.E3039 = _fileEDI.ManufacturerID();
                c082.E3055 = Eancom.NAD.C082.E3055_91;
            }

            OrderWrite.segmentNumberBetweenUNHandUNT += 1;
            return(StructureEDI.NAD + Separator.DataGroup + this.E3035 + Separator.DataGroup + c082.Add() + c080.Add() + c059.Add() +
                   this.E3164 + Separator.DataGroup + Separator.DataGroup + this.E3251 + Separator.DataGroup + this.E3207 + Separator.EndLine);
        }
Exemplo n.º 2
0
        public string Add()
        {
            s002.E0004 = _orderInformations.GetRetailerName1();  //GetSupplierName
            s003.E0010 = _fileEDI.ManufacturerGLN();

            if (!_fileEDI.HasManufacturerGLNCode(s003.E0010))
            {
                s003.E0010 = _fileEDI.ManufacturerID();
            }

            DateTime dateTime = DateTime.Now;

            s004.E0017 = dateTime.ToString(OrderConstants.FormatDate_2yMd);
            s004.E0019 = dateTime.ToString(OrderConstants.FormatTime_Hm);

            Order.orderFile = _orderInformations.GetReferenceNumberEDIFile(_fileEDI);
            _e0020          = Order.orderFile + Separator.DataGroup + Separator.DataGroup;
            _e0026          = _orderInformations.GetNameAndVersionSoftware() + Separator.DataGroup + Separator.DataGroup + Separator.DataGroup;

            string EDIversion = OrderTransmission.VersionEancomOrder; // _fileEDI.Order_();

            if (String.IsNullOrEmpty(EDIversion))
            {
                EDIversion = _fileEDI.Orders();
            }
            _e0032 = EDIversion + Separator.DataGroup;
            _e0035 = "1";

            return(StructureEDI.UNB + Separator.DataGroup + s001.Add() + s002.Add() + s003.Add() + s004.Add() +
                   this.E0020 + this.E0026 + this.E0032 + this.E0035 + Separator.EndLine);
        }