Making note of orders already printed
Making note of orders already printed
I know that we touched on this in a separate topic previously, but I wonder if there is a way to add a marker of some sort to the order list that will note when an order has already been printed. Because for varying reasons an order may have been printed but not completed on a given day, we need to be sure that we do not miss printing an order by thinking it has been printed previously.
Although having this automated would be great (ie. a field gets an 'x' once the order is printed), having to do this manually would not be a tremendous task. What we would need to do is add a new field in the Order list where we manually mark the orders that we print, and have this information saved so that it will show us that the order has already been printed.
Does anyone have advice on this?
Although having this automated would be great (ie. a field gets an 'x' once the order is printed), having to do this manually would not be a tremendous task. What we would need to do is add a new field in the Order list where we manually mark the orders that we print, and have this information saved so that it will show us that the order has already been printed.
Does anyone have advice on this?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
-
- Commodore (COMO)
- Posts: 433
- Joined: Wed May 28, 2008 9:42 am
- Location: Concord, NC
- Contact:
Re: Making note of orders already printed
We created a status called 'Sent to Warehouse' which we change each order we print to this.
Something cool would be:
When we print a packing slip it automatically triggers sent to warehouse.
That would save a nice step for us.
Something cool would be:
When we print a packing slip it automatically triggers sent to warehouse.
That would save a nice step for us.
Re: Making note of orders already printed
You have to manually send the Email as discussed in this threadWe created a status called 'Sent to Warehouse' which we change each order we print to this.
Something cool would be:
When we print a packing slip it automatically triggers sent to warehouse.
That would save a nice step for us.
viewtopic.php?f=42&t=8682
-
- Commodore (COMO)
- Posts: 433
- Joined: Wed May 28, 2008 9:42 am
- Location: Concord, NC
- Contact:
Re: Making note of orders already printed
I think the OP was talking about a feature for internal use.mazhar wrote:You have to manually send the Email as discussed in this threadWe created a status called 'Sent to Warehouse' which we change each order we print to this.
Something cool would be:
When we print a packing slip it automatically triggers sent to warehouse.
That would save a nice step for us.
viewtopic.php?f=42&t=8682
Our status's
In Process(if any order is paid it comes here)
Sent to Warehouse(if printed by the person appointed to orders)
Completed(Shipped)
It's just a way for us to keep up what was printed to avoid duplicate packing slips in the warehouse. It also serves as a way to check where things are going wrong.
If we could make an order change from In Prcoess to Sent to Warehouse by an 'action(aka printing a packing slip') it would save some time/help automate that process.
We deal with 300+ orders per day so you can imagine it gets a little complicated.
Re: Making note of orders already printed
Is there a (simple) way to add an additional column to the Orders menu so that we could either manually or (preferably) automatically have a check mark or other indicator in this new column to show us that an order has been printed? It is a tremendous hassle having to ask in the warehouse if an order has been printed, or what their last order number is. The software for our other site automatically marks an order as printed when it is sent to print, and it greatly simplifies life in that respect.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
A quick solution is to use a new order status for the order. For example create a new OrderStatus named "Printed" and don't attach it with any trigger. Now find out the OrderStausId by looking into the ac_OrderStatuses table, for example it was 7 for me. Now you need to put some code some where where you want to mark the orders as printed for example I placed a button at Invoice page which i used to change the status of the order to printed. Once you changed the status of the order the Order Manger status will show you the status as Printed for printed orders. I am attaching the modified Invoice pageIs there a (simple) way to add an additional column to the Orders menu so that we could either manually or (preferably) automatically have a check mark or other indicator in this new column to show us that an order has been printed? It is a tremendous hassle having to ask in the warehouse if an order has been printed, or what their last order number is. The software for our other site automatically marks an order as printed when it is sent to print, and it greatly simplifies life in that respect.
Re: Making note of orders already printed
I have not opened the Invoice.aspx file that you attached, so I have a quick question on it. Will the printing of an order automatically trigger the change of status to Printed, or do we need to manually check a box on each invoice when we go to print them?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
After printing the order you have to manually click an extra button which will mark it the printed order.
Re: Making note of orders already printed
Attach a server method to your print button in either Admin/Orders/Print/PackSlips.aspx, or Invoice, or PullSheet, etc, depending on what you use. We use the packslips, so here is an example from there.
First, the code for the method to run server side on the print button.
then, the StePrintStatus method...
Pretty straight forward, I think.
Hope this helps.
Scott
First, the code for the method to run server side on the print button.
Code: Select all
<asp:Button ID="Print" runat="server" Text="Print" OnClientClick="window.print();" OnClick="SetPrintStatus" />
Code: Select all
protected void SetPrintStatus(object sender, EventArgs e)
{
List<int> selectedOrders = GetSelectedOrders();
foreach (int orderId in selectedOrders)
{
Order thisOrder = OrderDataSource.Load(orderId);
thisOrder.OrderStatusId = 9; //or, whatever the id of your "printed" status
thisOrder.Save();
}
}
Hope this helps.
Scott
Re: Making note of orders already printed
We used Mazhar's file, and everything was great except that I forgot we had customized the Invoice printout. Having not gone through the file, is there a specific section from the file that we can pasted into our customized file to put the button in place as in Mazhar's file?
Alternatively, your method, Scott, appears to be simple (as it appears to be automatic when we print). I assume that we simply overwrite the existing (similar) code?
Alternatively, your method, Scott, appears to be simple (as it appears to be automatic when we print). I assume that we simply overwrite the existing (similar) code?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
Mine was just an add-on. New method, new button.
Hope that helps.
Scott
Hope that helps.
Scott
Re: Making note of orders already printed
Yes you can use the technique soctt told. Edit your Invoice file and add following method to it
Now find the following line of code
and make it look like
This change will change the order status with the print button.
Code: Select all
protected void MarkPrinted_Click(object sender, EventArgs e)
{
List<int> selectedOrders = GetSelectedOrders();
if ((selectedOrders == null) || (selectedOrders.Count == 0)) Response.Redirect("~/Admin/Orders/Default.aspx");
OrderCollection orders = GetOrders(selectedOrders.ToArray());
OrderStatus orderStatus = OrderStatusDataSource.Load(7,false);
foreach (Order order in orders)
order.UpdateOrderStatus(orderStatus);
}
Code: Select all
<asp:Button ID="Print" runat="server" Text="Print" OnClientClick="window.print();return false;" />
Code: Select all
<asp:Button ID="Print" runat="server" Text="Print" OnClientClick="window.print();return true;" OnClick="MarkPrinted_Click" />
Re: Making note of orders already printed
Thank you. I did not want to make any assumptions, but it was pretty straight-forward.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
I noted yesterday and today that if a customer has us add to their order via the Edit Order Items menu (after the order has been placed) that if the order is marked as 'Order Printed' then the inventory is not adjusted accordingly. If we change the status to 'Shipment Pending' then the inventory is updated.
Should we set the 'Order Printed' status to Destock (currently it is blank)? We had left the status blank (neither Destock nor Restock) because I was concerned that duplicating the process would Destock the product a second time. Can anyone shed some light on this?
Should we set the 'Order Printed' status to Destock (currently it is blank)? We had left the status blank (neither Destock nor Restock) because I was concerned that duplicating the process would Destock the product a second time. Can anyone shed some light on this?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
Now that we have upgraded to 7.0.7 this method of automatically changing the order status no longer works, as the ASPX file has been split into two files (ASPX and ASPX.CS). We have tried using the code mentioned above a few different ways, but it either does nothing or throws an error, depending on how we do this. How do we change our invoices.aspx and invoices.aspx.cs to automatically update the order status?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
I am not sure why it didn't worked for you. Beside we broke the page into two files there is no other change that could break this mod. I am attaching latest files for Invoices.aspx and Invoices.aspx.cs those includes this custom code. Give them a try but before that don't forget to take backup of your existing Invoices.aspx and Invoices.aspx.cs files.
Re: Making note of orders already printed
I tried using the files but get sent to the general error page where I receive the following error:
We are sorry, but the page you are trying to access has experienced an error.
Please contact us to report this problem.
We are sorry, but the page you are trying to access has experienced an error.
Please contact us to report this problem.
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
I have compared the files versus the standard versions, and the changes seem straight forward (and match what we had tried before), but we get the error noted above. Has anyone else used the files that Mazhar attached above without any issues, or are others getting this error, as well?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
Go check the error log at Administration > Help > Error Log. The error you are seeing could be due to some other change if you have modified your document for some other customization.
Re: Making note of orders already printed
The error (Debug Data) is:
Exception of type 'System.Web.HttpUnhandledException' was thrown.; This method can only be called when the object data has not been modified (IsDirty == false)
Exception of type 'System.Web.HttpUnhandledException' was thrown.; This method can only be called when the object data has not been modified (IsDirty == false)
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
Well it seems like your order object is dirty(contains unsaved changes) prior to order status update. Try saving it before you change the order status something like.
Code: Select all
protected void MarkPrinted_Click(object sender, EventArgs e)
{
List<int> selectedOrders = GetSelectedOrders();
if ((selectedOrders == null) || (selectedOrders.Count == 0)) Response.Redirect("~/Admin/Orders/Default.aspx");
OrderCollection orders = GetOrders(selectedOrders.ToArray());
OrderStatus orderStatus = OrderStatusDataSource.Load(7, false);
foreach (Order order in orders)
{
order.Save();
order.UpdateOrderStatus(orderStatus);
}
}
Re: Making note of orders already printed
That seemed to work. Do you know what would cause this, and is it a big deal?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
Actually methods expects that order must not be in dirty state. If UpdateOrderStatus call sees the order has some stuff that is not saved then it throws the exception you were seeing before. I am not sure what was being updated upon order before this UpdateOrderStatus call, seems like you are updating something upon order before updating its status. Just make sure that if you are updating the order intentionally then make sure to save changes prior to calling UpdateOrderStatus.
Code: Select all
order.UpdateOrderStatus(orderStatus)
Re: Making note of orders already printed
Thank you for the explanation, Mazhar. This is just our development site, so I will test without the added code when we move to the updated live site, as the previous code has been working without any issues.
This is the only code that was added to the .cs file because of our problem, correct?
Code: Select all
{
order.Save();
order.UpdateOrderStatus(orderStatus);
}
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot
Re: Making note of orders already printed
I am astonished that AC has still not built this into the software as a default, as I would expect that virtually everyone needs to know what has been printed and what has not, if for no other reason than to ensure that an order was not missed when they were printed. In any event, this is still a customization in Gold, and when we try to use the above code (placed the same as in our 7.0.7 files) we get a compliation error. To be honest, we would prefer to use our 7.0.7 files, as they already have the layout work done. Is there a straightforward way to 'update' our 7.0.7 invoice files to work in Gold? If not, can anyone help with an updated version of the above code to mark the orders shipped when we print them?
Rick Morris
Brewhaus (America) Inc.
Hot Sauce Depot
Brewhaus (America) Inc.
Hot Sauce Depot