[loadOriginal]
select fnc_load_basv0260(:s_id, :parent_s_id, :link_no, ':sir_nm', ':hin_cd', ':hin_nm', :hacyu_su, :tanka, :kingaku)

[updateOriginal]
select fnc_update_basv0260(:s_id)

[deleteOriginal]
delete from w_basv0260 where s_id = :s_id;
delete from w_basv0260_z where s_id = :s_id;

[loadShiyouZairyo]
delete from w_basv0260_z where s_id = :s_id;
insert into w_basv0260_z (
	  s_id
	, row_no
	, hin_cd
	, hin_nm
	, suryo
	, tanka
	, kingaku
	, sir_cd
	, sir_nm
	, hacyu_irai_su
	, hacyu_irai_ymd
	, hacyu_no
	, hacyu_row_no
	, size_l
	, size_w
	, size_h
	, meisai_biko
	, sp_hacyu_flg
	, now_stock
	, now_ztanka
	, del_flg
	, cre_id
	, cre_time
	, upd_id
	, upd_time
)
select
	  :s_id
	, w.row_no
	, w.chin_cd
	, m.hin_nm
	, (:suryo * set_su)
	, m.stanka_init
	, round((:suryo * w.set_su) * m.stanka_init, 0) --kingaku
	, null --sir_cd
	, null --sir_nm
	, null --hacyu_irai_su
	, null --hacyu_irai_ymd
	, null --hacyu_no
	, null --hacyu_row_no
	, null --size_l
	, null --size_w
	, null --size_h
	, null --meisai_biko
	, 0 --sp_hacyu_flg
	, m.now_stock
	, m.now_ztanka
	, 0 --del_flg
	, ':login_id' --cre_id
	, now() --cre_time
	, ':login_id' --upd_id
	, now() --upd_time
from m_sethin w
left join v_m_hin m on (m.hin_cd = w.chin_cd)
where w.hin_cd = ':hin_cd'
;




