예제 #1
0
        protected virtual void PrintInvoicesFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            PrintInvoicesFilter filter = (PrintInvoicesFilter)e.Row;

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                ARDocumentList.SetProcessTarget(null, null, null, filter.Action, parameters);
                bool showPrintSettings = IsPrintingAllowed(filter);

                PXUIFieldAttribute.SetVisible <PrintInvoicesFilter.printWithDeviceHub>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <PrintInvoicesFilter.definePrinterManually>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <PrintInvoicesFilter.printerID>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <PrintInvoicesFilter.numberOfCopies>(sender, filter, showPrintSettings);

                PXUIFieldAttribute.SetEnabled <PrintInvoicesFilter.definePrinterManually>(sender, filter, filter.PrintWithDeviceHub == true);
                PXUIFieldAttribute.SetEnabled <PrintInvoicesFilter.numberOfCopies>(sender, filter, filter.PrintWithDeviceHub == true);
                PXUIFieldAttribute.SetEnabled <PrintInvoicesFilter.printerID>(sender, filter, filter.PrintWithDeviceHub == true && filter.DefinePrinterManually == true);

                if (filter.PrintWithDeviceHub != true || filter.DefinePrinterManually != true)
                {
                    filter.PrinterID = null;
                }
            }
        }
예제 #2
0
        public virtual void SOShipmentFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }

            SOShipmentFilter filter = e.Row as SOShipmentFilter;

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                Orders.SetProcessTarget(null, null, null, filter.Action, parameters);
            }
            string actionID = (string)Orders.GetTargetFill(null, null, null, filter.Action, "@actionID");

            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.invoiceDate>(sender, filter, actionID == "2" || actionID == "6");
            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.packagingType>(sender, filter, actionID != "6");
            PXUIFieldAttribute.SetVisible <SOShipmentFilter.showPrinted>(sender, filter, actionID == "7");

            if (sosetup.Current.UseShipDateForInvoiceDate == true)
            {
                sender.RaiseExceptionHandling <SOShipmentFilter.invoiceDate>(filter, null, new PXSetPropertyException(Messages.UseInvoiceDateFromShipmentDateWarning, PXErrorLevel.Warning));
                PXUIFieldAttribute.SetEnabled <SOShipmentFilter.invoiceDate>(sender, filter, false);
            }
        }
        public virtual void SOInvoiceFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            SOInvoiceFilter filter = e.Row as SOInvoiceFilter;

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                SOInvoiceList.SetProcessTarget(null, null, null, filter.Action, parameters);

                string actionID = (string)SOInvoiceList.GetTargetFill(null, null, null, Filter.Current.Action, "@ActionName");
                PXUIFieldAttribute.SetVisible <SOInvoiceFilter.showFailedCCCapture>(sender, e.Row, actionID == "CaptureCCPayment");

                bool showPrintSettings = PXAccess.FeatureInstalled <FeaturesSet.deviceHub>() &&
                                         (filter != null && !String.IsNullOrEmpty(filter.Action) && SOReports.GetReportIDByName(SOInvoiceList, filter.Action) == SOReports.PrintInvoiceReport);

                PXUIFieldAttribute.SetVisible <SOInvoiceFilter.printWithDeviceHub>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <SOInvoiceFilter.definePrinterManually>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <SOInvoiceFilter.printerName>(sender, filter, showPrintSettings);

                PXUIFieldAttribute.SetEnabled <SOInvoiceFilter.definePrinterManually>(sender, filter, filter.PrintWithDeviceHub == true);
                PXUIFieldAttribute.SetEnabled <SOInvoiceFilter.printerName>(sender, filter, filter.PrintWithDeviceHub == true && filter.DefinePrinterManually == true);

                if (filter.PrintWithDeviceHub != true || filter.DefinePrinterManually != true)
                {
                    filter.PrinterName = null;
                }
            }
        }
예제 #4
0
        public virtual void SOShipmentFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }

            SOShipmentFilter filter = e.Row as SOShipmentFilter;

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                Orders.SetProcessTarget(null, null, null, filter.Action, parameters);
            }
            string actionID = (string)Orders.GetTargetFill(null, null, null, filter.Action, "@actionID");
            int    action   = 0;

            int.TryParse(actionID, out action);

            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.invoiceDate>(sender, filter, action == SOShipmentEntryActionsAttribute.CreateInvoice || action == SOShipmentEntryActionsAttribute.CreateDropshipInvoice);
            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.packagingType>(sender, filter, action != SOShipmentEntryActionsAttribute.CreateDropshipInvoice);
            PXUIFieldAttribute.SetVisible <SOShipmentFilter.showPrinted>(sender, filter, action == SOShipmentEntryActionsAttribute.PrintLabels || action == SOShipmentEntryActionsAttribute.PrintPickList);
            PXUIFieldAttribute.SetDisplayName <SOShipment.shipmentNbr>(Orders.Cache, action == SOShipmentEntryActionsAttribute.CreateDropshipInvoice ? Messages.GetLocal(POReceipt.receiptNbr.DisplayName) : Messages.GetLocal(SOShipment.shipmentNbr.DisplayName));
            PXUIFieldAttribute.SetDisplayName <SOShipment.shipDate>(Orders.Cache, action == SOShipmentEntryActionsAttribute.CreateDropshipInvoice ? Messages.GetLocal(POReceipt.receiptDate.DisplayName) : Messages.GetLocal(SOShipment.shipDate.DisplayName));


            if (sosetup.Current.UseShipDateForInvoiceDate == true)
            {
                sender.RaiseExceptionHandling <SOShipmentFilter.invoiceDate>(filter, null, new PXSetPropertyException(Messages.UseInvoiceDateFromShipmentDateWarning, PXErrorLevel.Warning));
                PXUIFieldAttribute.SetEnabled <SOShipmentFilter.invoiceDate>(sender, filter, false);
            }
        }
예제 #5
0
        public virtual void SOInvoiceFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            SOInvoiceFilter filter = e.Row as SOInvoiceFilter;

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                SOInvoiceList.SetProcessTarget(null, null, null, filter.Action, parameters);

                string actionID = (string)SOInvoiceList.GetTargetFill(null, null, null, Filter.Current.Action, "@ActionName");
                PXUIFieldAttribute.SetVisible <SOInvoiceFilter.showFailedCCCapture>(sender, e.Row, actionID == "CaptureCCPayment");
                bool showPrintSettings = IsPrintingAllowed(filter);

                PXUIFieldAttribute.SetVisible <SOInvoiceFilter.printWithDeviceHub>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <SOInvoiceFilter.definePrinterManually>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <SOInvoiceFilter.printerID>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <SOInvoiceFilter.numberOfCopies>(sender, filter, showPrintSettings);

                PXUIFieldAttribute.SetEnabled <SOInvoiceFilter.definePrinterManually>(sender, filter, filter.PrintWithDeviceHub == true);
                PXUIFieldAttribute.SetEnabled <SOInvoiceFilter.numberOfCopies>(sender, filter, filter.PrintWithDeviceHub == true);
                PXUIFieldAttribute.SetEnabled <SOInvoiceFilter.printerID>(sender, filter, filter.PrintWithDeviceHub == true && filter.DefinePrinterManually == true);

                if (filter.PrintWithDeviceHub != true || filter.DefinePrinterManually != true)
                {
                    filter.PrinterID = null;
                }
            }
        }
예제 #6
0
        protected virtual void PrintInvoicesFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            PrintInvoicesFilter filter = (PrintInvoicesFilter)e.Row;

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                ARDocumentList.SetProcessTarget(null, null, null, filter.Action, parameters);

                bool showPrintSettings = PXAccess.FeatureInstalled <FeaturesSet.deviceHub>() &&
                                         (filter != null && !String.IsNullOrEmpty(filter.Action) && ARReports.GetReportIDByName(ARDocumentList, filter.Action) == ARReports.InvoiceMemoReportID);

                PXUIFieldAttribute.SetVisible <PrintInvoicesFilter.printWithDeviceHub>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <PrintInvoicesFilter.definePrinterManually>(sender, filter, showPrintSettings);
                PXUIFieldAttribute.SetVisible <PrintInvoicesFilter.printerName>(sender, filter, showPrintSettings);

                PXUIFieldAttribute.SetEnabled <PrintInvoicesFilter.definePrinterManually>(sender, filter, filter.PrintWithDeviceHub == true);
                PXUIFieldAttribute.SetEnabled <PrintInvoicesFilter.printerName>(sender, filter, filter.PrintWithDeviceHub == true && filter.DefinePrinterManually == true);

                if (filter.PrintWithDeviceHub != true || filter.DefinePrinterManually != true)
                {
                    filter.PrinterName = null;
                }
            }
        }
예제 #7
0
        public virtual void SOShipmentFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }

            SOShipmentFilter filter = e.Row as SOShipmentFilter;

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                Orders.SetProcessTarget(null, null, null, filter.Action, parameters);
            }
            int?action = GetActionIDByName(filter.Action);

            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.invoiceDate>(sender, filter, action == SOShipmentEntryActionsAttribute.CreateInvoice || action == SOShipmentEntryActionsAttribute.CreateDropshipInvoice);
            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.packagingType>(sender, filter, action != SOShipmentEntryActionsAttribute.CreateDropshipInvoice);
            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.siteID>(sender, filter, action != SOShipmentEntryActionsAttribute.CreateDropshipInvoice);
            PXUIFieldAttribute.SetVisible <SOShipmentFilter.showPrinted>(sender, filter, action == SOShipmentEntryActionsAttribute.PrintLabels || action == SOShipmentEntryActionsAttribute.PrintPickList);

            PXUIFieldAttribute.SetDisplayName <SOShipment.shipmentNbr>(Orders.Cache, action == SOShipmentEntryActionsAttribute.CreateDropshipInvoice ? Messages.ReceiptNbr : Messages.ShipmentNbr);
            PXUIFieldAttribute.SetDisplayName <SOShipment.shipDate>(Orders.Cache, action == SOShipmentEntryActionsAttribute.CreateDropshipInvoice ? Messages.ReceiptDate : Messages.ShipmentDate);

            if (sosetup.Current.UseShipDateForInvoiceDate == true)
            {
                sender.RaiseExceptionHandling <SOShipmentFilter.invoiceDate>(filter, null, new PXSetPropertyException(Messages.UseInvoiceDateFromShipmentDateWarning, PXErrorLevel.Warning));
                PXUIFieldAttribute.SetEnabled <SOShipmentFilter.invoiceDate>(sender, filter, false);
            }

            bool warnShipNotInvoiced = (action == SOShipmentEntryActionsAttribute.PostInvoiceToIN &&
                                        (string)Orders.GetTargetFill(null, null, null, filter.Action, nameof(SOShipment.status)) != SOShipmentStatus.Completed &&
                                        sosetup.Current.UseShippedNotInvoiced != true && sosetup.Current.UseShipDateForInvoiceDate != true);
            Exception warnShipNotInvoicedExc = warnShipNotInvoiced ? new PXSetPropertyException(Messages.ShipNotInvoicedWarning, PXErrorLevel.Warning) : null;

            sender.RaiseExceptionHandling <SOShipmentFilter.action>(filter, null, warnShipNotInvoicedExc);
            bool showPrintSettings = IsPrintingAllowed(filter);

            PXUIFieldAttribute.SetVisible <SOShipmentFilter.printWithDeviceHub>(sender, filter, showPrintSettings);
            PXUIFieldAttribute.SetVisible <SOShipmentFilter.definePrinterManually>(sender, filter, showPrintSettings);
            PXUIFieldAttribute.SetVisible <SOShipmentFilter.printerID>(sender, filter, showPrintSettings);
            PXUIFieldAttribute.SetVisible <SOShipmentFilter.numberOfCopies>(sender, filter, showPrintSettings);

            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.definePrinterManually>(sender, filter, filter.PrintWithDeviceHub == true);
            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.numberOfCopies>(sender, filter, filter.PrintWithDeviceHub == true);
            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.printerID>(sender, filter, filter.PrintWithDeviceHub == true && filter.DefinePrinterManually == true);

            if (filter.PrintWithDeviceHub != true || filter.DefinePrinterManually != true)
            {
                filter.PrinterID = null;
            }

            bool showInvoiceSeparately = action.IsIn(SOShipmentEntryActionsAttribute.CreateInvoice, SOShipmentEntryActionsAttribute.CreateDropshipInvoice);

            PXUIFieldAttribute.SetEnabled <SOShipment.billSeparately>(Orders.Cache, null, showInvoiceSeparately &&
                                                                      PXLongOperation.GetStatus(this.UID) == PXLongRunStatus.NotExists);
            PXUIFieldAttribute.SetVisible <SOShipment.billSeparately>(Orders.Cache, null, showInvoiceSeparately);
        }
        private void InitializeProcessing()
        {
            FilteredItems.SetSelected <EMailAccount.selected>();

            PXProcessingStep[] targets = PXAutomation.GetProcessingSteps(this);
            if (targets.Length > 0)
            {
                FilteredItems.SetProcessTarget(targets[0].GraphName,
                                               targets.Length > 1 ? null : targets[0].Name,
                                               targets[0].Actions[0].Name,
                                               targets[0].Actions[0].Menus[0],
                                               null, null);
            }
            else
            {
                throw new PXException(PX.Objects.SO.Messages.MissingMassProcessWorkFlow);
            }
        }
예제 #9
0
        protected virtual void PrintInvoicesFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            PrintInvoicesFilter o = (PrintInvoicesFilter)e.Row;

            if (o != null && !String.IsNullOrEmpty(o.Action))
            {
                ARDocumentList.SetProcessTarget(null, null, null, o.Action);
            }
        }
예제 #10
0
        public virtual void SOInvoiceFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            SOInvoiceFilter filter = e.Row as SOInvoiceFilter;

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                SOInvoiceList.SetProcessTarget(null, null, null, filter.Action, parameters);

                string actionID = (string)SOInvoiceList.GetTargetFill(null, null, null, Filter.Current.Action, "@ActionName");
                PXUIFieldAttribute.SetVisible <SOInvoiceFilter.showFailedCCCapture>(sender, e.Row, actionID == "CaptureCCPayment");
            }
        }
예제 #11
0
        public virtual void SOOrderFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            SOOrderFilter filter = e.Row as SOOrderFilter;

            if (filter == null)
            {
                return;
            }
            string actionID = (string)Orders.GetTargetFill(null, null, null, filter.Action, "@actionID");

            PXUIFieldAttribute.SetVisible <SOOrderFilter.shipmentDate>(sender, null, actionID == "1");
            PXUIFieldAttribute.SetVisible <SOOrderFilter.siteID>(sender, null, actionID == "1");
            if (!String.IsNullOrEmpty(filter.Action))
            {
                string siteCD = Filter.GetValueExt <SOOrderFilter.siteID>(filter) as string;
                Orders.SetProcessTarget(null, null, null, filter.Action, null, actionID == "1" ? filter.ShipmentDate : filter.EndDate, siteCD);
            }
        }
예제 #12
0
        public virtual void SOPostShipmentFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            SOPostShipmentFilter filter = e.Row as SOPostShipmentFilter;

            PXProcessingStep[] targets = PXAutomation.GetProcessingSteps(this);
            if (targets.Length > 0)
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                Orders.SetProcessTarget(targets[0].GraphName, targets[0].Name, targets[0].Actions[0].Name, targets[0].Actions[0].Menus[0], null, parameters);
            }
            else
            {
                Orders.SetProcessDelegate(delegate(List <SOOrder> list)
                {
                    PostOrder(filter, list);
                });
            }
        }
        public virtual void SOShipmentFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }

            SOShipmentFilter filter = e.Row as SOShipmentFilter;

            if (filter != null && !String.IsNullOrEmpty(filter.Action))
            {
                Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter);
                Orders.SetProcessTarget(null, null, null, filter.Action, parameters);
            }
            int?action = GetActionIDByName(filter.Action);

            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.invoiceDate>(sender, filter, action == SOShipmentEntryActionsAttribute.CreateInvoice || action == SOShipmentEntryActionsAttribute.CreateDropshipInvoice);
            PXUIFieldAttribute.SetEnabled <SOShipmentFilter.packagingType>(sender, filter, action != SOShipmentEntryActionsAttribute.CreateDropshipInvoice);
            PXUIFieldAttribute.SetVisible <SOShipmentFilter.showPrinted>(sender, filter, action == SOShipmentEntryActionsAttribute.PrintLabels || action == SOShipmentEntryActionsAttribute.PrintPickList);

            PXUIFieldAttribute.SetDisplayName <SOShipment.shipmentNbr>(Orders.Cache, action == SOShipmentEntryActionsAttribute.CreateDropshipInvoice ? Messages.ReceiptNbr : Messages.ShipmentNbr);
            PXUIFieldAttribute.SetDisplayName <SOShipment.shipDate>(Orders.Cache, action == SOShipmentEntryActionsAttribute.CreateDropshipInvoice ? Messages.ReceiptDate : Messages.ShipmentDate);

            if (sosetup.Current.UseShipDateForInvoiceDate == true)
            {
                sender.RaiseExceptionHandling <SOShipmentFilter.invoiceDate>(filter, null, new PXSetPropertyException(Messages.UseInvoiceDateFromShipmentDateWarning, PXErrorLevel.Warning));
                PXUIFieldAttribute.SetEnabled <SOShipmentFilter.invoiceDate>(sender, filter, false);
            }

            bool warnShipNotInvoiced = (action == SOShipmentEntryActionsAttribute.PostInvoiceToIN &&
                                        (string)Orders.GetTargetFill(null, null, null, filter.Action, nameof(SOShipment.status)) != SOShipmentStatus.Completed &&
                                        sosetup.Current.UseShippedNotInvoiced != true && sosetup.Current.UseShipDateForInvoiceDate != true);
            Exception warnShipNotInvoicedExc = warnShipNotInvoiced ? new PXSetPropertyException(Messages.ShipNotInvoicedWarning, PXErrorLevel.Warning) : null;

            sender.RaiseExceptionHandling <SOShipmentFilter.action>(filter, null, warnShipNotInvoicedExc);
        }