3 * @link https://datagram.co.jp/source/bksj for the canonical source repository
4 * @copyright Copyright (c) 2006-2019 Datagram Ltd. (https://datagram.co.jp)
5 * @license https://datagram.co.jp/source/bksj/license.txt
11 $basic = $ctrl->basic;
13 $c_c0 = $ctrl->const['c_c0'];
14 $c_deb_cre = $ctrl->const['c_deb_cre'];
15 $c_item_class = $ctrl->const['c_item_class'];
16 $c34 = $ctrl->const['c34'];
18 $id = $view->str($dat['id']);
19 $ccd = $view->str($dat['ccd']);
20 $item = $view->str($dat['item']);
21 $item_ccd = $view->str($dat['item_ccd']);
22 $division = $view->str($dat['division']);
23 $kana = $view->str($dat['kana']);
24 $name = $view->str($dat['name']);
26 <script type="text/javascript">
42 gotoNext: function(func, act) {
59 'ccd': this.v_ccd.val(),
60 'item': this.v_item.val(),
61 'item_ccd': this.v_item_ccd.val(),
62 'division': this.v_division.val(),
63 'kana': this.v_kana.val(),
64 'name': this.v_name.val(),
69 eval("this.ans = " + data);
72 this.ans = {"sts": "NG", "err": "ajax error"};
82 if (!confirm("登録しますか?")) {
86 if (this.check() == 'NG') {
88 for (var i in this.ans.err) {
89 msg += this.ans.err[i] + '<br>';
92 this.errmsg.html(msg);
105 'bid': '<?= $bid ?>',
106 'ccd': this.v_ccd.val(),
107 'item': this.v_item.val(),
108 'item_ccd': this.v_item_ccd.val(),
109 'division': this.v_division.val(),
110 'kana': this.v_kana.val(),
111 'name': this.v_name.val(),
116 eval("this.ans = " + data);
119 this.ans = {"sts": "NG", "err": "ajax error"};
122 if (this.ans.sts == 'NG') {
123 this.errmsg.html(this.ans.err);
127 this.gotoNext('UserAcitm', 'remember');
133 this.errmsg = $('#errmsg');
134 this.next = $('#next');
135 this.func = $('#func');
136 this.act = $('#act');
137 this.v_ccd = $('#v_ccd');
138 this.v_item = $('#v_item');
139 this.v_item_ccd = $('#v_item_ccd');
140 this.v_division = $('#v_division');
141 this.v_kana = $('#v_kana');
142 this.v_name = $('#v_name');
152 <form method="post" name="next" id="next" action="<?= $base ?>">
153 <input type="hidden" name="func" id="func">
154 <input type="hidden" name="act" id="act">
157 <table id="my_header" width="100%">
160 <a onclick="return my.gotoNext('UserMenu', '');">メニュー</a>
161 > <a onclick="return my.gotoNext('UserAcitm', 'remember');">勘定コード</a>
164 <td style="text-align: right;">
165 <button type="button" class="my_magenta" style="width: 120px;" onclick="return my.gotoNext('Login', '');">ログアウト</button>
169 <td colspan="2" style="text-align: center;">
170 <?= $view->strBasic($basic) ?>
175 <div style="height: 5px;"> </div>
180 <table class="my_table" width="100%">
182 <th class="my_border">勘定コード・編集</th>
186 <div style="height: 1px;"> </div><hr>
193 <td style="padding: 8px;">
194 <button type="button" class="my_cyan" style="width: 100px;" onclick="return my.regist();">登録</button>
196 <td style="width: 80px;"> </td>
198 <button type="button" class="my_magenta" style="width: 100px;" onclick="return my.gotoNext('UserAcitm', 'remember');">戻る</button>
206 <div style="height: 1px;"> </div><hr>
208 <div style="height: 8px;"> </div>
210 <table class="my_table">
212 <td colspan="2"><div id="errmsg" class="my_red"></div></td>
215 <td colspan="2"> </td>
218 <th class="my_border" style="width: 100px; text-align: right;">
221 <td class="my_border">
224 foreach ($c34 as $k => $d) {
225 $aname = $view->str($d['name']);
226 $slctd = ($ccd == $k) ? ' selected' : '';
228 <option value="<?= $k ?>"<?= $slctd ?>><?= $k ?> : <?= $c_c0[$d['div']] ?> : <?= $aname ?></option>
236 <th class="my_border" style="width: 100px; text-align: right;">
239 <td class="my_border">
240 <select id="v_item_ccd">
242 foreach ($c_item_class as $k => $d) {
243 $aname = $view->str($d);
244 $slctd = ($item_ccd == $k) ? ' selected' : '';
246 <option value="<?= $k ?>"<?= $slctd ?>><?= $aname ?></option>
254 <th class="my_border" style="width: 100px; text-align: right;">
257 <td class="my_border">
258 <select id="v_division">
260 foreach ($c_deb_cre as $k => $d) {
261 $aname = $view->str($d['name']);
262 $slctd = ($division == $k) ? ' selected' : '';
264 <option value="<?= $k ?>"<?= $slctd ?>><?= $aname ?></option>
272 <th class="my_border" style="width: 100px; text-align: right;">
275 <td class="my_border">
278 $fmt = '<option value="%s"%s>%s</option>';
279 for ($i = 11; $i < 100; $i++) {
280 $s = ($i == $item) ? ' selected' : '';
281 echo sprintf($fmt, $i, $s, $i);
288 <th class="my_border" style="width: 100px; text-align: right;">
291 <td class="my_border">
292 <input style="width: 300px; text-align: left;" maxlength="80" type="text" id="v_kana" value="<?= $kana ?>">
296 <th class="my_border" style="width: 100px; text-align: right;">
299 <td class="my_border">
300 <input style="width: 300px; text-align: left;" maxlength="80" type="text" id="v_name" value="<?= $name ?>">