If selected project changes, update pricelist to match

This commit is contained in:
Nathan Gray 2014-12-09 20:21:17 +00:00
parent a336714407
commit dba4a12f0a

View File

@ -106,6 +106,12 @@ app.classes.timesheet = AppJS.extend(
*/ */
pm_id_changed: function(_egw, _widget) pm_id_changed: function(_egw, _widget)
{ {
// Update price list
var ts_pricelist = _widget.getRoot().getWidgetById('pl_id');
egw.json('projectmanager_widget::ajax_get_pricelist',[_widget.getValue()],function(value) {
ts_pricelist.set_select_options(value||{})
}).sendRequest(true);
var ts_project = this.et2.getWidgetById('ts_project'); var ts_project = this.et2.getWidgetById('ts_project');
if (ts_project) if (ts_project)
{ {