Add "discarded" flag when receiving DMG/EXP products; add view for purchase credits
This commit is contained in:
parent
55973bf30a
commit
e13e2cfaaf
3 changed files with 122 additions and 5 deletions
|
@ -154,7 +154,28 @@
|
|||
}
|
||||
$(this).button('disable').button('option', 'label', "Working...");
|
||||
$('#mode').val('damaged');
|
||||
$('#receiving-form').submit();
|
||||
$('#damaged-dialog').dialog({
|
||||
title: "Damaged Product",
|
||||
modal: true,
|
||||
width: '500px',
|
||||
buttons: [
|
||||
{
|
||||
text: "OK",
|
||||
click: function() {
|
||||
$('#damaged-dialog').dialog('close');
|
||||
$('#receiving-form #trash').val($('#damaged-dialog #trash').is(':checked') ? '1' : '');
|
||||
$('#receiving-form').submit();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "Cancel",
|
||||
click: function() {
|
||||
$('#damaged').button('option', 'label', "Damaged").button('enable');
|
||||
$('#damaged-dialog').dialog('close');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
$('#expiration input[type="date"]').datepicker();
|
||||
|
@ -166,8 +187,9 @@
|
|||
$(this).button('disable').button('option', 'label', "Working...");
|
||||
$('#mode').val('expired');
|
||||
$('#expiration').dialog({
|
||||
title: "Expiration Date",
|
||||
title: "Expired / Short Date",
|
||||
modal: true,
|
||||
width: '500px',
|
||||
buttons: [
|
||||
{
|
||||
text: "OK",
|
||||
|
@ -175,6 +197,7 @@
|
|||
$('#expiration').dialog('close');
|
||||
$('#receiving-form #expiration_date').val(
|
||||
$('#expiration input[type="date"]').val());
|
||||
$('#receiving-form #trash').val($('#expiration #trash').is(':checked') ? '1' : '');
|
||||
$('#receiving-form').submit();
|
||||
}
|
||||
},
|
||||
|
@ -280,6 +303,10 @@
|
|||
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
<%def name="extra_styles()">
|
||||
${parent.extra_styles()}
|
||||
<style type="text/css">
|
||||
|
||||
.product-info {
|
||||
|
@ -329,6 +356,7 @@
|
|||
${form.csrf_token()}
|
||||
${h.hidden('mode')}
|
||||
${h.hidden('expiration_date')}
|
||||
${h.hidden('trash')}
|
||||
${h.hidden('ordered_product')}
|
||||
|
||||
<div class="field-wrapper">
|
||||
|
@ -412,14 +440,22 @@
|
|||
<button type="button" id="received">Received</button>
|
||||
<button type="button" id="damaged">Damaged</button>
|
||||
<button type="button" id="expired">Expired</button>
|
||||
<button type="button" id="mispick">Mispick</button>
|
||||
<!-- <button type="button" id="mispick">Mispick</button> -->
|
||||
</div>
|
||||
|
||||
${form.end()}
|
||||
</div>
|
||||
|
||||
<div id="damaged-dialog" style="display: none;">
|
||||
<div class="field-wrapper trash">${h.checkbox('trash', label="Product will be discarded and cannot be returned", checked=False)}</div>
|
||||
</div>
|
||||
|
||||
<div id="expiration" style="display: none;">
|
||||
${h.text('expiration-date', type='date')}
|
||||
<div class="field-wrapper expiration-date">
|
||||
<label for="expiration-date">Expiration Date</label>
|
||||
<div class="field">${h.text('expiration-date', type='date')}</div>
|
||||
</div>
|
||||
<div class="field-wrapper trash">${h.checkbox('trash', label="Product will be discarded and cannot be returned", checked=False)}</div>
|
||||
</div>
|
||||
|
||||
<div id="mispick-dialog" style="display: none;">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue