Skip to content

Commit

Permalink
Add dialogs to bulk approve and close orders
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesde committed Nov 4, 2018
1 parent 0b93c27 commit fe50193
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions screen/SimpleScreens/Order/FindOrder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ along with this software (see the LICENSE.md file). If not, see
<transition name="orderDetail"><default-response url="../OrderDetail"/></transition>
<transition name="createOrder"><service-call name="mantle.order.OrderServices.create#Order"/>
<default-response url="../OrderDetail"/></transition>
<transition name="changeOrderPartsStatus"><service-call name="mantle.order.OrderBulkServices.change#OrderPartsStatus"/>
<default-response url="."/></transition>

<transition name="editFacility"><default-response url="//${appRoot}/Facility/EditFacility"/></transition>
<transition name="editParty"><default-response url="//${appRoot}/Party/EditParty"/></transition>
Expand Down Expand Up @@ -137,6 +139,35 @@ along with this software (see the LICENSE.md file). If not, see
<field name="submitButton"><default-field title="Create"><submit/></default-field></field>
</form-single>
</container-dialog>

<section name="ApproveOrdersSection" condition="partStatusId &amp;&amp; (partStatusId.contains('OrderPlaced') ||
partStatusId.contains('OrderProcessing') || partStatusId.contains('OrderHold'))"><widgets>
<container-dialog id="ApproveOrdersDialog" button-text="Approve Orders">
<label text="Approves orders matching current find options. Use the Find Options dialog to adjust as needed before doing this." type="p"/>
<form-single name="ApproveOrdersForm" transition="changeOrderPartsStatus" pass-through-parameters="true">
<field name="toStatusId" from="'OrderApproved'"><default-field><hidden/></default-field></field>
<field name="submitButton"><default-field title="Approve Orders">
<submit confirmation="Do the current find options and orders displayed match what you want to approve?"/>
</default-field></field>
<field-layout><field-row-big><field-ref name="submitButton"/></field-row-big></field-layout>
</form-single>
</container-dialog>
</widgets></section>
<section name="CloseOrdersSection" condition="partStatusId &amp;&amp; (partStatusId.contains('OrderOpen') ||
partStatusId.contains('OrderProposed') || partStatusId.contains('OrderPlaced') || partStatusId.contains('OrderProcessing') ||
partStatusId.contains('OrderHold') || partStatusId.contains('OrderApproved') || partStatusId.contains('OrderSent'))"><widgets>
<container-dialog id="CloseOrdersDialog" button-text="Close Orders">
<label text="Closes orders matching current find options. Use the Find Options dialog to adjust as needed before doing this." type="p"/>
<label text="Closing an order will cancel all items not yet shipped. If all items cancelled then the order will be Cancelled. If any item was shipped the order will be Completed." type="p"/>
<form-single name="CloseOrdersForm" transition="changeOrderPartsStatus" pass-through-parameters="true">
<field name="toStatusId" from="'OrderCancelled'"><default-field><hidden/></default-field></field>
<field name="submitButton"><default-field title="Close Orders">
<submit confirmation="Do the current find options and orders displayed match what you want to close (cancel all unshipped, complete any partially shipped)?"/>
</default-field></field>
<field-layout><field-row-big><field-ref name="submitButton"/></field-row-big></field-layout>
</form-single>
</container-dialog>
</widgets></section>
</row-col><row-col md="7" style="text-right">
<link url="../OrderIssuedInvoiced" text="Issued and Invoiced Report"/>
<link url="../SalesAnalysis" text="Sales Analysis Report"/>
Expand Down

0 comments on commit fe50193

Please sign in to comment.