From e2b1af84d8799f9af3acd8e0833b82e618fd37b3 Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Fri, 14 Jun 2013 22:44:01 +1000 Subject: [PATCH] Fixed saving PackingLists --- app/webroot/js/document_add_edit.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/webroot/js/document_add_edit.js b/app/webroot/js/document_add_edit.js index f4f25629..56aef3d4 100755 --- a/app/webroot/js/document_add_edit.js +++ b/app/webroot/js/document_add_edit.js @@ -382,8 +382,6 @@ $(function() { $("#saveInvoiceButton").click(function() { saveDocument('Invoice'); - - }); //OA View. $("#saveOAButton").click(function() { @@ -393,6 +391,16 @@ $(function() { $('.job-title').html($("#OrderAcknowledgementJobId :selected").text()); }); + + //PackingList View. Damn you past Karl. + $("#savePackingListButton").click(function() { + saveDocument('Packing List'); + //if the job has changed, the create invoice button wont work properly. + window.location.reload(true); + $('.job-title').html($("#PackingListJobId :selected").text()); + }); + + $("#createOA").click(function() { $("#addJobConfirmation").dialog('open');