Fix price select did not fill in price

This commit is contained in:
nathan 2023-04-05 16:42:50 -06:00
parent 2c8656ebdc
commit e419287cfb
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@
<row class="row"> <row class="row">
<et2-description value="Price"></et2-description> <et2-description value="Price"></et2-description>
<projectmanager-pricelist id="pl_id" <projectmanager-pricelist id="pl_id"
onchange="window.app.infolog.et2.getWidgetById('info_price').set_value(this.options[this.selectedIndex].text.lastIndexOf('(') &lt; 0 ? '' : this.options[this.selectedIndex].text.slice(this.options[this.selectedIndex].text.lastIndexOf('(')+1,-1));" onchange="let option = this.select_options.find(e=>e.value == this.value) || {label:''};window.app.infolog.et2.getWidgetById('info_price').set_value(option.label.lastIndexOf('(') &lt; 0 ? '' : option.label.slice(option.label.lastIndexOf('(')+1,-1));"
emptyLabel="None" class="et2_fullWidth"/> emptyLabel="None" class="et2_fullWidth"/>
<et2-number id="info_price"></et2-number> <et2-number id="info_price"></et2-number>
<et2-description></et2-description> <et2-description></et2-description>

View File

@ -27,7 +27,7 @@
<et2-description value="Unitprice" for="ts_unitprice"></et2-description> <et2-description value="Unitprice" for="ts_unitprice"></et2-description>
<et2-hbox disabled="@pm_integration=none" > <et2-hbox disabled="@pm_integration=none" >
<projectmanager-pricelist id="pl_id" class="et2_fullWidth" <projectmanager-pricelist id="pl_id" class="et2_fullWidth"
onchange="window.app.timesheet.et2.getWidgetById('ts_unitprice').set_value(this.options[this.selectedIndex].text.lastIndexOf('(') &lt; 0 ? '' : this.options[this.selectedIndex].text.slice(this.options[this.selectedIndex].text.lastIndexOf('(')+1,-1));" onchange="let option = this.select_options.find(e=>e.value == this.value) || {label:''};window.app.timesheet.et2.getWidgetById('ts_unitprice').set_value(option.label.lastIndexOf('(') &lt; 0 ? '' : option.label.slice(option.label.lastIndexOf('(')+1,-1));"
emptyLabel="None"/> emptyLabel="None"/>
</et2-hbox> </et2-hbox>
<et2-description></et2-description> <et2-description></et2-description>