[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,ext8,ext9,ext10,ext11,ext12,nonyu_dt_from,nonyu_dt_to,print_flg,sir_cd_fr,sir_cd_to,tan_cd_fr,tan_cd_to,hin_cd_fr,hin_cd_to,cat_cd_fr,cat_cd_to,den_no_fr,den_no_to,sort_sql,cond_cyokus,den_s_id,dst_filename) case($m_layout,$ext7,,1,0) case($l_layout,$ext7,L,1,0) #case($meisai_row_cnt,$l_layout,1,30,30) setdouble($meisai_row_cnt,30) case($hinnm_2line_on,$ext8,H,1,0) case($no_irisu_mode,$ext8,2,1,0) #金額表示有無 case($hide_kingaku_mode,$ext6,1,1,0) deforgpage(blank) defheadarea(hed) defbodyarea(mei) #subroutine(SelectRecords_Jisya) subroutine(SelectRecords) subroutine(SelectRecords_Image) loop(PrintNormal,@rs1,Key1,Key2) filename($dst_filename) #printreport($printMode,true) case($print_show_mode,$dst_filename,,1,0) case($print_hide_mode,$dst_filename,,0,1) iterate(printShow,$print_show_mode) iterate(printHide,$print_hide_mode) [printShow] printreport($printMode,true,false) [printHide] printreport($printMode,false,false) #------------------------------------------------- # 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,$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,$nonyu_dt_from) addparam($param,$nonyu_dt_to) addparam($param,$cond_cyokus) addparam($param,$print_flg) addparam($param,$den_s_id) addparam($param,$hide_kingaku_mode) dbselect(UpdateDb,@rs_upd,$param) 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] iterate(sp_format,$f_flg) iterate(nomal_format,$n_flg) #1行目 putcell(1,28,@rs1.syori_ymd) #2行目 putcell(2,25,@rs1.den_no_label) putcell(2,28,@rs1.den_no_view) putcell(2,4,@rs1.yubin_no) #3行目 #4行目 #5行目 putcell(5,22,@rs1.j_nm) #画像描写 putimage(@rs_logo.logo_row,@rs_logo.logo_col,0,0,0,0,logo) #putimage(5,19,0,0,0,0,logo) #6行目 putcell(6,22,@rs1.j_post_s) putcell(6,25,@rs1.j_address) #7行目 putcell(7,22,@rs1.j_address2_s) #8行目 putcell(8,4,@rs1.sir_nm) putcell(8,15,@rs1.keisyou1) putcell(8,22,@rs1.j_tel_s) putcell(8,28,@rs1.j_fax_s) #9行目 putcell(9,22,@rs1.j_url_s) #10行目 putcell(10,4,@rs1.sir_tan) putcell(10,15,@rs1.keisyou2) putcell(10,22,@rs1.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] case($w_fmt_i,$l_layout,1,70,90) formatspecialrow(12,0,$w_fmt_i,5) #12行目 putcell(12,4,@rs1.tel_no_s) putcell(12,11,@rs1.fax_no_s) #13行目 putcell(13,13,@rs1.ans_nouki_lbl) putcell(13,17,@rs1.ans_nouki_ymd) #14行目 putcell(14,2,@rs1.sp_mongon1) #15行目 #putcell(15,2,入庫場所:) #putcell(15,6,@rs1.v_loc_nm) putcell(15,2,@rs1.sp_mongon2) #16行目 putcell(16,2,@rs1.sp_mongon3) 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] case($w_fmt_i,$hide_kingaku_mode,1,198,17) formatspecialrow($_row,0,$w_fmt_i,4) #formatspecialrow($_row,0,18,3) #to_doほぼ山本化学仕様 iterate(sp_mongon,$f_flg) iterate(nomal_mongon,$n_flg) [sp_mongon] putcell($_row,2,@rs1.sp_mongon1) putline(,) putcell($_row,2,@rs1.sp_mongon2) putcell($_row,25,合計金額) putline(,) putcell($_row,2,@rs1.sp_mongon3) #1と2ページ目で合計金額の表示分岐 case($goukei,@rs1.page_no,1,@rs1.zeinuki_gaku,-) concatenate($page_n,Page. ,@rs1.page_no,/,@rs1.max_page) putcell($_row,25,$goukei) #空行 putline(,) #putcell($_row,13,@rs1.loc_addr) putline(,) # #26559 2022.12.19 MOD STT #putcell($_row,30,$page_n) # #26559 2022.12.19 MOD END #putline(,) iterate(sofu_put,@rs1.cyokus_flg) [sofu_put] #17行目 #putcell(17,2,納入先(送り先)) putcell(17,2,@rs1.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,@rs1.mongon1) putline(,) putcell($_row,2,@rs1.mongon2) putcell($_row,25,合計金額) putline(,) putcell($_row,2,@rs1.mongon3) #1と2ページ目で合計金額の表示分岐 case($goukei,@rs1.page_no,1,@rs1.zeinuki_gaku,-) putcell($_row,25,$goukei) #空行 putline(,) putcell($_row,2,@rs1.loc_nm) putcell($_row,13,@rs1.loc_addr) putline(,) putline(,) [MeisaiHeader] formatspecialrow($_row,0,$midashi_fmt_row_no,2) iterate(meisai_midashi_a,$logic_a) iterate(meisai_midashi_b,$logic_b) iterate(meisai_midashi_c,$logic_c) iterate(meisai_midashi_d,$logic_d) iterate(meisai_midashi_e,$logic_e) iterate(meisai_midashi_f,$logic_f) #品番なし [meisai_midashi_a] 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(,) #レスあり [meisai_midashi_b] 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(,) #品番あり [meisai_midashi_c] putcell($_row,2,NO) putcell($_row,3,品番/品名/仕様(サイズ/色/材質)) putcell($_row,20,数量) putcell($_row,22,単価) putcell($_row,26,発注金額) putcell($_row,30,納期) putline(,) putcell($_row,3,備考欄) putline(,) #品名2行型 [meisai_midashi_d] putcell(2,25,発注番号:) putcell($_row,2,NO) putcell($_row,3,品名名称) putcell($_row,13,数量) putcell($_row,15,単位) putcell($_row,17,単価) putcell($_row,21,金額) putcell($_row,25,納入日) putcell($_row,28,発注明細番号) putline(,) putline(,) #横レイアウト [meisai_midashi_e] putcell($_row,2,NO) putcell($_row,3,品名/仕様(サイズ/色/材質)) putcell($_row,22,入り数) putcell($_row,24,数量) putcell($_row,28,単位) putcell($_row,30,納期) putline(,) putcell($_row,3,備考欄) putline(,) #品番なし入り数無し [meisai_midashi_f] putcell($_row,2,NO) putcell($_row,3,品名/仕様(サイズ/色/材質)) putcell($_row,18,数量) putcell($_row,20,単位) putcell($_row,22,単価) putcell($_row,26,発注金額) putcell($_row,30,納期) putline(,) putcell($_row,3,備考欄) 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) #to_do山本化学仕様 #フラグ確認/フォーマット変更 case($f_flg,@rs1.format_flg,1,1,0) case($n_flg,@rs1.format_flg,0,1,0) #ヘッダ処理_ヘッダー subroutine(CreateHeader) #文言出力 subroutine(Mongon) #金額非表示 iterate(op_goukei_ON,$hide_kingaku_mode) #明細パターン判定 subroutine(SelectMeisaiType) [op_goukei_ON] putcell(18,25,) putcell(19,25,) #------------------------------------------------- # Key1終了時 #------------------------------------------------- [GroupEnd_key1] #FormatNormalするかどうか pageclose(false) #------------------------------------------------- # Key2設定ルーチン #------------------------------------------------- [KeyInfo_key2] keyvalue(@rs1.sir_cd,@rs1.den_no,@rs1.page_no) keybreakproc(GroupBegin_key2,GroupEnd_key2) #------------------------------------------------- # Key2開始時 #------------------------------------------------- [GroupBegin_key2] concatenate($page_n,Page. ,@rs1.page_no,/,@rs1.max_page) putcell($_row,30,$page_n) putline(,) subroutine(MeisaiHeader) formatspecialrow($_row,0,$meisai_fmt_row_no,$meisai_row_cnt) #------------------------------------------------- # Key2終了時 #------------------------------------------------- [GroupEnd_key2] #空行 putline(,) #フッタ処理 case($w_fmt_i,$l_layout,1,67,87) formatspecialrow($f_biko,0,$w_fmt_i,2) putcell($f_biko,3,備考:) sum($f_biko,1) putline(,) putcell($f_biko,3,@rs1.biko1) putline(,) putline(,) sum($f_biko,2) # #27730 2023.04.09 MOD STT putline(,) # #27730 2023.04.09 MOD END #改ページ挿入 HPAGEBREAK($f_biko) # #27730 2023.04.09 MOD STT #sum($f_biko,38) #sum($f_biko,34) sum($f_biko,35) # #27730 2023.04.09 MOD END #------------------------------------------------- # 明細表示処理 #------------------------------------------------- [PrintNormal] iterate(PrintNormal_a,$logic_a) iterate(PrintNormal_b,$logic_b) iterate(PrintNormal_c,$logic_c) iterate(PrintNormal_d,$logic_d) iterate(PrintNormal_e,$logic_e) iterate(PrintNormal_f,$logic_f) #品番なし [PrintNormal_a] 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(,) #レスあり [PrintNormal_b] 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(,) #品番あり [PrintNormal_c] 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(,) #品名2行型 [PrintNormal_d] putcell($_row,2,@rs1.row_no) putcell($_row,3,@rs1.div_hin_nm1) putcell($_row,25,@rs1.nouki_m_ymd) putline(,,,,,,,,,,,,@rs1.hacyu_su#,,@rs1.hin_tani#,,@rs1.tanka#,,,,@rs1.kingaku#,,,,,,,@rs1.m_biko#) putcell($_row,3,@rs1.div_hin_nm2) putline(,) #横レイアウト [PrintNormal_e] 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#) #品番なし入り数無し [PrintNormal_f] putcell($_row,2,@rs1.row_no) putcell($_row,3,@rs1.hin_nm) putcell($_row,30,@rs1.nouki_m_ymd) putline(,,,,,,,,,,,,,,,,,@rs1.hacyu_su#,,@rs1.hin_tani#,,@rs1.tanka#,,,,@rs1.kingaku#,,,,@rs1.nouki_m_ymd) putline(,,@rs1.m_biko#,,,,,,,,,,,,,,,@rs1.hacyu_su_lower#,,@rs1.tani_lower#) [SelectMeisaiType] new($param) addparam($param,@rs1.dis_flg) addparam($param,@rs1.hin_cd_flg) addparam($param,$hinnm_2line_on) addparam($param,$l_layout) addparam($param,@rs1.sir_su_dec) addparam($param,$no_irisu_mode) dbselect(SelectMeisaiType,@rs_fmt,$param) setdouble($meisai_fmt_row_no,@rs_fmt.meisai_format_row_no) setdouble($midashi_fmt_row_no,@rs_fmt.midashi_format_row_no) case($logic_a,@rs_fmt.logic_type,a,1,0) case($logic_b,@rs_fmt.logic_type,b,1,0) case($logic_c,@rs_fmt.logic_type,c,1,0) case($logic_d,@rs_fmt.logic_type,d,1,0) case($logic_e,@rs_fmt.logic_type,e,1,0) case($logic_f,@rs_fmt.logic_type,f,1,0)