2 /**********************************************************************
3 Copyright (C) FrontAccounting, LLC.
4 Released under the terms of the GNU General Public License, GPL,
5 as published by the Free Software Foundation, either version 3
6 of the License, or (at your option) any later version.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
11 ***********************************************************************/
13 // Sets local POST value and adds Value to ajax posting if needed
15 /*function set_post($name, $value, $ajax_trigger=true) {
18 $_POST[$name] = $value;
19 if ($ajax_trigger) $Ajax->activate($name);
22 //------------------------------------------------------------------------------
23 // Seek for _POST variable with $prefix.
24 // If var is found returns variable name with prefix stripped,
25 // and null or -1 otherwise.
27 function find_submit($prefix, $numeric=true)
30 foreach($_POST as $postkey=>$postval )
32 if (strpos($postkey, $prefix) === 0)
34 $id = substr($postkey, strlen($prefix));
35 return $numeric ? (int)$id : $id;
38 return $numeric ? -1 : null;
40 //------------------------------------------------------------------------------
42 // Helper function for simple db table editor pages
44 function simple_page_mode($numeric_id = true)
46 global $Ajax, $Mode, $selected_id;
48 $default = $numeric_id ? -1 : '';
49 $selected_id = get_post('selected_id', $default);
50 foreach (array('ADD_ITEM', 'UPDATE_ITEM', 'RESET', 'CLONE') as $m) {
51 if (isset($_POST[$m])) {
52 $Ajax->activate('_page_body');
53 if ($m == 'RESET' || $m == 'CLONE')
54 $selected_id = $default;
55 unset($_POST['_focus']);
59 foreach (array('Edit', 'Delete') as $m) {
60 foreach ($_POST as $p => $pvar) {
61 if (strpos($p, $m) === 0) {
62 // $selected_id = strtr(substr($p, strlen($m)), array('%2E'=>'.'));
63 unset($_POST['_focus']); // focus on first form entry
64 $selected_id = quoted_printable_decode(substr($p, strlen($m)));
65 $Ajax->activate('_page_body');
74 //------------------------------------------------------------------------------
76 // Read numeric value from user formatted input
78 function input_num($postname=null, $dflt=0)
80 if (!isset($_POST[$postname]) || $_POST[$postname] == "")
83 return user_numeric($_POST[$postname]);
86 //---------------------------------------------------------------------------------
88 function hidden($name, $value=null, $echo=true)
93 $value = get_post($name);
95 $ret = "<input type=\"hidden\" name=\"$name\" value=\"$value\">";
96 $Ajax->addUpdate($name, $name, $value);
103 Universal submit form button.
104 $atype - type of submit:
106 false - normal button; optional icon
107 null - button visible only in fallback mode; optional icon
109 true - standard button; optional icon
111 'default' - default form submit on Ctrl-Enter press; dflt ICON_OK icon
112 'selector' - ditto with closing current popup editor window
113 'cancel' - cancel form entry on Escape press; dflt ICON_CANCEL
114 'process' - displays progress bar during call; optional icon
116 $atype can contain also multiply type selectors separated by space,
117 however make sense only combination of 'process' and one of defualt/selector/cancel
119 function submit($name, $value, $echo=true, $title=false, $atype=false, $icon=false)
121 global $path_to_root;
124 if ($atype === null) {
125 $aspect = fallback_mode() ? " aspect='fallback'" : " style='display:none;'";
127 } elseif (!is_bool($atype)) { // necessary: switch uses '=='
129 $aspect = "aspect='$atype' ";
130 $types = explode(' ', $atype);
132 foreach ($types as $type) {
135 $aspect = " aspect='selector' rel = '$value'";
136 $value = _("Select");
137 if ($icon===false) $icon=ICON_SUBMIT; break;
140 if ($icon===false) $icon=ICON_SUBMIT; break;
143 if ($icon===false) $icon=ICON_ESCAPE; break;
147 $submit_str = "<button class=\""
148 .($atype ? 'ajaxsubmit' : 'inputsubmit')
149 ."\" type=\"submit\""
151 ." name=\"$name\" id=\"$name\" value=\"$value\""
152 .($title ? " title='$title'" : '')
154 .($icon ? "<img src='$path_to_root/themes/".user_theme()."/images/$icon' height='12'>" : '')
155 ."<span>$value</span>"
163 function submit_center($name, $value, $echo=true, $title=false, $async=false, $icon=false)
165 if ($echo) echo "<center>";
166 submit($name, $value, $echo, $title, $async, $icon);
167 if ($echo) echo "</center>";
170 function submit_center_first($name, $value, $title=false, $async=false, $icon=false)
173 submit($name, $value, true, $title, $async, $icon);
177 function submit_center_last($name, $value, $title=false, $async=false, $icon=false)
180 submit($name, $value, true, $title, $async, $icon);
184 For following controls:
185 'both' - use both Ctrl-Enter and Escape hotkeys
186 'cancel' - apply to 'RESET' button
188 function submit_add_or_update($add=true, $title=false, $async=false, $clone=false)
192 if ($async === 'both') {
193 $async = 'default'; $cancel = 'cancel';
195 else if ($async === 'default')
197 else if ($async === 'cancel')
201 submit('ADD_ITEM', _("Add new"), true, $title, $async);
203 submit('UPDATE_ITEM', _("Update"), true, _('Submit changes'), $async);
204 if ($clone) submit('CLONE', _("Clone"), true,
205 _('Edit new record with current data'), $async);
206 submit('RESET', _("Cancel"), true, _('Cancel edition'), $cancel);
210 function submit_add_or_update_center($add=true, $title=false, $async=false, $clone=false)
213 submit_add_or_update($add, $title, $async, $clone);
217 function submit_add_or_update_row($add=true, $right=true, $extra="", $title=false, $async=false, $clone = false)
221 echo "<td> </td>\n";
223 submit_add_or_update($add, $title, $async, $clone);
227 function submit_cells($name, $value, $extra="", $title=false, $async=false)
230 submit($name, $value, true, $title, $async);
234 function submit_row($name, $value, $right=true, $extra="", $title=false, $async=false)
238 echo "<td> </td>\n";
239 submit_cells($name, $value, $extra, $title, $async);
243 function submit_return($name, $value, $title=false)
245 if (@$_REQUEST['popup']) {
246 submit($name, $value, true, $title, 'selector');
250 function submit_js_confirm($name, $msg) {
252 "_validate.$name=function(){ return confirm('"
253 . strtr($msg, array("\n"=>'\\n')) . "');};");
255 //-----------------------------------------------------------------------------------
257 function set_icon($icon, $title=false)
259 global $path_to_root;
260 if (basename($icon) === $icon) // standard icons does not contain path separator
261 $icon = "$path_to_root/themes/".user_theme()."/images/$icon";
262 return "<img src='$icon' width='12' height='12' border='0'".($title ? " title='$title'" : "")." />\n";
265 function button($name, $value, $title=false, $icon=false, $aspect='')
267 // php silently changes dots,spaces,'[' and characters 128-159
268 // to underscore in POST names, to maintain compatibility with register_globals
270 if ($aspect == 'selector') {
271 $rel = " rel='$value'";
272 $value = _("Select");
274 if (user_graphic_links() && $icon)
276 if ($value == _("Delete")) // Helper during implementation
278 return "<button type='submit' class='editbutton' name='"
279 .htmlentities(strtr($name, array('.'=>'=2E', '='=>'=3D',// ' '=>'=20','['=>'=5B'
281 ."' value='1'" . ($title ? " title='$title'":" title='$value'")
282 . ($aspect ? " aspect='$aspect'" : '')
284 ." />".set_icon($icon)."</button>\n";
287 return "<input type='submit' class='editbutton' name='"
288 .htmlentities(strtr($name, array('.'=>'=2E', '='=>'=3D',// ' '=>'=20','['=>'=5B'
291 .($title ? " title='$title'":'')
292 . ($aspect ? " aspect='$aspect'" : '')
297 function button_cell($name, $value, $title=false, $icon=false, $aspect='')
299 echo "<td align='center'>";
300 echo button($name, $value, $title, $icon, $aspect);
304 function delete_button_cell($name, $value, $title=false)
306 button_cell($name, $value, $title, ICON_DELETE);
309 function edit_button_cell($name, $value, $title=false)
311 button_cell($name, $value, $title, ICON_EDIT);
314 function select_button_cell($name, $value, $title=false)
316 button_cell($name, $value, $title, ICON_ADD, 'selector');
318 //-----------------------------------------------------------------------------------
320 function check_value($name)
322 if (!isset($_POST[$name]))
327 function checkbox($label, $name, $value=null, $submit_on_change=false, $title=false)
334 $str .= $label . " ";
335 if ($submit_on_change !== false) {
336 if ($submit_on_change === true)
338 "JsHttpRequest.request(\"_{$name}_update\", this.form);";
341 $value = get_post($name,0);
344 .($value == 1 ? ' checked':'')
345 ." type='checkbox' name='$name' value='1'"
346 .($submit_on_change ? " onclick='$submit_on_change'" : '')
347 .($title ? " title='$title'" : '')
350 $Ajax->addUpdate($name, $name, $value);
354 function check($label, $name, $value=null, $submit_on_change=false, $title=false)
356 echo checkbox($label, $name, $value, $submit_on_change, $title);
359 function check_cells($label, $name, $value=null, $submit_on_change=false, $title=false,
363 echo "<td>$label</td>\n";
365 echo check(null, $name, $value, $submit_on_change, $title);
369 function check_row($label, $name, $value=null, $submit_on_change=false, $title=false)
371 echo "<tr><td class='label'>$label</td>";
372 echo check_cells(NULL, $name, $value, $submit_on_change, $title);
376 //-----------------------------------------------------------------------------------
377 function radio($label, $name, $value, $selected, $submit_on_change=false) {
379 if ($submit_on_change === true)
381 "JsHttpRequest.request(\"_{$name}_update\", this.form);";
383 return "<input type='radio' name=$name value='$value' ".($selected ? "checked":'')
384 .($submit_on_change ? " onclick='$submit_on_change'" : '')
385 .">".($label ? $label : '');
388 //-----------------------------------------------------------------------------------
389 function labelheader_cell($label, $params="")
391 echo "<td class='tableheader' $params>$label</td>\n";
394 function label_cell($label, $params="", $id=null)
400 $params .= " id='$id'";
401 $Ajax->addUpdate($id, $id, $label);
403 echo "<td $params>$label</td>\n";
408 function email_cell($label, $params="", $id=null)
410 label_cell("<a href='mailto:$label'>$label</a>", $params, $id);
413 function amount_decimal_cell($label, $params="", $id=null)
416 label_cell(price_decimal_format($label, $dec), "nowrap align=right ".$params, $id);
419 function amount_cell($label, $bold=false, $params="", $id=null)
422 label_cell("<b>".price_format($label)."</b>", "nowrap align=right ".$params, $id);
424 label_cell(price_format($label), "nowrap align=right ".$params, $id);
427 //JAM Allow entered unit prices to be fractional
428 function unit_amount_cell($label, $bold=false, $params="", $id=null)
431 label_cell("<b>".unit_price_format($label)."</b>", "nowrap align=right ".$params, $id);
433 label_cell(unit_price_format($label), "nowrap align=right ".$params, $id);
437 function percent_cell($label, $bold=false, $id=null)
440 label_cell("<b>".percent_format($label)."</b>", "nowrap align=right", $id);
442 label_cell(percent_format($label), "nowrap align=right", $id);
444 // 2008-06-15. Changed
445 function qty_cell($label, $bold=false, $dec=null, $id=null)
448 $dec = get_qty_dec();
450 label_cell("<b>".number_format2($label, $dec)."</b>", "nowrap align=right", $id);
452 label_cell(number_format2($label, $dec), "nowrap align=right", $id);
455 function label_cells($label, $value, $params="", $params2="", $id='')
458 echo "<td $params>$label</td>\n";
459 label_cell($value, $params2, $id);
462 function label_row($label, $value, $params="", $params2="", $leftfill=0, $id='')
467 echo "<td class='label'>$label</td>";
470 label_cells($label, $value, $params, $params2, $id);
472 echo "<td colspan=$leftfill></td>";
476 //-----------------------------------------------------------------------------------
478 function text_cells($label, $name, $value=null, $size="", $max="", $title=false,
479 $labparams="", $post_label="", $inparams="")
483 default_focus($name);
485 label_cell($label, $labparams);
489 $value = get_post($name);
490 echo "<input $inparams type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" value=\"$value\""
491 .($title ? " title='$title'" : '')
494 if ($post_label != "")
495 echo " " . $post_label;
498 $Ajax->addUpdate($name, $name, $value);
501 function text_cells_ex($label, $name, $size, $max=null, $init=null, $title=null,
502 $labparams=null, $post_label=null, $submit_on_change=false)
506 default_focus($name);
507 if (!isset($_POST[$name]) || $_POST[$name] == "")
510 $_POST[$name] = $init;
515 label_cell($label, $labparams);
521 $class = $submit_on_change ? 'class="searchbox"' : '';
522 echo "<input $class type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" value=\"" . $_POST[$name]. "\""
523 .($title ? " title='$title'": '')." >";
526 echo " " . $post_label;
529 $Ajax->addUpdate($name, $name, $_POST[$name]);
532 function text_row($label, $name, $value, $size, $max, $title=null, $params="", $post_label="")
534 echo "<tr><td class='label'>$label</td>";
535 text_cells(null, $name, $value, $size, $max, $title, $params, $post_label);
540 //-----------------------------------------------------------------------------------
542 function text_row_ex($label, $name, $size, $max=null, $title=null, $value=null, $params=null, $post_label=null)
544 echo "<tr><td class='label'>$label</td>";
545 text_cells_ex(null, $name, $size, $max, $value, $title, $params, $post_label);
550 //-----------------------------------------------------------------------------------
551 function email_row($label, $name, $value, $size, $max, $title=null, $params="", $post_label="")
554 $label = "<a href='Mailto:".$_POST[$name]."'>$label</a>";
555 text_row($label, $name, $value, $size, $max, $title, $params, $post_label);
558 function email_row_ex($label, $name, $size, $max=null, $title=null, $value=null, $params=null, $post_label=null)
561 $label = "<a href='Mailto:".$_POST[$name]."'>$label</a>";
562 text_row_ex($label, $name, $size, $max, $title, $value, $params, $post_label);
565 function link_row($label, $name, $value, $size, $max, $title=null, $params="", $post_label="")
567 $val = get_post($name);
569 if (strpos($val,'http://')===false)
570 $val = 'http://'.$val;
571 $label = "<a href='$val' target='_blank'>$label</a>";
573 text_row($label, $name, $value, $size, $max, $title, $params, $post_label);
576 function link_row_ex($label, $name, $size, $max=null, $title=null, $value=null, $params=null, $post_label=null)
578 $val = get_post($name);
580 if (strpos($val,'http://')===false)
581 $val = 'http://'.$val;
582 $label = "<a href='$val' target='_blank'>$label</a>";
584 text_row_ex($label, $name, $size, $max, $title, $value, $params, $post_label);
587 //-----------------------------------------------------------------------------------
589 // Since FA 2.2 $init parameter is superseded by $check.
590 // When $check!=null current date is displayed in red when set to other
591 // than current date.
593 function date_cells($label, $name, $title = null, $check=null, $inc_days=0,
594 $inc_months=0, $inc_years=0, $params=null, $submit_on_change=false)
596 global $use_date_picker, $path_to_root, $Ajax;
598 if (!isset($_POST[$name]) || $_POST[$name] == "")
600 if ($inc_years == 1001)
601 $_POST[$name] = null;
606 $dd = add_days($dd, $inc_days);
607 if ($inc_months != 0)
608 $dd = add_months($dd, $inc_months);
610 $dd = add_years($dd, $inc_years);
614 if ($use_date_picker)
615 $post_label = "<a tabindex='-1' href=\"javascript:date_picker(document.getElementsByName('$name')[0]);\">"
616 . " <img src='$path_to_root/themes/default/images/cal.gif' width='16' height='16' border='0' alt='"._('Click Here to Pick up the date')."'></a>\n";
621 label_cell($label, $params);
625 $class = $submit_on_change ? 'class="searchbox"' : '';
627 $aspect = $check ? 'aspect="cdate"' : '';
628 if ($check && (get_post($name) != Today()))
629 $aspect .= ' style="color:#FF0000"';
631 default_focus($name);
633 echo "<input type=\"text\" name=\"$name\" $class $aspect size=\"9\" maxlength=\"12\" value=\""
634 . $_POST[$name]. "\""
635 .($title ? " title='$title'": '')." > $post_label";
637 $Ajax->addUpdate($name, $name, $_POST[$name]);
640 function date_row($label, $name, $title=null, $check=null, $inc_days=0, $inc_months=0,
641 $inc_years=0, $params=null, $submit_on_change=false)
643 echo "<tr><td class='label'>$label</td>";
644 date_cells(null, $name, $title, $check, $inc_days, $inc_months,
645 $inc_years, $params, $submit_on_change);
649 //-----------------------------------------------------------------------------------
650 function password_row($label, $name, $value)
652 echo "<tr><td class='label'>$label</td>";
653 label_cell("<input type='password' name='$name' size=20 maxlength=20 value='$value' />");
657 //-----------------------------------------------------------------------------------
658 function file_cells($label, $name, $id="")
662 label_cells($label, "<input type='file' name='$name' $id />");
664 function file_row($label, $name, $id = "")
666 echo "<tr><td class='label'>$label</td>";
667 file_cells(null, $name, $id);
671 //-----------------------------------------------------------------------------------
673 function ref_cells($label, $name, $title=null, $init=null, $params=null, $submit_on_change=false)
675 text_cells_ex($label, $name, 16, 18, $init, $title, $params, null, $submit_on_change);
678 //-----------------------------------------------------------------------------------
680 function ref_row($label, $name, $title=null, $init=null, $submit_on_change=false)
682 echo "<tr><td class='label'>$label</td>";
683 ref_cells(null, $name, $title, $init, null, $submit_on_change);
687 //-----------------------------------------------------------------------------------
689 function percent_row($label, $name, $init=null)
692 if (!isset($_POST[$name]) || $_POST[$name]=="")
694 $_POST[$name] = $init == null ? '' : $init;
697 small_amount_row($label, $name, $_POST[$name], null, "%", user_percent_dec());
700 function amount_cells_ex($label, $name, $size, $max=null, $init=null, $params=null, $post_label=null, $dec=null)
705 $dec = user_price_dec();
706 if (!isset($_POST[$name]) || $_POST[$name] == "")
709 $_POST[$name] = $init;
716 $params = "class='label'";
717 label_cell($label, $params);
725 echo "<td align='right'>";
727 echo "<input class='amount' type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" dec=\"$dec\" value=\"" . $_POST[$name]. "\">";
730 echo "<span id='_{$name}_label'> $post_label</span>";
731 $Ajax->addUpdate($name, '_'.$name.'_label', $post_label);
734 $Ajax->addUpdate($name, $name, $_POST[$name]);
735 $Ajax->addAssign($name, $name, 'dec', $dec);
739 //-----------------------------------------------------------------------------------
741 function amount_cells($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
743 amount_cells_ex($label, $name, 15, 15, $init, $params, $post_label, $dec);
746 //JAM Allow entered unit prices to be fractional
747 function unit_amount_cells($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
750 $dec = user_price_dec()+2;
752 amount_cells_ex($label, $name, 15, 15, $init, $params, $post_label, $dec+2);
755 function amount_row($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
758 amount_cells($label, $name, $init, $params, $post_label, $dec);
762 function small_amount_row($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
765 small_amount_cells($label, $name, $init, $params, $post_label, $dec);
769 //-----------------------------------------------------------------------------------
771 function qty_cells($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
774 $dec = user_qty_dec();
776 amount_cells_ex($label, $name, 15, 15, $init, $params, $post_label, $dec);
779 function qty_row($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
782 $dec = user_qty_dec();
785 amount_cells($label, $name, $init, $params, $post_label, $dec);
789 function small_qty_row($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
792 $dec = user_qty_dec();
795 small_amount_cells($label, $name, $init, $params, $post_label, $dec);
799 //-----------------------------------------------------------------------------------
801 function small_amount_cells($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
803 amount_cells_ex($label, $name, 7, 12, $init, $params, $post_label, $dec);
806 //-----------------------------------------------------------------------------------
808 function small_qty_cells($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
811 $dec = user_qty_dec();
812 amount_cells_ex($label, $name, 7, 12, $init, $params, $post_label, $dec);
815 //-----------------------------------------------------------------------------------
817 function textarea_cells($label, $name, $value, $cols, $rows, $title = null, $params="")
821 default_focus($name);
823 echo "<td $params>$label</td>\n";
825 $value = (!isset($_POST[$name]) ? "" : $_POST[$name]);
826 echo "<td><textarea name='$name' cols='$cols' rows='$rows'"
827 .($title ? " title='$title'" : '')
828 .">$value</textarea></td>\n";
829 $Ajax->addUpdate($name, $name, $value);
832 function textarea_row($label, $name, $value, $cols, $rows, $title=null, $params="")
834 echo "<tr><td class='label'>$label</td>";
835 textarea_cells(null, $name, $value, $cols, $rows, $title, $params);
839 //-----------------------------------------------------------------------------------
841 function text_row_with_submit($label, $name, $value, $size, $max, $input_name, $input_value)
845 default_focus($name);
846 echo "<tr><td>$label</td>\n";
850 $value = (!isset($_POST[$name]) ? "" : $_POST[$name]);
851 echo "<input type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" value=\"$value\"> ";
853 submit($input_name, $input_value);
856 $Ajax->addUpdate($name, $name, $value);
859 //-----------------------------------------------------------------------------------
861 // When show_inactive page option is set
862 // displays value of inactive field as checkbox cell.
863 // Also updates database record after status change.
865 function inactive_control_cell($id, $value, $table, $key)
869 $name = "Inactive". $id;
870 $value = $value ? 1:0;
872 if (check_value('show_inactive')) {
873 if (isset($_POST['LInact'][$id]) && (get_post('_Inactive'.$id.'_update') ||
874 get_post('Update')) && (check_value('Inactive'.$id) != $value)) {
875 update_record_status($id, !$value, $table, $key);
877 echo '<td align="center">'. checkbox(null, $name, $value, true, '', "align='center'")
878 . hidden("LInact[$id]", $value, false) . '</td>';
882 // Displays controls for optional display of inactive records
884 function inactive_control_row($th) {
885 echo "<tr><td colspan=".(count($th)).">"
886 ."<div style='float:left;'>"
887 . checkbox(null, 'show_inactive', null, true). _("Show also Inactive")
888 ."</div><div style='float:right;'>"
889 . submit('Update', _('Update'), false, '', null)
893 // Inserts additional column header when display of inactive records is on.
895 function inactive_control_column(&$th) {
898 if (check_value('show_inactive'))
899 array_insert($th, count($th)-2 , _("Inactive"));
900 if (get_post('_show_inactive_update')) {
901 $Ajax->activate('_page_body');
905 function customer_credit_row($customer, $credit, $parms='')
907 global $path_to_root;
909 label_row( _("Current Credit:"),
910 "<a target='_blank' " . ($credit<0 ? 'class="redfg"' : '')
911 ."href='$path_to_root/sales/inquiry/customer_inquiry.php?customer_id=".$customer."'"
912 ." onclick=\"javascript:openWindow(this.href,this.target); return false;\" >"
913 . price_format($credit)
917 function supplier_credit_row($supplier, $credit, $parms='')
919 global $path_to_root;
921 label_row( _("Current Credit:"),
922 "<a target='_blank' " . ($credit<0 ? 'class="redfg"' : '')
923 ."href='$path_to_root/purchasing/inquiry/supplier_inquiry.php?supplier_id=".$supplier."'"
924 ." onclick=\"javascript:openWindow(this.href,this.target); return false;\" >"
925 . price_format($credit)