private void btnSave_Click(object sender, EventArgs e) { BLL.ReceiveDoc recDoc = new ReceiveDoc(); recDoc.LoadByReceiptID(ReceiptID); if (PONumber.StartsWith("S2S-")) { if (SetFinalCost()) { recDoc.ConfirmGRVPrinted(CurrentContext.UserId); BLL.Receipt receiptStatus = new BLL.Receipt(); receiptStatus.LoadByPrimaryKey(ReceiptID); receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.GRV_PRINTED, null, this.GetFormIdentifier(), CurrentContext.UserId, "Store To Store Confirmed"); } } else { recDoc.ConfirmPrice(CurrentContext.UserId); BLL.Receipt receiptStatus = new BLL.Receipt(); receiptStatus.LoadByPrimaryKey(ReceiptID); receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.PRICE_CONFIRMED, null, this.GetFormIdentifier(), CurrentContext.UserId, "Price Confirmed"); } this.LogActivity("Confirm-Price", ReceiptID); XtraMessageBox.Show("Received Cost and Margin Set successfully!", "Success", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information); PutAwayListsLoad(null, null); }
private void btnSave_Click(object sender, EventArgs e) { GRV.SaveInsurance(); GRV.SaveCostCoefficientAndTotalValue(CurrentContext.UserId); //ToDo: Remove this When it is safe and Ready for deployement. GRV.RecordAverageCostAndSellingPrice(CurrentContext.UserId); print(); BLL.ReceiveDoc recDoc = new ReceiveDoc(); recDoc.LoadByReceiptID(ReceiptID); BLL.Receipt receiptStatus = new BLL.Receipt(); if (!BLL.Settings.UseReceiveCostConfirmation && PONumber.StartsWith("S2S-")) { if (SetFinalCost()) { recDoc.ConfirmGRVPrinted(CurrentContext.UserId); receiptStatus.LoadByPrimaryKey(ReceiptID); receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.GRV_PRINTED, null, this.GetFormIdentifier(), CurrentContext.UserId, "StoreToStore Confirmed"); } } else if (BLL.Settings.UseReceiveCostConfirmation) { recDoc.SetPrice(CurrentContext.UserId); receiptStatus.LoadByPrimaryKey(ReceiptID); receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.PRICE_CALCULATED, null, this.GetFormIdentifier(), CurrentContext.UserId, "Price Set"); } else { recDoc.ConfirmPrice(CurrentContext.UserId); receiptStatus.LoadByPrimaryKey(ReceiptID); receiptStatus.ChangeStatus(ReceiptConfirmationStatus.Constants.PRICE_CONFIRMED, null, this.GetFormIdentifier(), CurrentContext.UserId, "Price Set"); } XtraMessageBox.Show("Received Cost and Margin Set successfully!", "Success", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information); PutAwayListsLoad(null, null); this.LogActivity("Print-Cost-Analysis", ReceiptID); }