public static string CreateInvoice(bool isWarranty, Order orderInfo, string lotNumber = "", bool onlyPlay = false) { order = orderInfo; int brokerType; if (orderInfo.Auction.SupplierOrders[0].BrokerName.ToUpper().Contains("АЛЬТА")) { brokerType = 1; } else if (orderInfo.Auction.SupplierOrders[0].BrokerName.ToUpper().Contains("КОРУНД")) { brokerType = 2; } else { brokerType = 3; } var requestMsg = _1CTransport.CreateInvoice(brokerType, isWarranty, order, onlyPlay); if (!requestMsg.Contains("Err")) { fileName = ArchiveTransport.PutUTBBill(brokerType, orderInfo, isWarranty, lotNumber); FillInvoice(isWarranty, _1CTransport.SearchInvoice(brokerType, requestMsg, isWarranty), requestMsg, order.Auction.SiteId != 4 ? null : _1CTransport.ReadInvoice(brokerType, requestMsg, isWarranty)); return(null); } else { return(requestMsg); } }
public static void CreateProtocols(Order orderInfo) { order = orderInfo; protocolsFileName = ArchiveTransport.PutUTBProtocol(order); FillTemplate(); }
public static void CreateRecordInJournal(FormC01 formc01Item) { formc01 = formc01Item; fileName = ArchiveTransport.PutETSJournalC01(formc01Item.bin, formc01Item.code); FillDocument(); }
public static void CreateOrder(Order order, int auctionId, int traderId) { orderInfo = order; orderFileName = ArchiveTransport.PutUTBOrder(order); lotInfo = DataBaseClient.UpdateUTBNewOrder(order, auctionId, traderId); FillTemplateFile(); Process.Start("explorer", @"\\192.168.11.5\Archive\Auctions\UTB\" + order.Auction.Date.ToShortDateString() + "\\" + order.Title.Replace("/", "_")); }
public static void CreateReports(Order orderInfo) { order = orderInfo; reportFileNames = ArchiveTransport.PutUTBReports(orderInfo); FillTemplate(); // Put file to base var fileListId = DataBaseClient.ReadAuction(order.Auction.Id); if (fileListId != null) { DocumentRequisite docReq = new DocumentRequisite() { date = order.Auction.Date, fileName = reportFileNames[0].Substring(reportFileNames[0].LastIndexOf("\\")), market = AltaBO.specifics.MarketPlaceEnum.UTB, number = order.Auction.Number, section = AltaBO.specifics.DocumentSectionEnum.Auction, type = AltaBO.specifics.DocumentTypeEnum.CustomerReport }; // Customer file // Check for exist if (DataBaseClient.ReadDocument((int)fileListId.fileslistid, (int)AltaBO.specifics.DocumentTypeEnum.CustomerReport) == null) { archiveManager.SaveFile(docReq, (int)fileListId.fileslistid); docReq.fileName = reportFileNames[1].Substring(reportFileNames[1].LastIndexOf("\\")); } // Supplier file // Check for exist if (DataBaseClient.ReadDocument((int)fileListId.fileslistid, (int)AltaBO.specifics.DocumentTypeEnum.SupplierReport) == null) { docReq.type = AltaBO.specifics.DocumentTypeEnum.SupplierReport; archiveManager.SaveFile(docReq, (int)fileListId.fileslistid); } } // }