private static DeliveryBlocksProperty getDelBlockProperty(string id, ZV04HNProperty zvh, CustomerDataProperty cd)
 {
     return(new DeliveryBlocksProperty(
                id: id,
                orderStatus: zvh.status,
                salesOrg: cd.salesOrg,
                country: cd.country,
                orderNumber: zvh.order,
                poNumber: zvh.pONumber,
                soldTo: zvh.soldto,
                soldToName: zvh.soldtoName,
                shipTo: zvh.shipto,
                shipToName: zvh.shiptoName,
                currentDeliveryBlock: zvh.delBlock,
                newDeliveryBlock: null,
                currentQty: zvh.confirmedQty,
                minQty: cd.minimumOrderCaseQuantity,
                currentVal: zvh.ordNetValue,
                minVal: cd.minimumOrderValue,
                reason: null,
                customerEmails: cd.belowMOQandMOVEmails,
                poDate: zvh.pODate,
                rdd: zvh.reqDelDate
                ));
 }
Example #2
0
 public CMROutputBean(ZV04HNProperty zv, string id)
 {
     soldTo     = zv.soldto;
     soldToName = zv.soldtoName;
     shipTo     = zv.shipto;
     shipToName = zv.shiptoName;
     this.id    = id;
 }
Example #3
0
        private int getLeadTime(string salesOrg, CustomerDataProperty cm, ZV04HNProperty zv)
        {
            switch (salesOrg)
            {
            //  case "RO01":
            case "ZA01":
            case "TR01":
            case "RU01":
            case "UA01":
            case "GR01":
            case "CZ01":
            case "PL01":
            case "IT01": {
                return(zv.route != ""  ? int.Parse(Strings.Right(zv.route, 2)) : 0);
            }

            case "ES01": {
                var switchExpr = zv.route;
                switch (switchExpr)
                {
                case "ES0011": {
                    return(1);
                }

                case "ES0000": {
                    return(2);
                }

                case "ES0002": {
                    return(3);
                }

                case "ES0003": {
                    return(4);
                }

                case "ESTN05": {
                    return(5);
                }

                case "ESGC05": {
                    return(5);
                }

                default: {
                    return(0);
                }
                }
            }

            default: {
                return(cm.leadTime);
            }
            }
        }
 public GBDeliveryBlocksProperty(ZV04HNProperty zv)
 {
     this.status       = zv.status;
     this.orderNumber  = zv.order;
     this.docType      = zv.docTyp;
     this.docDate      = zv.docDate;
     this.delBlock     = zv.delBlock;
     this.delBlockDesc = zv.delBlockDesc;
     this.rdd          = zv.reqDelDate;
     this.soldTo       = zv.soldto;
     this.soldToName   = zv.soldtoName;
 }
Example #5
0
 public RddOutputBean(ZV04HNProperty zv, CustomerDataProperty cm, string id)
 {
     soldTo                   = zv.soldto;
     soldToName               = zv.soldtoName;
     shipTo                   = zv.shipto;
     shipToName               = zv.shiptoName;
     oldRdd                   = zv.reqDelDate;
     orderNumber              = zv.order;
     docTyp                   = zv.docTyp;
     salesOrg                 = cm.salesOrg.ToUpper();
     country                  = cm.country.ToLower();
     isRddChangeAllowed       = cm.changeRDDActionAllowed;
     isRouteCodeChangeAllowed = cm.changeRouteCodeActionAllowed;
     deliveryDay              = cm.deliveryDay;
     loadingDate              = zv.loadingDate;
     route                   = zv.route;
     caseFillRate            = zv.FillRate;
     isOneDayLeadTimeAllowed = cm.oneDayLeadTimeAllowed;
     leadTime                = getLeadTime(salesOrg, cm, zv);
     region                  = cm.region;
     this.id                 = id;
 }
Example #6
0
 private GenericDistressProperty getDistressProperty(ZV04IProperty zvi, ZV04HNProperty zvh, ZV04PProperty zvp,
                                                     CustomerDataProperty cd, SwitchesProperty sd,
                                                     RejectionsProperty rd, MM03Property mm,
                                                     CriticalItemsDataProperty ci, SkuDataProperty sku)
 {
     return(new GenericDistressProperty(
                orderStatus: zvh.status,
                country: cd.country ?? "",
                plant: zvi.plant,
                material: zvi.material,
                order: zvi.order,
                item: zvi.item,
                materialDescription: zvi.materialDescription,
                soldTo: zvi.soldTo,
                soldToName: zvi.soldToName,
                shipTo: zvi.shipTo,
                shipToName: zvi.shipToName,
                rejReason: zvi.rejReason,
                afterReleaseRej: (zvi.rejReason != "" ? "" : rd.rejectionReasonCode) ?? "",
                possibleSwitch: sd.newSku,
                possibleSwitchDescription: sd.newSkuDescription,
                deliveryBlock: zvi.delBlock,
                atp: default,
Example #7
0
        private bool getZVCondition(ZV04HNProperty zv, string salesOrg)
        {
            bool flag = (zv.delBlock ?? "") != IDAConsts.DelBlocks.leadTimeBlock;

            switch (salesOrg)
            {
            case "ZA01":
            case "NG01":
            case "KE02": {
                flag = flag && (zv.delBlock ?? "") != "Z4" && (zv.delBlock ?? "") != "04";
                break;
            }

            case "ES01":
            case "PT01": {
                flag = flag && (zv.delBlock ?? "") != "ZG";
                break;
            }

            case "PL01":
            case "CZ01": {
                flag = flag && (zv.delBlock ?? "") != "Z8" && (zv.delBlock ?? "") != "ZV" && (zv.delBlock ?? "") != "ZW";
                break;
            }

            case "RO01": {
                flag = flag && zv.route != "ROEMGY";
                break;
            }

            default: {
                break;
            }
            }

            return(flag);
        }
 private static DeliveryBlocksProperty getDelBlockProperty(string salesOrg, string id, ZV04HNProperty zv, CustomerDataProperty cd)
 {
     return(new DeliveryBlocksProperty(
                id: id,
                orderStatus: zv.status,
                salesOrg: salesOrg,
                country: cd.country,
                orderNumber: zv.order,
                poNumber: zv.pONumber,
                soldTo: zv.soldto,
                soldToName: zv.soldtoName,
                shipTo: zv.shipto,
                shipToName: zv.shiptoName,
                currentDeliveryBlock: zv.delBlock,
                newDeliveryBlock: IDAConsts.DelBlocks.noBlock,
                currentQty: default,
 private static DeliveryBlocksProperty getDelBlockProperty(string salesOrg, string id, bool isForBlock, ZV04HNProperty zv, AppointmentTimesSoldTo appTimesSoldTo)
 {
     return(new DeliveryBlocksProperty(id: id,
                                       orderStatus: zv.status,
                                       salesOrg: salesOrg,
                                       country: "United Kingdom",
                                       orderNumber: zv.order,
                                       poNumber: null,
                                       soldTo: zv.soldto,
                                       soldToName: zv.soldtoName,
                                       shipTo: zv.shipto,
                                       shipToName: zv.shiptoName,
                                       currentDeliveryBlock: zv.delBlock,
                                       newDeliveryBlock: $"{(isForBlock ? appTimesSoldTo.delBlock : IDAConsts.DelBlocks.noBlock)}",
                                       currentQty: default,