#############################################
# �v���O�����A�`��������������Ă΂�鏈��
#############################################

#��ʋN����
[Form_Init]
this                               = centering
txt_money_wp_disp                  = configinput(number,10)
txt_money_wp_no_freight            = configinput(number,10)
txt_total_money_wp                 = configinput(number,10)
txt_money_wp                       = configinput(number,10)
txt_tax                            = configinput(number,10)
txt_total_money_wp_no_freight      = configinput(number,10)
txt_money_wp_no_freight_disp       = configinput(number,10)
txt_tax_no_freight                 = configinput(number,10)
#2014.06.09 M.Inoue start
txt_weight_stock_temp              = configinput(number,10)
txt_money_stock_temp               = configinput(number,10)
#20150807 MATSUI DEL �����_�ȉ����\������Ȃ�
#txt_unit_price_stock_temp          = configinput(number,10)
#20150807 MATSUI DEL �����_�ȉ����\������Ȃ�
#2014.06.09 M.Inoue end
#2014.04.11 M.Inoue start
Frame10                            = visible(false)
#2014.04.11 M.Inoue end
#this                               = subroutine(Sub_Debug_ON)
this                               = subroutine(Sub_Debug_OFF)

#��ʋN�����{�L�����Z���{�^��
[Form_Start]
this                               = eventlocked(true)
this                               = clearall
txt_termid                         = termid
cmd_search                         = enabled(false)
txt_supplier_search                = enabled(False)
cmb_supplier_search                = enabled(False)
txt_shipment_search                = enabled(False)
cmb_shipment_search                = enabled(False)
txt_wp_search                      = enabled(False)
cmb_wp_search                      = enabled(False)
this                               = subroutine(Sub_SearchEnabled_False)
this                               = subroutine(Sub_InputEnabled_False)
this                               = subroutine(Sub_FootEnabled_False)
txt_no_receiveslip                 = enabled(false)
cmd_cancel                         = enabled(True)
this                               = eventlocked(false)


#�V�K�{�C���{�폜�{�^���̋��L����
[Form_Common]
this                               = eventlocked(true)
this                               = clearall
txt_percent                        = string(0.01)
txt_termid                         = termid
this                               = subroutine(Sub_SearchEnabled_True)
this                               = subroutine(Sub_Calc)
txt_marumekbn                      = string(round)
txt_marumeketa                     = string(0)
txt_dts_year                       = setfocus()
this                               = eventlocked(false)


#�V�K�{�^��
[Form_Insert]
this                               = eventlocked(true)
txt_mode                           = string(ins)
txt_subselected                    = string(1)
this                               = subroutine(Sub_dispInsMode)
this                               = subroutine(Sub_Today)
#this                               = subroutine(Sub_GetCookie)
this                               = subroutine(Sub_Date)
this                               = subroutine(Sub_Tax)
cmd_search                         = enabled(false)
txt_supplier_search                = enabled(False)
cmb_supplier_search                = enabled(False)
txt_shipment_search                = enabled(False)
cmb_shipment_search                = enabled(False)
txt_wp_search                      = enabled(False)
cmb_wp_search                      = enabled(False)
this                               = subroutine(Sub_InputEnabled_True)
this                               = subroutine(Sub_FootEnabled_True)
this                               = subroutine(Sub_Load_AllCombo)
this                               = subroutine(Sub_Wp_Decided)
this                               = subroutine(Sub_LoadCombo_Grade_AutoSelected)
this                               = changed(false)
#2014.04.11 M.Inoue start
Frame10                            = visible(false)
#2014.04.11 M.Inoue end
this                               = eventlocked(false)

#�C���{�^��
[Form_Update]
this                               = eventlocked(true)
txt_mode                           = string(upd)
this                               = subroutine(Sub_dispUpdMode)
this                               = subroutine(Sub_Today)
this                               = subroutine(Sub_Date)
cmd_search                         = enabled(true)
txt_supplier_search                = enabled(true)
cmb_supplier_search                = enabled(true)
txt_shipment_search                = enabled(true)
cmb_shipment_search                = enabled(true)
txt_wp_search                      = enabled(true)
cmb_wp_search                      = enabled(true)
this                               = subroutine(Sub_InputEnabled_False)
this                               = subroutine(Sub_FootEnabled_False)
this                               = changed(false)
#2014.04.11 M.Inoue start
Frame10                            = visible(true)
#2014.04.11 M.Inoue end
this                               = eventlocked(false)


#�폜�{�^��
[Form_Delete]
this                               = eventlocked(true)
txt_mode                           = string(del)
this                               = subroutine(Sub_dispDelMode)
this                               = subroutine(Sub_Today)
this                               = subroutine(Sub_Date)
cmd_search                         = enabled(true)
txt_supplier_search                = enabled(true)
cmb_supplier_search                = enabled(true)
txt_shipment_search                = enabled(true)
cmb_shipment_search                = enabled(true)
txt_wp_search                      = enabled(true)
cmb_wp_search                      = enabled(true)
this                               = subroutine(Sub_InputEnabled_False)
this                               = subroutine(Sub_FootEnabled_False)
this                               = changed(false)
#2014.04.11 M.Inoue start
Frame10                            = visible(true)
#2014.04.11 M.Inoue end
this                               = eventlocked(false)


#�C���{�^������̎�����������{�^����̏���
[Form_Selected_Update]
this                               = eventlocked(true)
this                               = subroutine(Sub_Date)
this                               = subroutine(Sub_InputEnabled_True)
this                               = subroutine(Sub_FootEnabled_True)
this                               = subroutine(Sub_Load_AllCombo)
this                               = subroutine(Sub_FormatNum)
#2014.03.25 M.Inoue start
this                               = subroutine(Sub_Fsc_Flg)
#2014.03.25 M.Inoue end
txt_price_last                     = string()
txt_trnsport_last                  = string()
txt_area_last                      = string()
this                               = changed(false)
this                               = eventlocked(false)


#�폜�{�^������̎�����������{�^����̏���
[Form_Selected_Delete]
this                               = eventlocked(true)
this                               = subroutine(Sub_Date)
this                               = subroutine(Sub_InputEnabled_False)
this                               = subroutine(Sub_FootEnabled_True)
this                               = subroutine(Sub_Load_AllCombo)
this                               = subroutine(Sub_FormatNum)
#2014.03.25 M.Inoue start
this                               = subroutine(Sub_Fsc_Flg)
#2014.03.25 M.Inoue end
this                               = changed(false)
this                               = eventlocked(false)

#�V�K�o�^��ɌĂ΂�鏈��
[Form_AfterSave]
#this                               = subroutine(Sub_SetCookie)

#2014.03.07 M.Inoue Start
[Form_Selected_Calc]
this                               = subroutine(Sub_Stock_WP)
this                               = subroutine(Sub_Stock_Calc)

[Form_Selected_Calc_Minus]
this                               = subroutine(Sub_Stock_WP)
this                               = subroutine(Sub_Stock_Calc_Minus)
#2014.03.07 M.Inoue End

#2016.07.04 M.Inoue Start
[Form_Update_Init]
this                               = subroutine(txt_supplier_search_LostFocus)
this                               = subroutine(txt_shipment_search_LostFocus)
this                               = subroutine(txt_wp_search_LostFocus)
#2016.07.04 M.Inoue end

#############################################
# �e�R���g���[���̃C�x���g����
#############################################

#������t�i�N�j���X�g�t�H�[�J�X
[txt_dts_year_LostFocus]
@form                              = eventlocked(true)
this                               = subroutine(Sub_Date)
this                               = subroutine(Sub_Load_AllCombo)
this                               = subroutine(Sub_Tax)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#������t�i���j���X�g�t�H�[�J�X
[txt_dts_month_LostFocus]
@form                              = eventlocked(true)
this                               = subroutine(Sub_Date)
this                               = subroutine(Sub_Load_AllCombo)
this                               = subroutine(Sub_Tax)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#������t�i���j���X�g�t�H�[�J�X
[txt_dts_day_LostFocus]
@form                              = eventlocked(true)
this                               = subroutine(Sub_Date)
this                               = subroutine(Sub_Load_AllCombo)
this                               = subroutine(Sub_Tax)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#�d����e�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_supplier_LostFocus]
@form                              = eventlocked(true)
cmb_supplier                       = copystring(txt_supplier)
txt_supplier                       = copystring(cmb_supplier)
this                               = subroutine(Sub_LoadCombo_Shipment)
this                               = subroutine(Sub_LoadCombo_Wp_Supplier)
this                               = subroutine(Sub_LoadCombo_Wp)
this                               = subroutine(Sub_LoadCombo_Grade_AutoSelected)
this                               = subroutine(Sub_Wp_Decided)
#2014.03.07 M.Inoue Start
this                               = subroutine(Sub_Fsc_Flg)
#2014.03.07 M.Inoue End
@form                              = eventlocked(false)

#2014.03.06 M.Inoue start
#�����p�d����e�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_supplier_search_LostFocus]
@form                              = eventlocked(true)
cmb_supplier_search                = copystring(txt_supplier_search)
txt_supplier_search                = copystring(cmb_supplier_search)
@form                              = eventlocked(false)

#�����p�d����R���{�{�b�N�X�N���b�N
[cmb_supplier_search_Click]
@form                              = eventlocked(true)
txt_supplier_search                = copystring(cmb_supplier_search)
@form                              = eventlocked(false)
#2014.03.06 M.Inoue end

#�d����R���{�{�b�N�X�N���b�N
[cmb_supplier_Click]
@form                              = eventlocked(true)
txt_supplier                       = copystring(cmb_supplier)
this                               = subroutine(Sub_LoadCombo_Shipment)
this                               = subroutine(Sub_LoadCombo_Wp_Supplier)
this                               = subroutine(Sub_LoadCombo_Wp)
this                               = subroutine(Sub_LoadCombo_Grade_AutoSelected)
this                               = subroutine(Sub_Wp_Decided)
#2014.03.07 M.Inoue Start
this                               = subroutine(Sub_Fsc_Flg)
#2014.03.07 M.Inoue End
@form                              = eventlocked(false)


#�ב���e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_shipment_LostFocus]
@form                              = eventlocked(true)
cmb_shipment                       = copystring(txt_shipment)
txt_shipment                       = copystring(cmb_shipment)
this                               = subroutine(Sub_LoadCombo_Wp_Supplier)
this                               = subroutine(Sub_LoadCombo_Wp)
this                               = subroutine(Sub_LoadCombo_Grade_AutoSelected)
this                               = subroutine(Sub_Wp_Decided)
#2014.03.07 M.Inoue Start
this                               = subroutine(Sub_Fsc_Flg)
#2014.03.07 M.Inoue End
@form                              = eventlocked(false)

#�ב���R���{�{�b�N�X�N���b�N
[cmb_shipment_Click]
@form                              = eventlocked(true)
txt_shipment                       = copystring(cmb_shipment)
this                               = subroutine(Sub_LoadCombo_Wp_Supplier)
this                               = subroutine(Sub_LoadCombo_Wp)
this                               = subroutine(Sub_LoadCombo_Grade_AutoSelected)
this                               = subroutine(Sub_Wp_Decided)
#2014.03.07 M.Inoue Start
this                               = subroutine(Sub_Fsc_Flg)
#2014.03.07 M.Inoue End
@form                              = eventlocked(false)

#2014.03.06 M.Inoue Start
#�ב���e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_shipment_search_LostFocus]
@form                              = eventlocked(true)
cmb_shipment_search                = copystring(txt_shipment_search)
txt_shipment_search                = copystring(cmb_shipment_search)
@form                              = eventlocked(false)

#�ב���R���{�{�b�N�X�N���b�N
[cmb_shipment_search_Click]
@form                              = eventlocked(true)
txt_shipment_search                = copystring(cmb_shipment_search)
@form                              = eventlocked(false)
#2014.03.06 M.Inoue end


#�����e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_wp_LostFocus]
@form                              = eventlocked(true)
cmb_wp                             = copystring(txt_wp)
txt_wp                             = copystring(cmb_wp)
this                               = subroutine(Sub_LoadCombo_Wp_Supplier)
this                               = subroutine(Sub_LoadCombo_Grade_AutoSelected)
this                               = subroutine(Sub_Wp_Decided)
#2014.03.07 M.Inoue Start
this                               = subroutine(Sub_Fsc_Flg)
#2014.03.07 M.Inoue End
@form                              = eventlocked(false)

#�����R���{�{�b�N�X�N���b�N
[cmb_wp_Click]
@form                              = eventlocked(true)
txt_wp                             = copystring(cmb_wp)
this                               = subroutine(Sub_LoadCombo_Wp_Supplier)
this                               = subroutine(Sub_LoadCombo_Grade_AutoSelected)
this                               = subroutine(Sub_Wp_Decided)
#2014.03.07 M.Inoue Start
this                               = subroutine(Sub_Fsc_Flg)
#2014.03.07 M.Inoue End
@form                              = eventlocked(false)

#2014.03.06 M.Inoue Start
#�����p�����e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_wp_search_LostFocus]
@form                              = eventlocked(true)
cmb_wp_search                      = copystring(txt_wp_search)
txt_wp_search                      = copystring(cmb_wp_search)
@form                              = eventlocked(false)

#�����p�����R���{�{�b�N�X�N���b�N
[cmb_wp_search_Click]
@form                              = eventlocked(true)
txt_wp_search                      = copystring(cmb_wp_search)
@form                              = eventlocked(false)
#2014.03.06 M.Inoue End


#2014.02.12 M.Inoue �q������Ή� start
#�q������e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_wp_supplier_LostFocus]
@form                              = eventlocked(true)
cmb_wp_supplier                    = copystring(txt_wp_supplier)
txt_wp_supplier                    = copystring(cmb_wp_supplier)
this                               = subroutine(Sub_LoadCombo_Wp_Supplier)
@form                              = eventlocked(false)

#�q������R���{�{�b�N�X�N���b�N
[cmb_wp_supplier_Click]
@form                              = eventlocked(true)
txt_wp_supplier                    = copystring(cmb_wp_supplier)
@form                              = eventlocked(false)
#2014.02.12 M.Inoue �q������Ή� end


#�^�C�v�R���{�{�b�N�X�N���b�N
[cmb_grade_Click]
@form                              = eventlocked(true)
txt_grade                          = copystring(cmb_grade)
@form                              = eventlocked(false)

#�^����Ѓe�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_trnsport_LostFocus]
@form                              = eventlocked(true)
cmb_trnsport                       = copystring(txt_trnsport)
txt_trnsport                       = copystring(cmb_trnsport)
this                               = subroutine(Sub_LoadCombo_Area)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#�^����ЃR���{�{�b�N�X�N���b�N
[cmb_trnsport_Click]
@form                              = eventlocked(true)
txt_trnsport                       = copystring(cmb_trnsport)
this                               = subroutine(Sub_LoadCombo_Area)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#�n��e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_area_LostFocus]
@form                              = eventlocked(true)
cmb_area                           = copystring(txt_area)
txt_area                           = copystring(cmb_area)
this                               = subroutine(Sub_Price_Freight)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#�n��R���{�{�b�N�X�N���b�N
[cmb_area_Click]
@form                              = eventlocked(true)
txt_area                           = copystring(cmb_area)
this                               = subroutine(Sub_Price_Freight)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#�P���e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_unit_price_wp_LostFocus]
@form                              = eventlocked(true)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#�d�ʃe�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_weight_wp_LostFocus]
@form                              = eventlocked(true)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#�^���P���e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_price_unit_freight_LostFocus]
@form                              = eventlocked(true)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#����ŗ��e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_rate_tax_LostFocus]
@form                              = eventlocked(true)
this                               = subroutine(Sub_Calc)
@form                              = eventlocked(false)

#���z�e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_money_wp_disp_LostFocus]
@form                              = eventlocked(true)
this                               = subroutine(Sub_Calc_Money)
@form                              = eventlocked(false)

#�^���e�L�X�g�{�b�N�X���X�g�t�H�[�J�X
[txt_money_wp_no_freight_LostFocus]
@form                              = eventlocked(true)
this                               = subroutine(Sub_Calc_Money)
@form                              = eventlocked(false)



#############################################
# ���L���� 
#############################################

#�{�����t���Z�b�g
[Sub_Today]
#txt_dts_year                       = sysdate(year)
#txt_dts_month                      = sysdate(month)
#txt_dts_day                        = sysdate(day)
@form                              = sysdateparts(txt_dts_year,txt_dts_month,txt_dts_day)

#���t�̏����𐮂���
[Sub_Date]
txt_dts_year                       = formatstring(0000)
txt_dts_month                      = formatstring(00)
txt_dts_day                        = formatstring(00)
txt_dt_receiveslip                 = dateby3parts(txt_dts_year,txt_dts_month,txt_dts_day)

#����ŗ�
[Sub_Tax]
@form                              = action(tax,txt_rate_tax,txt_dt_receiveslip,1)

#�Čv�Z
[Sub_Calc]
#txt_money_wp_disp                  = multiply(txt_unit_price_wp,txt_weight_wp)
#txt_money_wp_no_freight            = multiply(txt_price_unit_freight,txt_weight_wp)
txt_money_wp_disp                  = fixedmultiply(txt_marumekbn,txt_marumeketa,txt_unit_price_wp,txt_weight_wp)
txt_money_wp_no_freight            = fixedmultiply(txt_marumekbn,txt_marumeketa,txt_price_unit_freight,txt_weight_wp)
txt_money_wp                       = add(txt_money_wp_disp,txt_money_wp_no_freight)
txt_money_wp_no_freight_disp       = copystring(txt_money_wp_disp)
txt_tax                            = fixedmultiply(txt_marumekbn,txt_marumeketa,txt_money_wp,txt_rate_tax,txt_percent)
txt_total_money_wp                 = add(txt_money_wp,txt_tax)
txt_tax_no_freight                 = fixedmultiply(txt_marumekbn,txt_marumeketa,txt_money_wp_no_freight_disp,txt_rate_tax,txt_percent)
txt_total_money_wp_no_freight      = add(txt_money_wp_no_freight_disp,txt_tax_no_freight)
this                               = subroutine(Sub_FormatNum)


#2016.07.12 add KSP K.Takahashi ���z�������͗p�̑Ή� ---------- Start
#�Čv�Z
[Sub_Calc_Money]
txt_money_wp                       = add(txt_money_wp_disp,txt_money_wp_no_freight)
txt_money_wp_no_freight_disp       = copystring(txt_money_wp_disp)
txt_tax                            = fixedmultiply(txt_marumekbn,txt_marumeketa,txt_money_wp,txt_rate_tax,txt_percent)
txt_total_money_wp                 = add(txt_money_wp,txt_tax)
txt_tax_no_freight                 = fixedmultiply(txt_marumekbn,txt_marumeketa,txt_money_wp_no_freight_disp,txt_rate_tax,txt_percent)
txt_total_money_wp_no_freight      = add(txt_money_wp_no_freight_disp,txt_tax_no_freight)
this                               = subroutine(Sub_FormatNum)
#2016.07.12 add KSP K.Takahashi ���z�������͗p�̑Ή� ----------   End

#���l�̏����ݒ�
[Sub_FormatNum]
#txt_money_wp_disp                 = formatstring(#########0.00)
#txt_money_wp_no_freight           = formatstring(#########0.00)
#txt_money_wp                      = formatstring(#########0.00)
#txt_money_wp_no_freight_disp      = formatstring(#########0.00)
txt_tax                            = formatstring(#########0)
txt_tax_no_freight                 = formatstring(#########0)
#txt_total_money_wp                = formatstring(#########0.00)
#txt_total_money_wp_no_freight     = formatstring(#########0.00)

#���������g�p�‚ɂ���
[Sub_SearchEnabled_True]
txt_dts_year                       = enabled(True)
txt_dts_month                      = enabled(True)
txt_dts_day                        = enabled(True)
#2014.03.06 M.Inoue Start
txt_supplier_search                = enabled(True)
cmb_supplier_search                = enabled(True)
txt_shipment_search                = enabled(True)
cmb_shipment_search                = enabled(True)
txt_wp_search                      = enabled(True)
cmb_wp_search                      = enabled(True)
#2014.03.06 M.Inoue End

#���������g�p�s�‚ɂ���
[Sub_SearchEnabled_False]
txt_dts_year                       = enabled(False)
txt_dts_month                      = enabled(False)
txt_dts_day                        = enabled(False)
#2014.03.06 M.Inoue Start
txt_supplier_search                = enabled(False)
cmb_supplier_search                = enabled(False)
txt_shipment_search                = enabled(False)
cmb_shipment_search                = enabled(False)
txt_wp_search                      = enabled(False)
cmb_wp_search                      = enabled(False)
#2014.03.06 M.Inoue End

#���͕����g�p�‚ɂ���
[Sub_InputEnabled_True]
txt_supplier                       = enabled(True)
cmb_supplier                       = enabled(True)
txt_shipment                       = enabled(True)
cmb_shipment                       = enabled(True)
txt_wp                             = enabled(True)
cmb_wp                             = enabled(True)
#2014.02.12 M.Inoue �q������Ή� start
txt_wp_supplier                    = enabled(True)
cmb_wp_supplier                    = enabled(True)
#2014.02.12 M.Inoue �q������Ή� end
cmb_grade                          = enabled(True)
txt_trnsport                       = enabled(True)
cmb_trnsport                       = enabled(True)
txt_area                           = enabled(True)
cmb_area                           = enabled(True)
txt_unit_price_wp                  = enabled(True)
txt_weight_wp                      = enabled(True)
txt_price_unit_freight             = enabled(True)
txt_rate_tax                       = enabled(True)
cmd_save                           = enabled(True)

#2016.07.12 add KSP K.Takahashi ���z�������͗p�̑Ή� ---------- Start
txt_money_wp_disp                  = enabled(True)
txt_money_wp_no_freight            = enabled(True)
#2016.07.12 add KSP K.Takahashi ���z�������͗p�̑Ή� ----------   End

#���͕����g�p�s�‚ɂ���
[Sub_InputEnabled_False]
txt_supplier                       = enabled(False)
cmb_supplier                       = enabled(False)
txt_shipment                       = enabled(False)
cmb_shipment                       = enabled(False)
txt_wp                             = enabled(False)
cmb_wp                             = enabled(False)
#2014.02.12 M.Inoue �q������Ή� start
txt_wp_supplier                    = enabled(False)
cmb_wp_supplier                    = enabled(False)
#2014.02.12 M.Inoue �q������Ή� end
cmb_grade                          = enabled(False)
txt_trnsport                       = enabled(False)
cmb_trnsport                       = enabled(False)
txt_area                           = enabled(False)
cmb_area                           = enabled(False)
txt_unit_price_wp                  = enabled(False)
txt_weight_wp                      = enabled(False)
txt_price_unit_freight             = enabled(False)
txt_rate_tax                       = enabled(false)


#2016.07.12 add KSP K.Takahashi ���z�������͗p�̑Ή� ---------- Start
txt_money_wp_disp                  = enabled(false)
txt_money_wp_no_freight            = enabled(false)
#2016.07.12 add KSP K.Takahashi ���z�������͗p�̑Ή� ----------   End


#�t�b�^�����g�p�‚ɂ���
[Sub_FootEnabled_True]
cmd_save                           = enabled(True)
cmd_calc                           = enabled(True)

#�t�b�^�����g�p�s�‚ɂ���
[Sub_FootEnabled_False]
cmd_save                           = enabled(False)
cmd_calc                           = enabled(False)

#�S�ẴR���{�{�b�N�X���쐬����
[Sub_Load_AllCombo]
this                               = subroutine(Sub_LoadCombo_Supplier)
this                               = subroutine(Sub_LoadCombo_Shipment)
this                               = subroutine(Sub_LoadCombo_Wp_Supplier)
this                               = subroutine(Sub_LoadCombo_Wp)
this                               = subroutine(Sub_LoadCombo_Grade)
this                               = subroutine(Sub_LoadCombo_Trnsport)
this                               = subroutine(Sub_LoadCombo_Area)
#2014.03.06 M.Inoue Start
this                               = subroutine(Sub_LoadCombo_Supplier_Search)
this                               = subroutine(Sub_LoadCombo_Shipment_Search)
this                               = subroutine(Sub_LoadCombo_Wp_Search)
#2014.03.06 M.Inoue End

#�d����̃R���{�{�b�N�X���쐬����
[Sub_LoadCombo_Supplier]
cmb_supplier                       = loadcombo(activesupplier,cd_supplier,name_supplier,true,txt_dt_receiveslip)
cmb_supplier                       = copystring(txt_supplier)
txt_supplier                       = copystring(cmb_supplier)

#2014.03.06 M.Inoue Start
#�����p�d����̃R���{�{�b�N�X���쐬����
[Sub_LoadCombo_Supplier_Search]
cmb_supplier_search                       = loadcombo(activesupplier,cd_supplier,name_supplier,true,txt_dt_receiveslip)
cmb_supplier_search                       = copystring(txt_supplier_search)
#2014.03.06 M.Inoue End

#�ב���̃R���{�{�b�N�X���쐬����
[Sub_LoadCombo_Shipment]
cmb_shipment                       = loadcombo(activeshipment,cd_shipment,name_shipment,true,txt_dt_receiveslip,txt_supplier)
cmb_shipment                       = copystring(txt_shipment)
txt_shipment                       = copystring(cmb_shipment)


#2014.03.06 M.Inoue Start
#�����p�ב���̃R���{�{�b�N�X���쐬����
[Sub_LoadCombo_Shipment_Search]
cmb_shipment_search                = loadcombo(activeshipment_search,cd_shipment,name_shipment,true,txt_dt_receiveslip)
cmb_shipment_search                = copystring(txt_shipment_search)
txt_shipment_search                = copystring(cmb_shipment_search)

#�����p�����̃R���{�{�b�N�X���쐬����
[Sub_LoadCombo_Wp_Search]
cmb_wp_search                      = loadcombo(activewp_search,cd_wp,name_grade,true,txt_dt_receiveslip)
cmb_wp_search                      = copystring(txt_wp_search)
txt_wp_search                      = copystring(cmb_wp_search)
#2014.03.06 M.Inoue End


#�����̃R���{�{�b�N�X���쐬����
[Sub_LoadCombo_Wp]
#2012.02.12 M.Inoue �q������Ή� start
cmb_wp                             = loadcombo(activewp,cd_wp,name_grade,true,txt_dt_receiveslip,txt_supplier,txt_shipment)
#2012.02.12 M.Inoue �q������Ή� start
cmb_wp                             = copystring(txt_wp)
txt_wp                             = copystring(cmb_wp)

#2012.02.12 M.Inoue �q������Ή� start
#�q������̃R���{�{�b�N�X���쐬����
[Sub_LoadCombo_Wp_Supplier]
cmb_wp_supplier                    = loadcombo(activewpsupplier,cd_wp_supplier,name_grade_supplier,true,txt_dt_receiveslip,txt_supplier,txt_wp)
cmb_wp_supplier                    = copystring(txt_wp_supplier)
txt_wp_supplier                    = copystring(cmb_wp_supplier)
#2012.02.12 M.Inoue �q������Ή� end

#�^�C�v�̃R���{�{�b�N�X���쐬����
[Sub_LoadCombo_Grade]
cmb_grade                          = loadcombo(activegrade,cd_grade,name_gread,true)
cmb_grade                          = copystring(txt_grade)
txt_grade                          = copystring(cmb_grade)

#�������O���[�h�̎����I��
[Sub_LoadCombo_Grade_AutoSelected]
cmb_grade                          = loadcombo(activegrade,cd_grade,name_gread,true)
txt_wp_grade                       = codeliststring(activewp,cd_grade,txt_dt_receiveslip,txt_supplier,txt_shipment,txt_wp)
cmb_grade                          = copystring(txt_wp_grade)
txt_grade                          = copystring(cmb_grade)


#�������莞�̏���
[Sub_Wp_Decided]
txt_price_last                     = codeliststring(activeshipmentwp,price_last,txt_dt_receiveslip,txt_shipment,txt_wp)
txt_unit_price_wp                  = copystring(txt_price_last)
txt_trnsport_last                  = codeliststring(activeshipment,cd_transport,txt_dt_receiveslip,txt_shipment)
txt_area_last                      = codeliststring(activeshipment,cd_area,txt_dt_receiveslip,txt_shipment)
txt_trnsport                       = copystring(txt_trnsport_last)
txt_area                           = copystring(txt_area_last)
this                               = subroutine(Sub_LoadCombo_Trnsport)
this                               = subroutine(Sub_LoadCombo_Area)
this                               = subroutine(Sub_Price_Freight)
this                               = subroutine(Sub_Calc)

#�^����Ђ̃R���{�{�b�N�X���쐬����
[Sub_LoadCombo_Trnsport]
cmb_trnsport                       = loadcombo(activetransport,cd_transport,name_trnsport,true,txt_dt_receiveslip)
cmb_trnsport                       = copystring(txt_trnsport)
txt_trnsport                       = copystring(cmb_trnsport)

#�n��̃R���{�{�b�N�X���쐬����
[Sub_LoadCombo_Area]
cmb_area                           = loadcombo(activearea,cd_area,name_area,true,txt_trnsport)
cmb_area                           = copystring(txt_area)
txt_area                           = copystring(cmb_area)

#�^���P�����擾����
[Sub_Price_Freight]
txt_price_freight                  = codeliststring(activefreight,price_freight,txt_trnsport,txt_area)
txt_unit_freight                   = codeliststring(activefreight,unit_freight,txt_trnsport,txt_area)
txt_price_unit_freight             = multiply(txt_price_freight,txt_unit_freight)

#2014.03.07 M.Inoue start
#FSC�t���O���擾����
[Sub_Fsc_Flg]
txt_fsc                            = codeliststring(activefsc,flg_fsc,txt_wp)
txt_fsc_cd                         = codeliststring(activefsccd,fsc_cd,txt_wp)

#�݌Ƀf�[�^���擾����
[Sub_Stock_WP]
txt_weight_stock                  = codeliststring(activestockwp,weight_stock,txt_dt_receiveslip,txt_supplier,txt_shipment,txt_wp,txt_grade)
txt_money_stock                   = codeliststring(activestockwp,money_stock,txt_dt_receiveslip,txt_supplier,txt_shipment,txt_wp,txt_grade)

#�݌ɂւ̉��Z���V�~�����[�g����
[Sub_Stock_Calc]
txt_weight_calc                   = minus(txt_weight_stock,txt_weight_stock_old)
txt_money_calc                    = minus(txt_money_stock,txt_money_stock_old)
txt_weight_stock_temp             = add(txt_weight_calc,txt_weight_wp)
txt_money_stock_temp              = add(txt_money_calc,txt_money_wp_disp)
#�폜���͎���ʂ����Z���Ȃ�
[Sub_Stock_Calc_Minus]
txt_weight_calc                   = minus(txt_weight_stock,txt_weight_stock_old)
txt_money_calc                    = minus(txt_money_stock,txt_money_stock_old)
txt_weight_stock_temp             = copystring(txt_weight_calc)
txt_money_stock_temp              = copystring(txt_money_calc)
#2014.03.07 M.Inoue end

## �����I��\��
[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)

#�N�b�L�[�ۑ�
[Sub_SetCookie]
#txt_dts_year                       = setCookie(txt_dts_year)
#txt_dts_month                      = setCookie(txt_dts_month)
#txt_dts_day                        = setCookie(txt_dts_day)
#txt_supplier                       = setCookie(txt_supplier)
#txt_shipment                       = setCookie(txt_shipment)
#txt_wp                             = setCookie(txt_wp)
#txt_trnsport                       = setCookie(txt_trnsport)
#txt_area                           = setCookie(txt_area)
#txt_unit_price_wp                  = setCookie(txt_unit_price_wp)
#txt_price_unit_freight             = setCookie(txt_price_unit_freight)
#txt_weight_wp                      = setCookie(txt_weight_wp)

#�N�b�L�[�擾
[Sub_GetCookie]
#txt_dts_year                       = getCookie(txt_dts_year)
#txt_dts_month                      = getCookie(txt_dts_month)
#txt_dts_day                        = getCookie(txt_dts_day)
#txt_supplier                       = getCookie(txt_supplier)
#txt_shipment                       = getCookie(txt_shipment)
#txt_wp                             = getCookie(txt_wp)
#txt_trnsport                       = getCookie(txt_trnsport)
#txt_area                           = getCookie(txt_area)
#txt_unit_price_wp                  = getCookie(txt_unit_price_wp)
#txt_price_unit_freight             = getCookie(txt_price_unit_freight)
#txt_weight_wp                      = getCookie(txt_weight_wp)



#�f�o�b�O���̉B���R���g���[��
[Sub_Debug_ON]
txt_mode                           = Visible(true)
txt_dt_receiveslip                 = Visible(true)
txt_no_receiveslip                 = Visible(true)
txt_termid                         = Visible(true)
txt_subselected                    = Visible(true)
txt_wp_grade                       = Visible(true)
#2014.02.12 M.Inoue �q������Ή� start
txt_cd_wp                          = Visible(true)
#2014.02.12 M.Inoue �q������Ή� end
txt_grade                          = Visible(true)
txt_price_last                     = Visible(true)
txt_trnsport_last                  = Visible(true)
txt_area_last                      = Visible(true)
txt_price_freight                  = Visible(true)
txt_unit_freight                   = Visible(true)
txt_percent                        = Visible(true)
txt_marumekbn                      = Visible(true)
txt_marumeketa                     = Visible(true)

#�f�o�b�O���̉B���R���g���[��
[Sub_Debug_OFF]
txt_mode                           = Visible(false)
txt_dt_receiveslip                 = Visible(false)
txt_no_receiveslip                 = Visible(false)
txt_termid                         = Visible(false)
txt_subselected                    = Visible(false)
txt_wp_grade                       = Visible(false)
#2014.02.12 M.Inoue �q������Ή� start
txt_cd_wp                          = Visible(false)
#2014.02.12 M.Inoue �q������Ή� end
txt_grade                          = Visible(false)
txt_price_last                     = Visible(false)
txt_trnsport_last                  = Visible(false)
txt_area_last                      = Visible(false)
txt_price_freight                  = Visible(false)
txt_unit_freight                   = Visible(false)
txt_percent                        = Visible(false)
txt_marumekbn                      = Visible(false)
txt_marumeketa                     = Visible(false)