#-------------------------------------------------- # メイン処理 #-------------------------------------------------- ## 初期処理 [Form_Init] this = centering this = subroutine(Sub_loadStaticCombos) txt_money_wp = configinput(number,17) #txt_unit_price_wp = configinput(number,8) txt_sum_weight_wp = configinput(number,8) txt_sum_money_wp_tei = configinput(number,15) #txt_sum_unit_price_wp = configinput(number,8) #txt_sum_unit_price_hantei = configinput(number,8) #txt_sum_unit_price_sai = configinput(number,8) txt_sum_money_wp = configinput(number,15) txt_sum_money_hantei = configinput(number,15) txt_sum_money_sai = configinput(number,15) spd_list = configlistfieldnames(cd_supplier,name_supplier,cd_shipment,name_shipment,cd_wp,name_wp,cd_grade,unit_price_wp,weight_wp,money_wp,flg_lowplice,flg_delete,tm_ship) this = subroutine(Sub_debugOff) #2014.04.11 M.Inoue start Frame8 = visible(false) #2014.04.11 M.Inoue end #this = subroutine(Sub_debugOn) ## 新規登録モード [Form_Insert] this = eventlocked(true) this = subroutine(Sub_Init) txt_editmode = string(ins) this = subroutine(Sub_dispInsMode) this = subroutine(Sub_loadInitialItems) this = subroutine(Sub_loadNowDateIns) this = subroutine(Sub_unlockedHeaderIns) this = subroutine(Sub_lockedBody) #2014.04.11 M.Inoue start Frame8 = visible(false) #2014.04.11 M.Inoue end this = eventlocked(false) @form = changed(false) txt_dts_year = setfocus() ## 修正準備モード [Form_PreUpdate] this = eventlocked(true) this = subroutine(Sub_Init) txt_editmode = string(upd) this = subroutine(Sub_dispUpdMode) this = subroutine(Sub_loadNowDateIns) txt_dt_shipslip = dateby3parts(txt_dts_year,txt_dts_month,txt_dts_day) this = subroutine(Sub_unlockedHeaderUpd) this = subroutine(Sub_loadHeaderCombos) this = subroutine(Sub_loadSearchCombos) this = subroutine(Sub_lockedBody) #2014.04.11 M.Inoue start Frame8 = visible(true) #2014.04.11 M.Inoue end this = eventlocked(false) @form = changed(false) txt_dts_year = setfocus() ## 削除準備モード [Form_PreDelete] this = eventlocked(true) this = subroutine(Sub_Init) txt_editmode = string(del) this = subroutine(Sub_dispDelMode) this = subroutine(Sub_loadNowDateIns) txt_dt_shipslip = dateby3parts(txt_dts_year,txt_dts_month,txt_dts_day) this = subroutine(Sub_unlockedHeaderUpd) this = subroutine(Sub_loadHeaderCombos) this = subroutine(Sub_loadSearchCombos) this = subroutine(Sub_lockedBody) #2014.04.11 M.Inoue start Frame8 = visible(true) #2014.04.11 M.Inoue end this = eventlocked(false) @form = changed(false) txt_dts_year = setfocus() ## 修正確定モード [Form_Update] this = eventlocked(true) this = subroutine(Sub_refreshHeader) txt_dts_year = formatstring(0000) txt_dts_month = formatstring(00) txt_dts_day = formatstring(00) this = subroutine(Sub_lockedHeaderUpd) this = subroutine(Sub_lockedBody) this = subroutine(Sub_refreshMiddle) this = subroutine(Sub_calcHantei) this = subroutine(Sub_calcSummary) this = eventlocked(false) ## 削除確定モード [Form_Delete] this = eventlocked(true) this = subroutine(Sub_refreshHeader) this = subroutine(Sub_lockedHeader) this = subroutine(Sub_unlockedBodyDelete) this = subroutine(Sub_refreshMiddle) this = subroutine(Sub_calcHantei) this = subroutine(Sub_calcSummary) txt_dts_year = formatstring(0000) txt_dts_month = formatstring(00) txt_dts_day = formatstring(00) this = eventlocked(false) ## 投入開始(新規) [Form_EditIns] this = eventlocked(true) this = subroutine(Sub_lockedHeader) this = subroutine(Sub_unlockedBodyEdit) this = subroutine(Sub_refreshMiddle) this = subroutine(Sub_calcHantei) this = subroutine(Sub_calcSummary) this = eventlocked(false) #2014.04.11 M.Inoue start txt_cd_supplier = setfocus() #2014.04.11 M.Inoue end tim_auto = enabled(true) ## 投入開始(修正) [Form_EditUpd] this = eventlocked(true) this = subroutine(Sub_lockedHeader) this = subroutine(Sub_unlockedBodyEdit) this = subroutine(Sub_refreshMiddle) this = subroutine(Sub_calcHantei) this = subroutine(Sub_calcSummary) #2014.04.11 M.Inoue start txt_cd_supplier = setfocus() #2014.04.11 M.Inoue end this = eventlocked(false) ## キャンセル処理 [Form_CancelIns] this = subroutine(Form_Insert) [Form_CancelUpd] this = subroutine(Form_PreUpdate) [Form_CancelDel] this = subroutine(Form_PreDelete) ## クリア処理 [Form_Clear] this = subroutine(Sub_clearMiddle) this = subroutine(Sub_unlockedList) ## 新規保存後処理 [Form_SaveInsFinish] this = subroutine(Sub_saveInitialItems) this = subroutine(Form_Insert) #@form = action(edit) #txt_cd_supplier = setfocus() txt_cd_staff = setfocus() ## 修正保存後処理 [Form_SaveUpdFinish] this = subroutine(Form_PreUpdate) ## 削除保存後処理 [Form_SaveDelFinish] this = subroutine(Form_PreDelete) ## 明細内容の反映 [Form_SettingMiddle] this = eventlocked(true) this = subroutine(Sub_refreshMiddle) this = eventlocked(false) ## 明細追加後処理 [Form_ListAddFinish] this = subroutine(Sub_clearMiddle) this = subroutine(Sub_unlockedList) this = subroutine(Sub_calcSummary) ## 明細修正前処理 [Form_ListUpdStart] this = subroutine(Sub_lockedList) ## 明細修正後処理 [Form_ListUpdFinish] this = subroutine(Sub_clearMiddle) this = subroutine(Sub_unlockedList) this = subroutine(Sub_calcSummary) ## 明細削除後処理 [Form_ListDelFinish] #this = subroutine(Sub_clearMiddle) this = subroutine(Sub_unlockedList) this = subroutine(Sub_calcSummary) ## 故紙在庫読込時処理 [Form_LoadStockWp] this = subroutine(Sub_calcMoneyWp) ## 最新状態へ更新 [Form_Refresh] @form = eventlocked(true) @form = subroutine(Sub_loadNowDateIns) @form = eventlocked(false) #2014.03.07 M.Inoue Start #在庫計算 [Form_Selected_Calc] this = subroutine(Sub_Stock_WP) this = subroutine(Sub_Stock_Calc) [Form_Selected_Calc2] this = subroutine(Sub_Stock_WP) this = subroutine(Sub_Stock_Calc2) #2014.03.07 M.Inoue End #-------------------------------------------------- # イベントトラップ #-------------------------------------------------- ## 投入日付 [txt_dts_year_LostFocus] @form = eventlocked(true) this = formatstring(0000) @form = subroutine(Sub_changedDts) @form = eventlocked(false) [txt_dts_month_LostFocus] @form = eventlocked(true) this = formatstring(00) @form = subroutine(Sub_changedDts) @form = eventlocked(false) [txt_dts_day_LostFocus] @form = eventlocked(true) this = formatstring(00) @form = subroutine(Sub_changedDts) @form = eventlocked(false) ## 担当者 [txt_cd_staff_LostFocus] @form = eventlocked(true) cmb_cd_staff = copystring(txt_cd_staff) txt_cd_staff = copystring(cmb_cd_staff) @form = eventlocked(false) [cmb_cd_staff_Click] @form = eventlocked(true) txt_cd_staff = copystring(cmb_cd_staff) @form = eventlocked(false) ## パルパー [txt_cd_pulper_LostFocus] @form = eventlocked(true) cmb_cd_pulper = copystring(txt_cd_pulper) @form = eventlocked(false) [cmb_cd_pulper_Click] @form = eventlocked(true) txt_cd_pulper = copystring(cmb_cd_pulper) @form = subroutine(Sub_loadNoBatch) @form = eventlocked(false) ## バッチNO [txt_no_batch_LostFocus] @form = eventlocked(true) cmb_no_batch = copystring(txt_no_batch) @form = eventlocked(false) [cmb_no_batch_Click] @form = eventlocked(true) txt_no_batch = copystring(cmb_no_batch) @form = eventlocked(false) ## 得意先 [txt_cd_customer_LostFocus] @form = eventlocked(true) cmb_cd_customer = copystring(txt_cd_customer) txt_cd_customer = copystring(cmb_cd_customer) @form = subroutine(Sub_changedCustomer) @form = eventlocked(false) [cmb_cd_customer_Click] @form = eventlocked(true) txt_cd_customer = copystring(cmb_cd_customer) @form = subroutine(Sub_changedCustomer) @form = eventlocked(false) ## 得意先検索用 [txt_cd_customer_search_LostFocus] @form = eventlocked(true) cmb_cd_customer_search = copystring(txt_cd_customer_search) txt_cd_customer_search = copystring(cmb_cd_customer_search) @form = eventlocked(false) [cmb_cd_customer_search_Click] @form = eventlocked(true) txt_cd_customer_search = copystring(cmb_cd_customer_search) @form = eventlocked(false) ## 納品先 [txt_cd_derivery_LostFocus] @form = eventlocked(true) cmb_cd_derivery = copystring(txt_cd_derivery) txt_cd_derivery = copystring(cmb_cd_derivery) @form = subroutine(Sub_changedDerivery) @form = eventlocked(false) [cmb_cd_derivery_Click] @form = eventlocked(true) txt_cd_derivery = copystring(cmb_cd_derivery) @form = subroutine(Sub_changedDerivery) @form = eventlocked(false) ## 納品先検索用 [txt_cd_derivery_search_LostFocus] @form = eventlocked(true) cmb_cd_derivery_search = copystring(txt_cd_derivery_search) txt_cd_derivery_search = copystring(cmb_cd_derivery_search) @form = eventlocked(false) [cmb_cd_derivery_search_Click] @form = eventlocked(true) txt_cd_derivery_search = copystring(cmb_cd_derivery_search) @form = eventlocked(false) ## 製品 [txt_cd_product_LostFocus] @form = eventlocked(true) cmb_cd_product = copystring(txt_cd_product) txt_cd_product = copystring(cmb_cd_product) @form = subroutine(Sub_changedProduct) @form = eventlocked(false) [cmb_cd_product_Click] @form = eventlocked(true) txt_cd_product = copystring(cmb_cd_product) @form = subroutine(Sub_changedProduct) @form = eventlocked(false) ## 製品 [txt_cd_product_search_LostFocus] @form = eventlocked(true) cmb_cd_product_search = copystring(txt_cd_product_search) txt_cd_product_search = copystring(cmb_cd_product_search) @form = eventlocked(false) [cmb_cd_product_search_Click] @form = eventlocked(true) txt_cd_product_search = copystring(cmb_cd_product_search) @form = eventlocked(false) ## 仕入先 [txt_cd_supplier_LostFocus] @form = eventlocked(true) cmb_cd_supplier = copystring(txt_cd_supplier) txt_cd_supplier = copystring(cmb_cd_supplier) @form = subroutine(Sub_changedSupplier) @form = eventlocked(false) [cmb_cd_supplier_Click] @form = eventlocked(true) txt_cd_supplier = copystring(cmb_cd_supplier) @form = subroutine(Sub_changedSupplier) @form = eventlocked(false) ## 荷送先 [txt_cd_shipment_LostFocus] @form = eventlocked(true) cmb_cd_shipment = copystring(txt_cd_shipment) txt_cd_shipment = copystring(cmb_cd_shipment) @form = subroutine(Sub_changedShipment) @form = eventlocked(false) [cmb_cd_shipment_Click] @form = eventlocked(true) txt_cd_shipment = copystring(cmb_cd_shipment) @form = subroutine(Sub_changedShipment) @form = eventlocked(false) ## 銘柄 [txt_cd_wp_LostFocus] @form = eventlocked(true) cmb_cd_wp = copystring(txt_cd_wp) txt_cd_wp = copystring(cmb_cd_wp) @form = subroutine(Sub_changedWp) @form = eventlocked(false) [cmb_cd_wp_Click] @form = eventlocked(true) txt_cd_wp = copystring(cmb_cd_wp) @form = subroutine(Sub_changedWp) @form = eventlocked(false) ## タイプ [txt_cd_grade_LostFocus] @form = eventlocked(true) cmb_cd_grade = copystring(txt_cd_grade) txt_cd_grade = copystring(cmb_cd_grade) @form = subroutine(Sub_changedGrade) @form = eventlocked(false) [cmb_cd_grade_Click] @form = eventlocked(true) txt_cd_grade = copystring(cmb_cd_grade) @form = subroutine(Sub_changedGrade) @form = eventlocked(false) ## 重量 [txt_weight_wp_LostFocus] @form = subroutine(Sub_calcMoneyWp) ## 単価 [txt_unit_price_wp_LostFocus] @form = subroutine(Sub_calcMoneyWp) ## タイマー [tim_auto_Timer] @form = action(refresh,auto) ### Del M.tsujinaka 2003/06/11 自動更新の削除 Start #@form = action(save,auto) ### Del M.tsujinaka 2003/06/11 自動更新の削除 End #-------------------------------------------------- # サブルーチン #-------------------------------------------------- ## 初期処理 [Sub_Init] @form = clearall spd_list = setlistcount(0) txt_termid = termid txt_marume_kbn = string(round) txt_marume_keta = string(0) txt_freemessage = message(NSP0030,info.saiinfo) tim_auto = enabled(false) ## ヘッダ部の整合性をとる [Sub_refreshHeader] txt_dt_shipslip = dateby3parts(txt_dts_year,txt_dts_month,txt_dts_day) @form = subroutine(Sub_loadHeaderCombos) @from = subroutine(Sub_loadSearchCombos) @form = subroutine(Sub_loadNoBatch) cmb_cd_staff = copystring(txt_cd_staff) cmb_cd_pulper = copystring(txt_cd_pulper) cmb_no_batch = copystring(txt_no_batch) cmb_cd_customer = copystring(txt_cd_customer) cmb_cd_derivery = copystring(txt_cd_derivery) cmb_cd_product = copystring(txt_cd_product) txt_cd_staff = copystring(cmb_cd_staff) txt_cd_pulper = copystring(cmb_cd_pulper) txt_no_batch = copystring(cmb_no_batch) txt_cd_customer = copystring(cmb_cd_customer) txt_cd_derivery = copystring(cmb_cd_derivery) txt_cd_product = copystring(cmb_cd_product) cmb_cd_customer_search = copystring(txt_cd_customer_search) cmb_cd_derivery_search = copystring(txt_cd_derivery_search) cmb_cd_product_search = copystring(txt_cd_product_search) txt_cd_customer_search = copystring(cmb_cd_customer_search) txt_cd_derivery_search = copystring(cmb_cd_derivery_search) txt_cd_product_search = copystring(cmb_cd_product_search) @form = subroutine(Sub_changedProduct) ## 中央部(投入情報)の整合性をとる [Sub_refreshMiddle] @form = subroutine(Sub_loadMiddleCombos) cmb_cd_supplier = copystring(txt_cd_supplier) cmb_cd_shipment = copystring(txt_cd_shipment) cmb_cd_wp = copystring(txt_cd_wp) cmb_cd_grade = copystring(txt_cd_grade) txt_cd_supplier = copystring(cmb_cd_supplier) txt_cd_shipment = copystring(cmb_cd_shipment) txt_cd_wp = copystring(cmb_cd_wp) txt_cd_grade = copystring(cmb_cd_grade) ## 固定コンボボックス作成 [Sub_loadStaticCombos] cmb_cd_staff = loadcombo(activestaff,cd_staff,name_staff,true) cmb_cd_pulper = loadcombo(pulper,cd_pulper,name_pulper,true) ## ヘッダ部のコンボボックス作成 [Sub_loadHeaderCombos] cmb_cd_customer = loadcombo(activecustomer,cd_customer,name_customer,true,txt_dt_shipslip) cmb_cd_derivery = loadcombo(activederivery,cd_derivery,name_derivery,true,txt_dt_shipslip,txt_cd_customer) cmb_cd_product = loadcombo(activeproduct,cd_product,name_product,true,txt_dt_shipslip,txt_cd_derivery) ##ヘッダ部検索用コンボボックス作成(20140130 M.Inoue) [Sub_loadSearchCombos] cmb_cd_customer_search = loadcombo(activecustomer,cd_customer,name_customer,true,txt_dt_shipslip) cmb_cd_derivery_search = loadcombo(activederivery_search,cd_derivery,name_derivery,true,txt_dt_shipslip) cmb_cd_product_search = loadcombo(activeproduct_search,cd_product,name_product,true,txt_dt_shipslip) ## 中央部(投入情報)のコンボボックス作成 [Sub_loadMiddleCombos] cmb_cd_supplier = loadcombo(activesupplier,cd_supplier,name_supplier,true,txt_dt_shipslip) cmb_cd_shipment = loadcombo(activeshipment,cd_shipment,name_shipment,true,txt_dt_shipslip,txt_cd_supplier) cmb_cd_wp = loadcombo(activewp,cd_wp,name_grade,true,txt_dt_shipslip,txt_cd_supplier,txt_cd_shipment) #cmb_cd_grade = loadcombo(activegrade,cd_grade,name_grade,true,txt_dt_shipslip,txt_cd_wp) cmb_cd_grade = loadcombo(activegrade,cd_grade,name_gread,false) ## 中央部(投入情報)のクリア [Sub_clearMiddle] txt_cd_supplier = clear txt_cd_shipment = clear txt_cd_wp = clear txt_cd_grade = clear cmb_cd_supplier = copystring(txt_cd_supplier) cmb_cd_shipment = copystring(txt_cd_shipment) cmb_cd_wp = copystring(txt_cd_wp) cmb_cd_grade = copystring(txt_cd_grade) txt_weight_wp = clear txt_unit_price_wp = clear txt_money_wp = clear #2014.03.07 M.inoue Start txt_weight_stock = clear txt_weight_stock_old = clear txt_weight_stock_temp = clear txt_weight_calc = clear txt_cd_wp_old = clear txt_cd_wp_grade_old = clear #2014.03.07 M.inoue End ## ヘッダ部のロック [Sub_lockedHeader] txt_dts_year = enabled(false) txt_dts_month = enabled(false) txt_dts_day = enabled(false) txt_cd_staff = enabled(false) cmb_cd_staff = enabled(false) cmb_cd_pulper = enabled(false) cmb_no_batch = enabled(false) txt_cd_customer = enabled(false) cmb_cd_customer = enabled(false) txt_cd_derivery = enabled(false) cmb_cd_derivery = enabled(false) txt_cd_product = enabled(false) cmb_cd_product = enabled(false) cmd_edit = enabled(false) cmd_search = enabled(false) txt_cd_customer_search = enabled(false) cmb_cd_customer_search = enabled(false) txt_cd_derivery_search = enabled(false) cmb_cd_derivery_search = enabled(false) txt_cd_product_search = enabled(false) cmb_cd_product_search = enabled(false) ## ヘッダ部のロック(修正検索後) [Sub_lockedHeaderUpd] txt_dts_year = enabled(false) txt_dts_month = enabled(false) txt_dts_day = enabled(false) txt_cd_staff = enabled(true) cmb_cd_staff = enabled(true) cmb_cd_pulper = enabled(false) cmb_no_batch = enabled(false) txt_cd_customer = enabled(true) cmb_cd_customer = enabled(true) txt_cd_derivery = enabled(true) cmb_cd_derivery = enabled(true) txt_cd_product = enabled(true) cmb_cd_product = enabled(true) cmd_edit = enabled(true) cmd_search = enabled(false) txt_cd_customer_search = enabled(false) cmb_cd_customer_search = enabled(false) txt_cd_derivery_search = enabled(false) cmb_cd_derivery_search = enabled(false) txt_cd_product_search = enabled(false) cmb_cd_product_search = enabled(false) ## ヘッダ部のロック解除(新規) [Sub_unlockedHeaderIns] txt_dts_year = enabled(true) txt_dts_month = enabled(true) txt_dts_day = enabled(true) txt_cd_staff = enabled(true) cmb_cd_staff = enabled(true) ##cmb_cd_pulper = enabled(true) cmb_cd_pulper = enabled(false) cmb_no_batch = enabled(false) txt_cd_customer = enabled(true) cmb_cd_customer = enabled(true) txt_cd_derivery = enabled(true) cmb_cd_derivery = enabled(true) txt_cd_product = enabled(true) cmb_cd_product = enabled(true) cmd_edit = enabled(true) cmd_search = enabled(false) txt_cd_customer_search = enabled(false) cmb_cd_customer_search = enabled(false) txt_cd_derivery_search = enabled(false) cmb_cd_derivery_search = enabled(false) txt_cd_product_search = enabled(false) cmb_cd_product_search = enabled(false) ## ヘッダ部のロック解除(修正/削除) [Sub_unlockedHeaderUpd] txt_dts_year = enabled(true) txt_dts_month = enabled(true) txt_dts_day = enabled(true) txt_cd_staff = enabled(true) cmb_cd_staff = enabled(true) ##cmb_cd_pulper = enabled(true) cmb_cd_pulper = enabled(false) cmb_no_batch = enabled(true) txt_cd_customer = enabled(false) cmb_cd_customer = enabled(false) txt_cd_derivery = enabled(false) cmb_cd_derivery = enabled(false) txt_cd_product = enabled(false) cmb_cd_product = enabled(false) cmd_edit = enabled(false) cmd_search = enabled(true) txt_cd_customer_search = enabled(true) cmb_cd_customer_search = enabled(true) txt_cd_derivery_search = enabled(true) cmb_cd_derivery_search = enabled(true) txt_cd_product_search = enabled(true) cmb_cd_product_search = enabled(true) ## 本体のロック [Sub_lockedBody] txt_cd_supplier = enabled(false) cmb_cd_supplier = enabled(false) txt_cd_shipment = enabled(false) cmb_cd_shipment = enabled(false) txt_cd_wp = enabled(false) cmb_cd_wp = enabled(false) txt_cd_grade = enabled(false) cmb_cd_grade = enabled(false) txt_weight_wp = enabled(false) txt_unit_price_wp = enabled(false) txt_money_wp = enabled(false) @form = subroutine(Sub_lockedList) cmd_clear = enabled(false) cmd_listedit = enabled(false) cmd_save = enabled(false) cmd_calc = enabled(false) #2017.08.23 M.Inoue add cmd_wpsearch = enabled(false) ## 本体のロック解除(新規/修正) [Sub_unlockedBodyEdit] txt_cd_supplier = enabled(true) cmb_cd_supplier = enabled(true) txt_cd_shipment = enabled(true) cmb_cd_shipment = enabled(true) txt_cd_wp = enabled(true) cmb_cd_wp = enabled(true) txt_cd_grade = enabled(true) cmb_cd_grade = enabled(true) txt_weight_wp = enabled(true) #txt_unit_price_wp = enabled(true) txt_unit_price_wp = enabled(false) #txt_money_wp = enabled(true) txt_money_wp = enabled(false) @form = subroutine(Sub_unlockedList) cmd_clear = enabled(true) cmd_listedit = enabled(true) cmd_save = enabled(true) cmd_calc = enabled(true) #2017.08.23 M.Inoue add cmd_wpsearch = enabled(true) ## 本体のロック解除(削除) [Sub_unlockedBodyDelete] txt_cd_supplier = enabled(false) cmb_cd_supplier = enabled(false) txt_cd_shipment = enabled(false) cmb_cd_shipment = enabled(false) txt_cd_wp = enabled(false) cmb_cd_wp = enabled(false) txt_cd_grade = enabled(false) cmb_cd_grade = enabled(false) txt_weight_wp = enabled(false) txt_unit_price_wp = enabled(false) txt_money_wp = enabled(false) @form = subroutine(Sub_lockedList) cmd_clear = enabled(false) cmd_listedit = enabled(false) cmd_save = enabled(true) cmd_calc = enabled(true) #2017.08.23 M.Inoue add cmd_wpsearch = enabled(false) ## 明細のロック [Sub_lockedList] #2014.04.09 M.Inoue start #spd_list = enabled(false) #2014.04.09 M.Inoue end txt_listeditmode = string() cmd_listupdate = enabled(false) cmd_listdelete = enabled(false) ## 明細のロック解除 [Sub_unlockedList] spd_list = enabled(true) txt_listeditmode = string() cmd_listupdate = enabled(true) cmd_listdelete = enabled(true) ## 日付変更時の処理 [Sub_changedDts] #txt_dt_shipslip = dateby3parts(txt_dts_year,txt_dts_month,txt_dts_day) @form = subroutine(Sub_refreshHeader) ## 仕入先変更時の処理 [Sub_changedSupplier] cmb_cd_shipment = loadcombo(activeshipment,cd_shipment,name_shipment,true,txt_dt_shipslip,txt_cd_supplier) txt_cd_shipment = copystring(cmb_cd_shipment) @form = subroutine(Sub_changedShipment) ## 荷送先変更時の処理 [Sub_changedShipment] cmb_cd_wp = loadcombo(activewp,cd_wp,name_grade,true,txt_dt_shipslip,txt_cd_supplier,txt_cd_shipment) txt_cd_wp = copystring(cmb_cd_wp) @form = subroutine(Sub_changedWp) ## 銘柄変更時の処理 [Sub_changedWp] txt_cd_wp_grade = codeliststring(activewp,cd_grade,txt_dt_shipslip,txt_cd_supplier,txt_cd_shipment,txt_cd_wp) txt_cd_grade = copystring(txt_cd_wp_grade) @form = subroutine(Sub_changedGrade) ## タイプ変更時の処理 [Sub_changedGrade] cmb_cd_grade = copystring(txt_cd_grade) @form = action(loadstockwp) ## 得意先変更時の処理 [Sub_changedCustomer] cmb_cd_derivery = loadcombo(activederivery,cd_derivery,name_derivery,true,txt_dt_shipslip,txt_cd_customer) txt_cd_derivery = copystring(cmb_cd_derivery) @form = subroutine(Sub_changedDerivery) ## 納品先変更時の処理 [Sub_changedDerivery] cmb_cd_product = loadcombo(activeproduct,cd_product,name_product,true,txt_dt_shipslip,txt_cd_derivery) txt_cd_product = copystring(cmb_cd_product) @form = subroutine(Sub_changedProduct) ## 製品変更時の処理 [Sub_changedProduct] txt_cd_grade_product = codeliststring(activeproduct,cd_gread,txt_dt_shipslip,txt_cd_derivery,txt_cd_product) txt_name_grade_product = codeliststring(activeproduct,name_gread,txt_dt_shipslip,txt_cd_derivery,txt_cd_product) ## 日付変更(新規) [Sub_loadNowDateIns] #txt_dts_year = sysdate(year,0700) #txt_dts_month = sysdate(month,0700) #txt_dts_day = sysdate(day,0700) @form = sysdateparts(txt_dts_year,txt_dts_month,txt_dts_day,0700) @form = subroutine(Sub_changedDts) ## バッチNOの取得 [Sub_loadNoBatch] @form = action(loadbatch) ## 投入金額の計算 [Sub_calcMoneyWp] #txt_money_wp = fixedmultiply(round,0,txt_weight_wp,txt_unit_price_wp) txt_money_wp = fixedmultiply(txt_marume_kbn,txt_marume_keta,txt_weight_wp,txt_unit_price_wp) ## 低単価判定基準額の計算 [Sub_calcHantei] @form = action(loadhantei) ## 各合計欄の計算 [Sub_calcSummary] @form = action(loadsummary) #在庫データを取得する [Sub_Stock_WP] txt_weight_stock = codeliststring(activestockwp,weight_stock,txt_dt_shipslip,txt_cd_supplier,txt_cd_shipment,txt_cd_wp,txt_cd_grade) #2014.03.07 M.Inoue start #在庫への加算をシミュレートする [Sub_Stock_Calc] txt_weight_calc = add(txt_weight_stock,txt_weight_stock_old) txt_weight_stock_temp = minus(txt_weight_calc,txt_weight_wp) [Sub_Stock_Calc2] txt_weight_stock_temp = minus(txt_weight_stock,txt_weight_wp) #2014.03.07 M.Inoue end ## 初期値設定の読み込み [Sub_loadInitialItems] txt_cd_staff = getcookie(cd_staff) ##txt_cd_pulper = getcookie(cd_pulper) txt_cd_pulper = string(1) txt_cd_customer = getcookie(cd_customer) txt_cd_derivery = getcookie(cd_derivery) txt_cd_product = getcookie(cd_product) ## 初期値設定の書き込み [Sub_saveInitialItems] txt_cd_staff = setcookie(cd_staff) ##txt_cd_pulper = setcookie(cd_pulper) txt_cd_pulper = string(1) txt_cd_customer = setcookie(cd_customer) txt_cd_derivery = setcookie(cd_derivery) txt_cd_product = setcookie(cd_product) ## 処理選択表示 [Sub_dispInsMode] cmd_ins = backcolor(&HFFDFFF) cmd_upd = backcolor(&H8000000F&) cmd_del = backcolor(&H8000000F&) [Sub_dispUpdMode] cmd_ins = backcolor(&H8000000F&) cmd_upd = backcolor(&HFFDFFF) cmd_del = backcolor(&H8000000F&) [Sub_dispDelMode] cmd_ins = backcolor(&H8000000F&) cmd_upd = backcolor(&H8000000F&) cmd_del = backcolor(&HFFDFFF) ## 指定パルパー表示 [Sub_dispPulper1Mode] @form = backcolor(&H00FFFFC0&) [Sub_dispPulper2Mode] @form = backcolor(&H00C0C0FF&) ## デバッグ情報の制御 [Sub_debugOff] txt_no_shipslip = visible(false) txt_editmode = visible(false) txt_termid = visible(false) txt_cd_pulper = visible(false) txt_no_batch = visible(false) txt_dt_shipslip = visible(false) txt_cd_grade_product = visible(false) #2014.03.07 M.Inoue start txt_weight_stock = visible(false) txt_weight_calc = visible(false) txt_weight_stock_old = visible(false) txt_cd_wp_old = visible(false) txt_cd_wp_grade_old = visible(false) #2014.03.07 M.Inoue end txt_subselected = visible(false) txt_cd_wp_grade = visible(false) txt_cd_grade = visible(false) txt_listeditmode = visible(false) txt_listcount = visible(false) txt_listdelcount = visible(false) txt_marume_kbn = visible(false) txt_marume_keta = visible(false) txt_unit_price_hantei = visible(false) txt_tm_ship = visible(false) [Sub_debugOn] txt_no_shipslip = visible(true) txt_editmode = visible(true) txt_termid = visible(true) txt_cd_pulper = visible(true) txt_no_batch = visible(true) txt_dt_shipslip = visible(true) txt_cd_grade_product = visible(true) #2014.03.07 M.Inoue start txt_weight_stock = visible(true) txt_weight_calc = visible(true) txt_weight_stock_old = visible(true) txt_cd_wp_old = visible(true) txt_cd_wp_grade_old = visible(true) #2014.03.07 M.Inoue end txt_subselected = visible(true) txt_cd_wp_grade = visible(true) txt_cd_grade = visible(true) txt_listeditmode = visible(true) txt_listcount = visible(true) txt_listdelcount = visible(true) txt_marume_kbn = visible(true) txt_marume_keta = visible(true) txt_unit_price_hantei = visible(true) txt_tm_ship = visible(true)