);
var totalEstimated = 0;
+ var zeroLi = true;
fieldmapper.standardRequest(
['open-ils.acq', 'open-ils.acq.lineitem.search'],
{ async: true,
params: [openils.User.authtoken, {purchase_order:poId}, {flesh_attrs:true, flesh_notes:true, flesh_cancel_reason:true}],
onresponse: function(r) {
+ zeroLi = false;
liTable.show('list');
var li = openils.Util.readResponse(r);
// TODO: Add po_item's to total estimated amount
oncomplete : function() {
dojo.byId("acq-po-view-total-estimated").innerHTML = totalEstimated.toFixed(2);
if (liFocus) liTable.drawCopies(liFocus);
+ if(zeroLi) openils.Util.show('acq-po-no-lineitems');
}
}
);
</script>
[% INCLUDE 'default/acq/common/li_table.tt2' %]
[% INCLUDE "default/acq/common/notes.tt2" which = "Po" %]
+ <div class='hidden' id='acq-po-no-lineitems'>
+ <button type='dijit.form.Button' onclick='location.href = oilsBasePath + "/acq/picklist/brief_record?po=" + poId'>
+ Add Brief Record
+ </button>
+ </div>
[% INCLUDE "default/acq/po/item_table.tt2" %]
</div>
[% END %]