diff options
Diffstat (limited to 'templates/list_movements.tpl')
| -rw-r--r-- | templates/list_movements.tpl | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/templates/list_movements.tpl b/templates/list_movements.tpl index 442f29d..424fff9 100644 --- a/templates/list_movements.tpl +++ b/templates/list_movements.tpl @@ -4,16 +4,18 @@ <div class="floaticon hidden-print"> <button type="button" class="btn btn-link" onclick="window.print()">{biticon ipackage="icons" iname="document-print" iexplain="Print"}</button> {if $gBitUser->hasPermission('p_stock_create')} - <a href="{$smarty.const.STOCK_PKG_URL}add_requisition.php">{biticon ipackage="icons" iname="list-add" iexplain="Add Requisition"}</a> + <a href="{$smarty.const.STOCK_PKG_URL}add_prebuild.php">{biticon ipackage="icons" iname="package-x-generic" iexplain="Add Prebuild"}</a> <a href="{$smarty.const.STOCK_PKG_URL}edit_movement.php">{biticon ipackage="icons" iname="view-task-add" iexplain="Add Movement"}</a> {/if} <form class="minifind" action="{$smarty.const.STOCK_PKG_URL}list_movements.php" method="get"> - {if $componentContentId}<input type="hidden" name="component_content_id" value="{$componentContentId|escape}" />{/if} + {if $partContentId}<input type="hidden" name="part_content_id" value="{$partContentId|escape}" />{/if} + {if $filterUserId}<input type="hidden" name="user_id" value="{$filterUserId|escape}" />{/if} <div class="form-inline"> <div class="form-group"> <select name="ref_type" class="form-control input-sm"> <option value="">{tr}All types{/tr}</option> <option value="REQN"{if $filterType eq 'REQN'} selected="selected"{/if}>{tr}Requisition (out){/tr}</option> + <option value="PBLD"{if $filterType eq 'PBLD'} selected="selected"{/if}>{tr}Prebuild (out){/tr}</option> <option value="TRANS"{if $filterType eq 'TRANS'} selected="selected"{/if}>{tr}Transfer (in){/tr}</option> <option value="ORDER"{if $filterType eq 'ORDER'} selected="selected"{/if}>{tr}Order (in){/tr}</option> </select> @@ -27,13 +29,18 @@ </div> </form> </div> - <h1>{tr}Movements{/tr}{if $componentTitle} — {$componentTitle|escape}{/if}</h1> + <h1>{tr}Movements{/tr}{if $partTitle} — {$partTitle|escape}{/if}</h1> + <small> + <a href="{$smarty.const.STOCK_PKG_URL}list_movements.php">{tr}Movements{/tr}</a> + {if $partTitle}› <a href="{$smarty.const.STOCK_PKG_URL}view_{$partType}.php?content_id={$partContentId}">{$partTitle|escape}</a>{/if} + {if $filterUserName}› <a href="{$smarty.const.STOCK_PKG_URL}list_movements.php?user_id={$filterUserId}">{$filterUserName|escape}</a>{/if} + </small> </header> <section class="body"> - {if $componentContentId} - <p><a class="btn btn-xs btn-default" href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$componentContentId}">← {tr}Back to component{/tr}</a></p> + {if $partContentId} + <p><a class="btn btn-xs btn-default" href="{$smarty.const.STOCK_PKG_URL}view_{$partType}.php?content_id={$partContentId}">← {if $partType eq 'assembly'}{tr}Back to assembly{/tr}{else}{tr}Back to component{/tr}{/if}</a></p> {/if} <table class="table table-striped table-hover"> @@ -41,7 +48,7 @@ <tr> <th>{smartlink ititle="Reference" isort="title"}</th> <th>{tr}Type{/tr}</th> - {if $componentContentId}<th class="text-right">{tr}Qty{/tr}</th>{/if} + {if $partContentId}<th class="text-right">{tr}Qty{/tr}</th>{/if} <th>{smartlink ititle="Ordered" isort="ref_start_date" ifile="list_movements.php" ipackage="stock"}</th> <th>{smartlink ititle="Received" isort="event_time" ifile="list_movements.php" ipackage="stock"}</th> <th>{smartlink ititle="Date" isort="created_desc"}</th> @@ -54,13 +61,17 @@ <tr> <td><a href="{$mov.display_url|escape}">{$mov.title|escape}</a></td> <td>{$mov.ref_type|escape|default:'—'}</td> - {if $componentContentId} - <td class="text-right">{if $mov.cmp_qty_type eq 'PRT' && $partSize > 0}{math equation="q/p" q=$mov.cmp_qty p=$partSize format="%.2f"}{elseif $mov.cmp_qty_type eq 'SHT'}{$mov.cmp_qty|string_format:"%.2f"}{else}{$mov.cmp_qty|string_format:"%.0f"}{/if} {$mov.cmp_qty_type|escape}</td> + {if $partContentId} + {if $partType eq 'assembly'} + <td class="text-right">{$mov.part_qty|string_format:"%.0f"}</td> + {else} + <td class="text-right">{if $mov.part_qty_type eq 'PRT' && $partSize > 0}{math equation="q/p" q=$mov.part_qty p=$partSize format="%.2f"}{elseif $mov.part_qty_type eq 'SHT'}{$mov.part_qty|string_format:"%.2f"}{else}{$mov.part_qty|string_format:"%.0f"}{/if} {$mov.part_qty_type|escape}</td> + {/if} {/if} <td>{if $mov.ref_start_date}{$mov.ref_start_date|bit_short_date}{else}—{/if}</td> <td>{if $mov.event_time}{$mov.event_time|bit_short_date}{else}—{/if}</td> <td>{$mov.created|bit_short_date}</td> - <td>{$mov.real_name|default:$mov.login|escape}</td> + <td><a href="{$smarty.const.STOCK_PKG_URL}list_movements.php?user_id={$mov.user_id}">{$mov.real_name|default:$mov.login|escape}</a></td> {if $gBitUser->hasPermission('p_stock_update')} <td> <a href="{$smarty.const.STOCK_PKG_URL}edit_movement.php?content_id={$mov.content_id}">{biticon ipackage="icons" iname="edit" iexplain="Edit"}</a> @@ -74,7 +85,7 @@ </table> <nav> - {pagination ref_type=$filterType find=$smarty.request.find|default:'' component_content_id=$componentContentId|default:'' assembly_content_id=$assemblyContentId|default:''} + {pagination ref_type=$filterType find=$smarty.request.find|default:'' part_content_id=$partContentId|default:'' user_id=$filterUserId|default:''} </nav> </section> |
