diff options
Diffstat (limited to 'update_reserved_status_mo.ktr')
| -rw-r--r-- | update_reserved_status_mo.ktr | 201 |
1 files changed, 105 insertions, 96 deletions
diff --git a/update_reserved_status_mo.ktr b/update_reserved_status_mo.ktr index 6687abf..7623c4e 100644 --- a/update_reserved_status_mo.ktr +++ b/update_reserved_status_mo.ktr @@ -504,6 +504,107 @@ </hop> </order> <step> + <name>Update</name> + <type>Update</type> + <description/> + <distribute>Y</distribute> + <custom_distribution/> + <copies>1</copies> + <partitioning> + <method>none</method> + <schema_name/> + </partitioning> + <connection>erp indoteknik production (localhost)</connection> + <skip_lookup>N</skip_lookup> + <commit>100</commit> + <use_batch>N</use_batch> + <error_ignored>N</error_ignored> + <ignore_flag_field/> + <lookup> + <schema>public</schema> + <table>mrp_production</table> + <key> + <name>production_id</name> + <field>id</field> + <condition>=</condition> + <name2/> + </key> + <value> + <name>date_reserved</name> + <rename>new_date_reserved</rename> + </value> + </lookup> + <attributes/> + <cluster_schema/> + <remotesteps> + <input> + </input> + <output> + </output> + </remotesteps> + <GUI> + <xloc>640</xloc> + <yloc>48</yloc> + <draw>Y</draw> + </GUI> + </step> + <step> + <name>javascript reserve state</name> + <type>ScriptValueMod</type> + <description/> + <distribute>Y</distribute> + <custom_distribution/> + <copies>1</copies> + <partitioning> + <method>none</method> + <schema_name/> + </partitioning> + <compatible>N</compatible> + <optimizationLevel>9</optimizationLevel> + <jsScripts> + <jsScript> + <jsScript_type>0</jsScript_type> + <jsScript_name>Script 1</jsScript_name> + <jsScript_script>var reserve_state = "waiting" +if(state == "done" && qty_done > 0){ + reserve_state = "done" +} +else if(state == "cancel"){ + reserve_state = "cancel" +} +else if(qty_reserved-qty_need==0 && qty_reserved > 0){ + reserve_state = "ready" +} +else{ + reserve_state = "waiting" +}</jsScript_script> + </jsScript> + </jsScripts> + <fields> + <field> + <name>reserve_state</name> + <rename>reserve_state</rename> + <type>String</type> + <length>-1</length> + <precision>-1</precision> + <replace>N</replace> + </field> + </fields> + <attributes/> + <cluster_schema/> + <remotesteps> + <input> + </input> + <output> + </output> + </remotesteps> + <GUI> + <xloc>336</xloc> + <yloc>48</yloc> + <draw>Y</draw> + </GUI> + </step> + <step> <name>outstanding manufacturing order</name> <type>TableInput</type> <description/> @@ -773,58 +874,11 @@ else{ }</jsScript_script> </jsScript> </jsScripts> - <fields> </fields> - <attributes/> - <cluster_schema/> - <remotesteps> - <input> - </input> - <output> - </output> - </remotesteps> - <GUI> - <xloc>480</xloc> - <yloc>48</yloc> - <draw>Y</draw> - </GUI> - </step> - <step> - <name>javascript reserve state</name> - <type>ScriptValueMod</type> - <description/> - <distribute>Y</distribute> - <custom_distribution/> - <copies>1</copies> - <partitioning> - <method>none</method> - <schema_name/> - </partitioning> - <compatible>N</compatible> - <optimizationLevel>9</optimizationLevel> - <jsScripts> - <jsScript> - <jsScript_type>0</jsScript_type> - <jsScript_name>Script 1</jsScript_name> - <jsScript_script>var reserve_state = "waiting" -if(state == "done" && qty_done > 0){ - reserve_state = "done" -} -else if(state == "cancel"){ - reserve_state = "cancel" -} -else if(qty_reserved-qty_need==0 && qty_reserved > 0){ - reserve_state = "ready" -} -else{ - reserve_state = "waiting" -}</jsScript_script> - </jsScript> - </jsScripts> <fields> <field> - <name>reserve_state</name> - <rename>reserve_state</rename> - <type>String</type> + <name>new_date_reserved</name> + <rename>new_date_reserved</rename> + <type>Timestamp</type> <length>-1</length> <precision>-1</precision> <replace>N</replace> @@ -839,52 +893,7 @@ else{ </output> </remotesteps> <GUI> - <xloc>336</xloc> - <yloc>48</yloc> - <draw>Y</draw> - </GUI> - </step> - <step> - <name>Update</name> - <type>Update</type> - <description/> - <distribute>Y</distribute> - <custom_distribution/> - <copies>1</copies> - <partitioning> - <method>none</method> - <schema_name/> - </partitioning> - <connection>erp indoteknik production (localhost)</connection> - <skip_lookup>N</skip_lookup> - <commit>100</commit> - <use_batch>N</use_batch> - <error_ignored>N</error_ignored> - <ignore_flag_field/> - <lookup> - <schema>public</schema> - <table>mrp_production</table> - <key> - <name>production_id</name> - <field>id</field> - <condition>=</condition> - <name2/> - </key> - <value> - <name>date_reserved</name> - <rename>new_date_reserved</rename> - </value> - </lookup> - <attributes/> - <cluster_schema/> - <remotesteps> - <input> - </input> - <output> - </output> - </remotesteps> - <GUI> - <xloc>640</xloc> + <xloc>480</xloc> <yloc>48</yloc> <draw>Y</draw> </GUI> |
