function GetSubPage($res = '') { $data = ' <div id="dialog-form"> <fieldset> <legend>ძირითადი ინფორმაცია</legend> <table class="dialog-form-table"> <tr> <td style="width: 170px;"><label for="goods_code">საქონლის კოდი</label></td> <td> <input type="text" id="goods_code" class="idle" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['bar_code'] . '" /> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_name">საქონლის დასახელება</label></td> <td> <div class="seoy-row" id="goods_name_seoy"> <input type="text" id="goods_name" class="idle seoy-address" onblur="this.className=\'idle seoy-address\'" onfocus="this.className=\'activeField seoy-address\'" value="' . $res['name'] . '" /> <button id="goods_name_btn" class="combobox">goods_name</button> </div> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_measure">ზომის ერთეული</label></td> <td> <select id="goods_measure" class="idls num" disabled="disabled">' . GetUnit($res[unit_id]) . '</select> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_quantity">რაოდენობა</label></td> <td> <input type="text" id="goods_quantity" class="idle num" onblur="this.className=\'idle num\'" onfocus="this.className=\'activeField num\'" value="' . $res['quantity'] . '" /> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_residual">ნაშთი რაოდენობ</label></td> <td> <input type="text" id="goods_residual" disabled="disabled" class="idle num" onblur="this.className=\'idle num\'" onfocus="this.className=\'activeField num\'" value="' . $res['quantity_f'] . '" /> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_unit_price">ერთეულის ფასი</label></td> <td> <input type="text" id="goods_unit_price" disabled="disabled" class="idle num" onblur="this.className=\'idle num\'" onfocus="this.className=\'activeField num\'" value="' . $res['price'] . '" /> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_price">საქონლის ფასი</label></td> <td> <input type="text" id="goods_price" disabled="disabled" class="idle num" onblur="this.className=\'idle num\'" onfocus="this.className=\'activeField num\'"/> </td> </tr> </table> <!-- ID --> <input type="hidden" id="goods_id" value="' . $res['id'] . '" /> </fieldset> </div> '; return $data; }
function GetPage($res, $goods_id) { $data = ' <div id="dialog-form"> <fieldset> <legend>ძირითადი ინფორმაცია</legend> <table class="dialog-form-table"> <tr> <td style="width: 170px;"><label for="goods_code">საქონლის კოდი</label></td> <td> <input type="text" id="goods_code" class="idle" disabled="disabled" onblur="this.className=\'idle\'" onfocus="this.className=\'activeField\'" value="' . $res['bar_code'] . '" /> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_name">დასახელება ზედნადებით</label></td> <td> <div class="seoy-row" id="goods_name_seoy"> <input type="text" id="goods_name" class="idle seoy-address" disabled="disabled" onblur="this.className=\'idle seoy-address\'" onfocus="this.className=\'activeField seoy-address\'" value="' . $res['name'] . '" /> <button id="goods_name_btn" class="combobox" disabled="disabled">goods_name</button> </div> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_measure">ზომის ერთეული ზენადებით</label></td> <td> <select id="goods_measure" class="idls num" disabled="disabled">' . GetUnit($res[unit_id]) . '</select> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_local_name">საქონლის დასახელება</label></td> <td> <div class="seoy-row" id="goods_local_name_seoy"> <input type="text" id="goods_local_name" class="idle seoy-address" onblur="this.className=\'idle seoy-address\'" onfocus="this.className=\'activeField seoy-address\'" value="' . $res['prod_name'] . '"/> <button id="goods_local_name_btn" class="combobox">goods_local_name</button> </div> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_local_unit">ზომის ერთეული</label></td> <td> <input type="text" id="goods_local_unit" class="idle num" onblur="this.className=\'idle seoy-address\'" onfocus="this.className=\'activeField seoy-address\'" value="' . $res['unit'] . '" disabled="disabled"/> </td> </tr> '; if (empty($res['i_quantity']) && empty($res['i_price'])) { $data .= ' <tr> <td style="width: 170px;"><label for="goods_local_quantity">რაოდენობა</label></td> <td> <input type="text" id="goods_local_quantity" class="idle num" onblur="this.className=\'idle num\'" onfocus="this.className=\'activeField num\'" value="' . $res['quantity'] . '" /> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_local_unit_price">ერთეულის ფასი</label></td> <td> <input type="text" id="goods_local_unit_price" class="idle num" disabled="disabled" onblur="this.className=\'idle num\'" onfocus="this.className=\'activeField num\'" value="' . $res['price'] . '" /> </td> </tr>'; } else { $data .= ' <tr> <td style="width: 170px;"><label for="goods_local_quantity">რაოდენობა</label></td> <td> <input type="text" id="goods_local_quantity" class="idle num" onblur="this.className=\'idle num\'" onfocus="this.className=\'activeField num\'" value="' . $res['i_quantity'] . '" /> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_local_unit_price">ერთეულის ფასი</label></td> <td> <input type="text" id="goods_local_unit_price" class="idle num" disabled="disabled" onblur="this.className=\'idle num\'" onfocus="this.className=\'activeField num\'" value="' . $res['i_price'] . '" /> </td> </tr>'; } $data .= ' <tr> <td style="width: 170px;"><label for="goods_price">საქონლის ფასი</label></td> <td> <input type="text" id="goods_price" class="idle num" disabled="disabled" onblur="this.className=\'idle num\'" onfocus="this.className=\'activeField num\'" value="' . $res['amount'] . '" /> </td> </tr> <tr> <td style="width: 170px;"><label for="goods_vat">დაბეგვრა</label></td> <td> <select id="goods_vat" class="idls medium" disabled="disabled">' . GetVat($res[vat_type]) . '</select> </td> </tr> </table> <!-- ID --> <input type="hidden" id="identity_id" value="' . $res['identity_id'] . '" /> <input type="hidden" id="overhead_detail_id" value="' . $goods_id . '" /> <input type="hidden" id="overhead_detail_id_local" value="' . $res['overhead_detail_id'] . '" /> </fieldset> </div> '; return $data; }