[Main] dbuse(true) initparam(printMode,reportId,dt_from,dt_to,uri_no,tokui_cd,syohin_nm,han_name,fname,ext6,ndt_from,ndt_to,ext7) case($m_layout,$ext7,,1,0) case($l_layout,$ext7,L,1,0) deforgpage(blank) defheadarea(hed) defbodyarea(mei) subroutine(SelectRecords_Jisya) subroutine(SelectRecords) subroutine(SelectRecords_Image) loop(PrintNormal,@rs1,Key1,Key2) printreport($printMode,true) #------------------------------------------------- # SQL実行 #------------------------------------------------- [SelectRecords_Jisya] new($param) #addparam($param,$s_id) addparam($param,$dt_from) addparam($param,$dt_to) addparam($param,$uri_no) addparam($param,$tokui_cd) addparam($param,$syohin_nm) addparam($param,$han_name) dbselect(SelectRecords_Jisya,@rs2,$param) #------------------------------------------------- # SQL実行 #------------------------------------------------- [SelectRecords] new($param) #addparam($param,$s_id) addparam($param,$dt_from) addparam($param,$dt_to) addparam($param,$uri_no) addparam($param,$tokui_cd) addparam($param,$syohin_nm) addparam($param,$han_name) addparam($param,@rs2.midasi_FLG) addparam($param,$ndt_from) addparam($param,$ndt_to) dbselect(SelectRecords,@rs1,$param) #------------------------------------------------- # SQL実行_画像 #------------------------------------------------- [SelectRecords_Image] dbselect(SelectLogo,@rs_logo,$param) case($logo_flg,@rs_logo.image_cd,,0,1) iterate(LoadLogoImage,$logo_flg) [LoadLogoImage] new($param) addparam($param,@rs_logo.image_cd) dbselect(SelectImage,@rs_img,$param) tempimage(logo,@rs_img.file_image) #------------------------------------------------- # ヘッダ処理_ヘッダー #------------------------------------------------- [CreateHeader] #to_do山本化学仕様 #フラグ確認/フォーマット変更 case($f_flg,@rs2.format_FLG,1,1,0) case($n_flg,@rs2.format_FLG,0,1,0) iterate(sp_format,$f_flg) iterate(nomal_format,$n_flg) #1行目 putcell(1,28,@rs1.syori_ymd) #2行目 putcell(2,28,@rs1.den_no) putcell(2,4,@rs1.yubin_no) #3行目 #4行目 #5行目 putcell(5,22,@rs2.j_nm) #画像描写 putimage(5,19,0,0,0,0,logo) #6行目 putcell(6,22,@rs2.j_post_s) putcell(6,25,@rs2.j_address) #7行目 putcell(7,22,@rs2.j_address2_s) #8行目 putcell(8,4,@rs1.sir_nm) putcell(8,15,@rs1.keisyou1) putcell(8,22,@rs2.j_tel_s) putcell(8,28,@rs2.j_fax_s) #9行目 putcell(9,22,@rs2.j_url_s) #10行目 putcell(10,4,@rs1.sir_tan) putcell(10,15,@rs1.keisyou2) putcell(10,22,@rs2.j_email_s) #11行目 #13行目 putcell(13,2,@rs1.nouki_lbl) putcell(13,6,@rs1.nouki_ymd) #14行目 putcell(14,25,担当者:) putcell(14,28,@rs1.tan_nm) [nomal_format] formatspecialrow(12,0,12,5) [sp_format] formatspecialrow(12,0,70,5) #12行目 putcell(12,4,@rs1.tel_no_s) putcell(12,11,@rs1.fax_no_s) #13行目 putcell(13,13,納期回答欄:) #15行目 #putcell(15,2,入庫場所:) #putcell(15,6,@rs1.v_loc_nm) putcell(15,2,@rs2.sp_mongon2) #16行目 putcell(16,25,確認者:) #17行目 #putcell(17,2,納入先(送り先)) #putcell(18,2,@rs1.tok_nm) #concatenate($put_tok_addr,@rs1.tok_zip_no_s,@rs1.tok_addr) #putcell(19,2,$put_tok_addr) #putcell(20,2,@rs1.tok_tel_no_s) #------------------------------------------------- # 文言出力 #------------------------------------------------- [Mongon] formatspecialrow($_row,0,17,4) #formatspecialrow($_row,0,18,3) #to_doほぼ山本化学仕様 iterate(sp_mongon,$f_flg) iterate(nomal_mongon,$n_flg) #setdouble($head_OFF,@rs2.hin_cd_FLG) #setdouble($head_ON,@rs2.hin_cd_FLG) case($headVer_OFF,@rs2.hin_cd_FLG,0,1,0) case($headVer_ON,@rs2.hin_cd_FLG,1,1,0) iterate(headVer_OFF,$headVer_OFF) iterate(headVer_ON,$headVer_ON) [headVer_OFF] #レス率表示フラグ case($dis_OFF,@rs2.dis_FLG,0,1,0) case($dis_ON,@rs2.dis_FLG,1,1,0) iterate(disMidashi_OFF,$dis_OFF) iterate(disMidashi_ON,$dis_ON) [disMidashi_OFF] iterate(disMidashi_OFF_m,$m_layout) iterate(disMidashi_OFF_l,$l_layout) [disMidashi_OFF_m] #見出し品番なしVer formatspecialrow($_row,0,22,2) putcell($_row,2,NO) putcell($_row,3,品名/仕様(サイズ/色/材質)) putcell($_row,16,入り数) putcell($_row,18,数量) putcell($_row,20,単位) putcell($_row,22,単価) putcell($_row,26,発注金額) putcell($_row,30,納期) putline(,) putcell($_row,3,備考欄) putline(,) [disMidashi_OFF_l] #見出し品番なしVer formatspecialrow($_row,0,22,2) putcell($_row,2,NO) putcell($_row,3,品名/仕様(サイズ/色/材質)) putcell($_row,22,入り数) putcell($_row,24,数量) putcell($_row,28,単位) putcell($_row,30,納期) putline(,) putcell($_row,3,備考欄) putline(,) [disMidashi_ON] formatspecialrow($_row,0,101,2) putcell($_row,2,NO) putcell($_row,3,商品名称) putcell($_row,15,数量) putcell($_row,17,単位) putcell($_row,19,定価) putcell($_row,23,割引率) putcell($_row,25,単価) putcell($_row,29,金額) putline(,) #putcell($_row,3,備考欄) putline(,) [headVer_ON] #見出し品番ありVer formatspecialrow($_row,0,44,2) putcell($_row,2,NO) putcell($_row,3,品番/品名/仕様(サイズ/色/材質)) putcell($_row,20,数量) putcell($_row,22,単価) putcell($_row,26,発注金額) putcell($_row,30,納期) putline(,) putcell($_row,3,備考欄) putline(,) [sp_mongon] putcell($_row,2,@rs2.sp_mongon1) putline(,) putcell($_row,2,@rs2.sp_mongon2) putcell($_row,25,合計金額) putline(,) putcell($_row,2,@rs2.sp_mongon3) #1と2ページ目で合計金額の表示分岐 case($goukei,@rs1.row_page,0,@rs1.zeinuki_gaku,-) putcell($_row,25,$goukei) #空行 putline(,) #putcell($_row,13,@rs1.loc_addr) putline(,) putline(,) iterate(sofu_put,@rs2.cyokus_FLG) [sofu_put] #17行目 #putcell(17,2,納入先(送り先)) putcell(17,2,@rs2.cyokus_title) putcell(18,2,@rs1.tok_nm) concatenate($put_tok_addr,@rs1.tok_zip_no_s, ,@rs1.tok_addr) putcell(19,2,$put_tok_addr) putcell(20,2,@rs1.tok_tel_no_s) [nomal_mongon] putcell($_row,2,@rs2.mongon1) putline(,) putcell($_row,2,@rs2.mongon2) putcell($_row,25,合計金額) putline(,) putcell($_row,2,@rs2.mongon3) #1と2ページ目で合計金額の表示分岐 case($goukei,@rs1.row_page,0,@rs1.zeinuki_gaku,-) putcell($_row,25,$goukei) #空行 putline(,) putcell($_row,2,@rs1.loc_nm) putcell($_row,13,@rs1.loc_addr) putline(,) putline(,) #------------------------------------------------- # Key1設定ルーチン #------------------------------------------------- [KeyInfo_key1] keyvalue(@rs1.sir_cd,@rs1.den_no) keybreakproc(GroupBegin_key1,GroupEnd_key1) #------------------------------------------------- # Key1開始時 #------------------------------------------------- [GroupBegin_key1] case($id_blank,$l_layout,1,blankL,blank) case($id_formats,$l_layout,1,formatsL,formats) deforgpage($id_blank) #Importするかどうか,FormatNormalするかどうか pageopen(true,false) deforgpage($id_formats) resetorg() #フッタ処理_フッタ位置_初期値 setdouble($f_biko,56) #連続コード表示非表示 setdouble($need_hin_cd,@rs2.sp1_FLG) #ヘッダ処理_ヘッダー subroutine(CreateHeader) #------------------------------------------------- # Key1終了時 #------------------------------------------------- [GroupEnd_key1] #FormatNormalするかどうか pageclose(false) #------------------------------------------------- # Key2設定ルーチン #------------------------------------------------- [KeyInfo_key2] keyvalue(@rs1.sir_cd,@rs1.den_no,@rs1.row_page) keybreakproc(GroupBegin_key2,GroupEnd_key2) #------------------------------------------------- # Key2開始時 #------------------------------------------------- [GroupBegin_key2] #文言出力 subroutine(Mongon) #金額表示有無 case($ext6_flg_ON,$ext6,1,1,0) iterate(op_goukei_ON,$ext6_flg_ON) #setdouble($mei_OFF,@rs2.hin_cd_FLG) #setdouble($mei_ON,@rs2.hin_cd_FLG) case($meiVer_OFF,@rs2.hin_cd_FLG,0,1,0) case($meiVer_ON,@rs2.hin_cd_FLG,1,1,0) iterate(meiVer_OFF,$meiVer_OFF) iterate(meiVer_ON,$meiVer_ON) [op_goukei_ON] putcell(18,25,) putcell(19,25,) [meiVer_OFF] #明細行一括format品番なしVer #小数管理しているかの判断 case($su_dec_on,@rs2.dec_FLG,1,1,0) case($su_dec_off,@rs2.dec_FLG,0,1,0) iterate(suryo_dec_on,$su_dec_on) iterate(suryo_dec_off,$su_dec_off) [meiVer_ON] #明細行一括format品番ありVer formatspecialrow($_row,0,46,20) [suryo_dec_on] formatspecialrow($_row,0,79,20) # #19536 2021.06.15 MOD STT setdouble($row2,$_row) sum($row2,20) formatspecialrow($row2,0,89,10) # #19536 2021.06.15 MOD END [suryo_dec_off] case($dis_OFF,@rs2.dis_FLG,0,1,0) case($dis_ON,@rs2.dis_FLG,1,1,0) iterate(dis_OFF,$dis_OFF) iterate(dis_ON,$dis_ON) [dis_OFF] formatspecialrow($_row,0,24,20) [dis_ON] formatspecialrow($_row,0,103,30) #------------------------------------------------- # Key2終了時 #------------------------------------------------- [GroupEnd_key2] #空行 putline(,) #フッタ処理 formatspecialrow($f_biko,0,67,2) putcell($f_biko,3,備考:) sum($f_biko,1) putline(,) putcell($f_biko,3,@rs1.biko1) putline(,) putline(,) sum($f_biko,2) #改ページ挿入 HPAGEBREAK($f_biko) sum($f_biko,38) #------------------------------------------------- # 明細表示処理 #------------------------------------------------- [PrintNormal] #setdouble($dat_OFF,@rs2.hin_cd_FLG) #setdouble($dat_ON,@rs2.hin_cd_FLG) case($datVer_OFF,@rs2.hin_cd_FLG,0,1,0) case($datVer_ON,@rs2.hin_cd_FLG,1,1,0) iterate(datVer_OFF,$datVer_OFF) iterate(datVer_ON,$datVer_ON) [datVer_OFF] case($ext6_flg_OFF,$ext6,,1,0) case($ext6_flg_ON,$ext6,1,1,0) iterate(op_kingaku_OFF,$ext6_flg_OFF) iterate(op_kingaku_ON,$ext6_flg_ON) [op_kingaku_OFF] case($dis_OFF,@rs2.dis_FLG,0,1,0) case($dis_ON,@rs2.dis_FLG,1,1,0) iterate(disMei_OFF,$dis_OFF) iterate(disMei_ON,$dis_ON) #金額表示有無 [disMei_OFF] iterate(disMei_OFF_m,$m_layout) iterate(disMei_OFF_l,$l_layout) [disMei_OFF_m] putcell($_row,2,@rs1.row_no) putcell($_row,3,@rs1.hin_nm) putcell($_row,30,@rs1.nouki_m_ymd) putline(,,,,,,,,,,,,,,,@rs1.iri_su#,,@rs1.hacyu_su#,,@rs1.hin_tani#,,@rs1.tanka#,,,,@rs1.kingaku#,,,,@rs1.nouki_m_ymd) # 2021.06.11 #19286 putline(,,@rs1.m_biko#,,,,,,,,,,,,,,,@rs1.hacyu_su_lower#,,@rs1.tani_lower#) #putline(,,@rs1.m_biko#) #putcell($_row,3,@rs1.m_biko) #putline(,) [disMei_OFF_l] putcell($_row,2,@rs1.row_no) putcell($_row,3,@rs1.hin_nm) putcell($_row,30,@rs1.nouki_m_ymd) putline(,,,,,,,,,,,,,,,,,,,,,@rs1.iri_su#,,@rs1.hacyu_su#,,,,@rs1.hin_tani#) putline(,,@rs1.m_biko#,,,,,,,,,,,,,,,,,,,,,@rs1.hacyu_su_lower#,,,,@rs1.tani_lower#) [disMei_ON] putline(,,@rs1.hin_cd#) putcell($_row,2,@rs1.row_no) putcell($_row,3,@rs1.hin_nm) putcell($_row,24,%) putline(,,,,,,,,,,,,,,@rs1.hacyu_su#,,@rs1.hin_tani#,,@rs1.htanka#,,,,@rs1.disc_per#,,@rs1.tanka#,,,,@rs1.kingaku#) #putline(,,@rs1.m_biko#,,,,,,,,,,,,,,,@rs1.iri_su#) #putcell($_row,3,@rs1.m_biko) #putline(,) [op_kingaku_ON] case($dis_OFF,@rs2.dis_FLG,0,1,0) case($dis_ON,@rs2.dis_FLG,1,1,0) iterate(disMeiKin_OFF,$dis_OFF) iterate(disMeiKin_ON,$dis_ON) [disMeiKin_OFF] iterate(disMeiKin_OFF_m,$m_layout) iterate(disMeiKin_OFF_l,$l_layout) [disMeiKin_OFF_m] #金額表示有無 putcell($_row,2,@rs1.row_no) putcell($_row,3,@rs1.hin_nm) putcell($_row,30,@rs1.nouki_m_ymd) putline(,,,,,,,,,,,,,,,@rs1.iri_su#,,@rs1.hacyu_su#,,@rs1.hin_tani#,,,,,,,,,,@rs1.nouki_m_ymd) #putline(,,@rs1.m_biko#,,,,,,,,,,,,,,,@rs1.iri_su#) putline(,,@rs1.m_biko#) #putcell($_row,3,@rs1.m_biko) #putline(,) [disMeiKin_OFF_l] #金額表示有無 putcell($_row,2,@rs1.row_no) putcell($_row,3,@rs1.hin_nm) putcell($_row,30,@rs1.nouki_m_ymd) putline(,,,,,,,,,,,,,,,,,,,,,@rs1.iri_su#,,@rs1.hacyu_su#,,,,@rs1.hin_tani#) putline(,,@rs1.m_biko#,,,,,,,,,,,,,,,,,,,,,@rs1.hacyu_su_lower#,,,,@rs1.tani_lower#) [disMeiKin_ON] putline(,,@rs1.hin_cd#) putcell($_row,2,@rs1.row_no) putcell($_row,3,@rs1.hin_nm) putline(,,,,,,,,,,,,,,@rs1.hacyu_su#,,@rs1.hin_tani#) #putcell($_row,3,@rs1.m_biko) #putline(,) [datVer_ON] #商品コード連続出力ONOFF判定 case($hin_cd_ON,$need_hin_cd,0,1,0) case($hin_cd_OFF,$need_hin_cd,1,1,0) iterate(hin_cd_ON,$hin_cd_ON) iterate(hin_cd_OFF,$hin_cd_OFF) [hin_cd_ON] putcell($_row,2,@rs1.row_no) putcell($_row,3,@rs1.hin_cd) putcell($_row,8,@rs1.hin_nm) putcell($_row,30,@rs1.nouki_m_ymd) putline(,,,,,,,,,,,,,,,,,,,@rs1.hacyu_su#,,@rs1.tanka#,,,,@rs1.kingaku#,,,,@rs1.nouki_m_ymd) putcell($_row,3,@rs1.m_biko) putline(,) [hin_cd_OFF] case($hin_cd_o,$hin_cd_put,@rs1.hin_cd,,@rs1.hin_cd) #2ページ目最初は必ず出力する case($hin_cd,$nex_pF,@rs1.page_no,$hin_cd_o,@rs1.hin_cd) putcell($_row,2,@rs1.row_no) putcell($_row,3,$hin_cd) putcell($_row,8,@rs1.hin_nm) putcell($_row,30,@rs1.nouki_m_ymd) putline(,,,,,,,,,,,,,,,,,,,@rs1.hacyu_su#,,@rs1.tanka#,,,,@rs1.kingaku#,,,,@rs1.nouki_m_ymd) putcell($_row,3,@rs1.m_biko) putline(,) concatenate($hin_cd_put,@rs1.hin_cd) concatenate($nex_pF,@rs1.page_no)