Changeset 882

Show
Ignore:
Timestamp:
07/10/08 12:11:16 (2 months ago)
Author:
rach
Message:

add description for the REFILL and PAYMENT for the ADMIN and AGENT

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/admin/Public/A2B_entity_card.php

    r777 r882  
    2222 
    2323/********************************* BATCH UPDATE ***********************************/ 
    24 getpost_ifset(array('popup_select', 'popup_formname', 'popup_fieldname', 'upd_inuse', 'upd_status', 'upd_language', 'upd_tariff', 'upd_credit', 'upd_credittype', 'upd_simultaccess', 'upd_currency', 'upd_typepaid', 'upd_creditlimit', 'upd_enableexpire', 'upd_expirationdate', 'upd_expiredays', 'upd_runservice', 'upd_runservice', 'batchupdate', 'check', 'type', 'mode', 'addcredit', 'cardnumber')); 
     24getpost_ifset(array('popup_select', 'popup_formname', 'popup_fieldname', 'upd_inuse', 'upd_status', 'upd_language', 'upd_tariff', 'upd_credit', 'upd_credittype', 'upd_simultaccess', 'upd_currency', 'upd_typepaid', 'upd_creditlimit', 'upd_enableexpire', 'upd_expirationdate', 'upd_expiredays', 'upd_runservice', 'upd_runservice', 'batchupdate', 'check', 'type', 'mode', 'addcredit', 'cardnumber','description')); 
    2525// CHECK IF REQUEST OF BATCH UPDATE 
    2626if ($batchupdate == 1 && is_array($check)) { 
     
    9797                $instance_table -> Update_table ($HD_Form -> DBHandle, $param_update, $FG_EDITION_CLAUSE, $func_table = null); 
    9898                 
    99                 $field_insert = "date, credit, card_id"; 
    100                 $value_insert = "now(), '$addcredit', '$id'"; 
     99                $field_insert = "date, credit, card_id , description"; 
     100                $value_insert = "now(), '$addcredit', '$id', '$description' "; 
    101101                $instance_sub_table = new Table("cc_logrefill", $field_insert); 
    102102                $result_query = $instance_sub_table -> Add_table ($HD_Form -> DBHandle, $value_insert, null, null);      
     
    154154<center><a href="#" target="_self" class="toggle_menu"><img class="toggle_hide2show" src="<?php echo KICON_PATH; ?>/toggle_hide2show.png" onmouseover="this.style.cursor='hand';" HEIGHT="16"> <font class="fontstyle_002"><?php echo gettext("REFILL");?> </font></a></center> 
    155155        <div class="tohide" style="display:none;"> 
     156        <form NAME="theForm"> 
    156157           <table width="90%" border="0" align="center"> 
    157         <tr><form NAME="theForm"> 
     158        <tr> 
    158159                   <td align="left" width="5%"><img src="<?php echo KICON_PATH; ?>/pipe.gif"> 
    159160                   </td> 
     
    170171                        </table> 
    171172                </td> 
    172                 <td  class="bgcolor_001" align="center">                                 
    173                                 <input class="form_enter" name="addcredit" size="18" maxlength="6" value=""> 
    174                                 <input class="form_input_button"  
     173                <td  class="bgcolor_001" align="center">         
     174                        <table> 
     175                                <tr> 
     176                                        <td> 
     177                                                <?php echo gettext("CREDIT :");?> 
     178                                        </td> 
     179                                        <td> 
     180                                                <input class="form_enter" name="addcredit" size="18" maxlength="6" value=""> <?php echo strtoupper($A2B->config['global']['base_currency']); ?> 
     181                                        </td> 
     182                                </tr> 
     183                                <tr> 
     184                                        <td> 
     185                                                <?php echo gettext("DESCRIPTION :");?> 
     186                                        </td> 
     187                                        <td> 
     188                                                <textarea class="form_input_textarea" name="description" cols="40" rows="4"></textarea>  
     189                                        </td> 
     190                                </tr> 
     191                                <tr> 
     192                                        <td colspan="2" align="center"> 
     193                                        <input class="form_input_button"  
    175194                                TYPE="button" VALUE="<?php echo gettext("ADD CREDIT TO THE SELECTED CARD");?>" onClick="openURL('<?php echo $_SERVER['PHP_SELF']?>?form_action=addcredit&stitle=Card_Refilled&current_page=<?php echo $current_page?>&order=<?php echo $order?>&sens=<?php echo $sens?>&id=')"> 
    176         </td></form> 
     195                 
     196                                        </td> 
     197                                </tr> 
     198                        </table>                         
     199                         
     200        </td> 
    177201        </tr> 
     202         
    178203      </table> 
     204      </form> 
    179205        </div> 
    180206</div> 
  • trunk/admin/Public/form_data/FG_var_logrefill.inc

    r715 r882  
    11<?php 
    22 
    3 getpost_ifset(array('id', 'card_id', 'date', 'credit')); 
     3getpost_ifset(array('id', 'card_id', 'date', 'credit','description')); 
    44 
    55 
     
    1616 
    1717$HD_Form -> AddViewElement(gettext("ID"), "cc_logrefill.id", "10%", "center", "sort"); 
    18 $HD_Form -> AddViewElement(gettext("CARD"), "username", "25%", "center", "sort", "", "30", "", "", "", "", "linktocustomer"); 
    19 $HD_Form -> AddViewElement(gettext("REFILL DATE"), "date", "30%", "center", "sort", "30", "", "", "", "", "", "display_dateformat"); 
    20 $HD_Form -> AddViewElement(gettext("REFILL AMOUNT"), "cc_logrefill.credit", "30%", "center", "sort"); 
     18$HD_Form -> AddViewElement(gettext("CARD"), "username", "15%", "center", "sort", "", "30", "", "", "", "", "linktocustomer"); 
     19$HD_Form -> AddViewElement(gettext("REFILL DATE"), "date", "20%", "center", "sort", "30", "", "", "", "", "", "display_dateformat"); 
     20$HD_Form -> AddViewElement(gettext("DESCRIPTION"), "description", "30%", "center", "sort"); 
     21$HD_Form -> AddViewElement(gettext("REFILL AMOUNT"), "cc_logrefill.credit", "20%", "center", "sort"); 
    2122 
    22 $HD_Form -> FieldViewElement ('cc_logrefill.id, username, date, cc_logrefill.credit   '); 
     23$HD_Form -> FieldViewElement ('cc_logrefill.id, username, date,description, cc_logrefill.credit       '); 
    2324 
    2425 
     
    7071                           "" , "", "", "", "" , "", "", gettext("Enter the amount in the currency base : ").BASE_CURRENCY ); 
    7172 
     73$HD_Form -> AddEditElement (gettext("DESCRIPTION"), 
     74        "description", 
     75        '', 
     76        "TEXTAREA", 
     77        "cols=50 rows=4", 
     78        "", 
     79        gettext("Insert the description"), 
     80        "" , "", "", "", "" , "", "", ""); 
     81                            
    7282 
    73  
    74 $HD_Form -> FieldEditElement ('card_id, date, credit'); 
     83$HD_Form -> FieldEditElement ('card_id, date, credit, description'); 
    7584 
    7685 
  • trunk/admin/Public/form_data/FG_var_payment.inc

    r715 r882  
    11<?php 
    22 
    3 getpost_ifset(array('id', 'card_id', 'date', 'payment')); 
     3getpost_ifset(array('id', 'card_id', 'date', 'payment','description')); 
    44 
    55 
     
    1616 
    1717$HD_Form -> AddViewElement(gettext("ID"), "cc_logpayment.id", "10%", "center", "sort"); 
    18 $HD_Form -> AddViewElement(gettext("CARD"), "username", "25%", "center", "sort", "", "30", "", "", "", "", "linktocustomer"); 
    19 $HD_Form -> AddViewElement(gettext("PAYMENT DATE"), "date", "30%", "center", "sort", "30", "", "", "", "", "", "display_dateformat"); 
    20 $HD_Form -> AddViewElement(gettext("PAYMENT AMOUNT"), "payment", "30%", "center", "sort"); 
     18$HD_Form -> AddViewElement(gettext("CARD"), "username", "20%", "center", "sort", "", "30", "", "", "", "", "linktocustomer"); 
     19$HD_Form -> AddViewElement(gettext("PAYMENT DATE"), "date", "20%", "center", "sort", "30", "", "", "", "", "", "display_dateformat"); 
     20$HD_Form -> AddViewElement(gettext("PAYMENT AMOUNT"), "payment", "10%", "center", "sort"); 
     21$HD_Form -> AddViewElement(gettext("DESCRIPTION"), "description", "30%", "center", "sort"); 
    2122$HD_Form -> AddViewElement(gettext("REFILL"), "id_logrefill", "20%", "center", "sort", "", "lie_link", "cc_logrefill", "credit, id", "id='%id'", "%1 ".BASE_CURRENCY." (id:%2)", "", "A2B_entity_logrefill.php"); 
    2223 
    23 $HD_Form -> FieldViewElement ('cc_logpayment.id, username, date, payment, id_logrefill'); 
     24$HD_Form -> FieldViewElement ('cc_logpayment.id, username, date, payment,description ,id_logrefill'); 
    2425 
    2526 
     
    7273 
    7374 
     75$HD_Form -> AddEditElement (gettext("DESCRIPTION"), 
     76        "description", 
     77        '', 
     78        "TEXTAREA", 
     79        "cols=50 rows=4", 
     80        "", 
     81        gettext("Insert the description"), 
     82        "" , "", "", "", "" , "", "", ""); 
    7483 
    75 $HD_Form -> FieldEditElement ('card_id, date, payment'); 
     84$HD_Form -> FieldEditElement ('card_id, date, description'); 
    7685 
    7786 
  • trunk/agent/Public/A2B_entity_card.php

    r839 r882  
    3737 
    3838/********************************* BATCH UPDATE ***********************************/ 
    39 getpost_ifset(array('popup_select', 'popup_formname', 'popup_fieldname', 'upd_inuse', 'upd_status', 'upd_language', 'upd_tariff', 'upd_credit', 'upd_credittype', 'upd_simultaccess', 'upd_currency', 'upd_typepaid', 'upd_creditlimit', 'upd_enableexpire', 'upd_expirationdate', 'upd_expiredays', 'upd_runservice', 'upd_runservice', 'batchupdate', 'check', 'type', 'mode', 'addcredit', 'cardnumber')); 
     39getpost_ifset(array('popup_select', 'popup_formname', 'popup_fieldname', 'upd_inuse', 'upd_status', 'upd_language', 'upd_tariff', 'upd_credit', 'upd_credittype', 'upd_simultaccess', 'upd_currency', 'upd_typepaid', 'upd_creditlimit', 'upd_enableexpire', 'upd_expirationdate', 'upd_expiredays', 'upd_runservice', 'upd_runservice', 'batchupdate', 'check', 'type', 'mode', 'addcredit', 'cardnumber','description')); 
    4040// CHECK IF REQUEST OF BATCH UPDATE 
    4141if ($batchupdate == 1 && is_array($check)) { 
     
    133133                        $update_msg ='<b><font color="green">'.gettext("Refill executed ").'</font></b>';        
    134134                         
    135                         $field_insert = "date, credit, card_id"; 
    136                         $value_insert = "now(), '$addcredit', '$id'"; 
     135                        $field_insert = "date, credit, card_id, description"; 
     136                        $value_insert = "now(), '$addcredit', '$id','$description'"; 
    137137                        $instance_sub_table = new Table("cc_logrefill", $field_insert); 
    138138                        $result_query = $instance_sub_table -> Add_table ($HD_Form -> DBHandle, $value_insert, null, null);      
     
    206206<center><a href="#" target="_self" class="toggle_menu"><img class="toggle_hide2show" src="<?php echo KICON_PATH; ?>/toggle_hide2show.png" onmouseover="this.style.cursor='hand';" HEIGHT="16"> <font class="fontstyle_002"><?php echo gettext("REFILL");?> </font></a></center> 
    207207        <div class="tohide" style="display:none;"> 
     208        <form NAME="theForm"> 
    208209           <table width="90%" border="0" align="center"> 
    209         <tr><form NAME="theForm"> 
     210        <tr> 
    210211                   <td align="left" width="5%"><img src="<?php echo KICON_PATH; ?>/pipe.gif"> 
    211212                   </td> 
     
    222223                        </table> 
    223224                </td> 
    224                 <td  class="bgcolor_001" align="center">                                 
    225                                 <input class="form_enter" name="addcredit" size="18" maxlength="6" value=""> 
    226                                 <input class="form_input_button"  
     225                <td  class="bgcolor_001" align="center">         
     226                        <table> 
     227                                <tr> 
     228                                        <td> 
     229                                                <?php echo gettext("CREDIT :");?> 
     230                                        </td> 
     231                                        <td> 
     232                                                <input class="form_enter" name="addcredit" size="18" maxlength="6" value=""> <?php echo strtoupper($A2B->config['global']['base_currency']); ?> 
     233                                        </td> 
     234                                </tr> 
     235                                <tr> 
     236                                        <td> 
     237                                                <?php echo gettext("DESCRIPTION :");?> 
     238                                        </td> 
     239                                        <td> 
     240                                                <textarea class="form_input_textarea" name="description" cols="40" rows="4"></textarea>  
     241                                        </td> 
     242                                </tr> 
     243                                <tr> 
     244                                        <td colspan="2" align="center"> 
     245                                        <input class="form_input_button"  
    227246                                TYPE="button" VALUE="<?php echo gettext("ADD CREDIT TO THE SELECTED CARD");?>" onClick="openURL('<?php echo $_SERVER['PHP_SELF']?>?form_action=addcredit&stitle=Card_Refilled&current_page=<?php echo $current_page?>&order=<?php echo $order?>&sens=<?php echo $sens?>&id=')"> 
    228         </td></form> 
     247                 
     248                                        </td> 
     249                                </tr> 
     250                        </table>                         
     251                         
     252        </td> 
    229253        </tr> 
     254         
    230255      </table> 
     256      </form> 
    231257        </div> 
    232258</div> 
    233  
    234  
    235259<div class="toggle_hide2show"> 
    236260<center><a href="#" target="_self" class="toggle_menu"><img class="toggle_hide2show" src="<?php echo KICON_PATH; ?>/toggle_hide2show.png" onmouseover="this.style.cursor='hand';" HEIGHT="16"> <font class="fontstyle_002"><?php echo gettext("SEARCH CARDS");?> </font></a></center> 
  • trunk/agent/Public/form_data/FG_var_logrefill.inc

    r822 r882  
    11<?php 
    22 
    3 getpost_ifset(array('id', 'card_id', 'date', 'credit')); 
     3getpost_ifset(array('id', 'card_id', 'date','description', 'credit')); 
    44 
    55 
     
    1717 
    1818$HD_Form -> AddViewElement(gettext("ID"), "cc_logrefill.id", "10%", "center", "sort"); 
    19 $HD_Form -> AddViewElement(gettext("CARD"), "username", "25%", "center", "sort", "", "30", "", "", "", "", "linktocustomer"); 
    20 $HD_Form -> AddViewElement(gettext("REFILL DATE"), "date", "30%", "center", "sort", "30", "", "", "", "", "", "display_dateformat"); 
    21 $HD_Form -> AddViewElement(gettext("REFILL AMOUNT"), "cc_logrefill.credit", "30%", "center", "sort"); 
     19$HD_Form -> AddViewElement(gettext("CARD"), "username", "15%", "center", "sort", "", "30", "", "", "", "", "linktocustomer"); 
     20$HD_Form -> AddViewElement(gettext("REFILL DATE"), "date", "20%", "center", "sort", "30", "", "", "", "", "", "display_dateformat"); 
     21$HD_Form -> AddViewElement(gettext("DESCRIPTION"), "description", "30%", "center", "sort"); 
     22$HD_Form -> AddViewElement(gettext("REFILL AMOUNT"), "cc_logrefill.credit", "20%", "center", "sort"); 
    2223 
    23 $HD_Form -> FieldViewElement ('cc_logrefill.id, username, date, cc_logrefill.credit   '); 
     24$HD_Form -> FieldViewElement ('cc_logrefill.id, username, date, description ,cc_logrefill.credit      '); 
    2425 
    2526 
     
    7273 
    7374 
     75$HD_Form -> AddEditElement (gettext("DESCRIPTION"), 
     76        "description", 
     77        '', 
     78        "TEXTAREA", 
     79        "cols=50 rows=4", 
     80        "", 
     81        gettext("Insert the description"), 
     82        "" , "", "", "", "" , "", "", ""); 
     83                            
    7484 
    75 $HD_Form -> FieldEditElement ('card_id, date, credit'); 
     85$HD_Form -> FieldEditElement ('card_id, date, credit, description'); 
    7686 
    7787 
  • trunk/agent/Public/form_data/FG_var_payment.inc

    r822 r882  
    1616$HD_Form -> FG_TABLE_DEFAULT_SENS = "DESC"; 
    1717 
     18 
     19 
    1820$HD_Form -> AddViewElement(gettext("ID"), "cc_logpayment.id", "10%", "center", "sort"); 
    19 $HD_Form -> AddViewElement(gettext("CARD"), "username", "25%", "center", "sort", "", "30", "", "", "", "", "linktocustomer"); 
    20 $HD_Form -> AddViewElement(gettext("PAYMENT DATE"), "date", "30%", "center", "sort", "30", "", "", "", "", "", "display_dateformat"); 
    21 $HD_Form -> AddViewElement(gettext("PAYMENT AMOUNT"), "payment", "30%", "center", "sort"); 
     21$HD_Form -> AddViewElement(gettext("CARD"), "username", "20%", "center", "sort", "", "30", "", "", "", "", "linktocustomer"); 
     22$HD_Form -> AddViewElement(gettext("PAYMENT DATE"), "date", "20%", "center", "sort", "30", "", "", "", "", "", "display_dateformat"); 
     23$HD_Form -> AddViewElement(gettext("PAYMENT AMOUNT"), "payment", "10%", "center", "sort"); 
     24$HD_Form -> AddViewElement(gettext("DESCRIPTION"), "description", "30%", "center", "sort"); 
    2225$HD_Form -> AddViewElement(gettext("REFILL"), "id_logrefill", "20%", "center", "sort", "", "lie_link", "cc_logrefill", "credit, id", "id='%id'", "%1 ".BASE_CURRENCY." (id:%2)", "", "A2B_entity_logrefill.php"); 
    2326 
    24 $HD_Form -> FieldViewElement ('cc_logpayment.id, username, date, payment, id_logrefill'); 
     27$HD_Form -> FieldViewElement ('cc_logpayment.id, username, date, payment,description ,id_logrefill'); 
     28 
    2529 
    2630 
     
    7478 
    7579 
    76 $HD_Form -> FieldEditElement ('card_id, date, payment'); 
    7780 
     81$HD_Form -> AddEditElement (gettext("DESCRIPTION"), 
     82        "description", 
     83        '', 
     84        "TEXTAREA", 
     85        "cols=50 rows=4", 
     86        "", 
     87        gettext("Insert the description"), 
     88        "" , "", "", "", "" , "", "", ""); 
    7889 
     90$HD_Form -> FieldEditElement ('card_id, date, description'); 
    7991 
    8092$HD_Form -> FG_FILTER_APPLY = true; 
  • trunk/common/javascript/card.js

    r1 r882  
    3838        // get calue of credits 
    3939        addcredit = document.theForm.addcredit.value; 
     40         
     41        description = ''; 
     42        // get calue of credits 
     43        description = document.theForm.description.value; 
     44                 
    4045                 
    4146        if ( (addcredit == 0) || (!IsNumeric(addcredit)) ){ 
     
    4550         
    4651        // redirect browser to the grabbed value (hopefully a URL) 
    47         self.location.href = theLINK + goURL + "&addcredit="+addcredit; 
     52        self.location.href = theLINK + goURL + "&addcredit="+addcredit +"&description="+description; 
     53         
     54        return false; 
    4855         
    4956} 
  • trunk/DataBase/mysql-5.x/UPDATE-a2billing-v1.3.0-to-v1.4.0-mysql.sql

    r877 r882  
    10061006ALTER TABLE cc_ratecard ADD additional_grace INT NOT NULL DEFAULT '0'; 
    10071007 
     1008-- add minimum cost option for a rate card 
     1009 
    10081010ALTER TABLE cc_ratecard ADD minimal_cost FLOAT NOT NULL DEFAULT '0'; 
     1011 
     1012-- add description for the REFILL AND PAYMENT 
     1013ALTER TABLE cc_logpayment ADD description MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_bin NULL ; 
     1014ALTER TABLE cc_logrefill ADD description MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_bin NULL ; 
  • trunk/DataBase/psql/UPDATE-a2billing-v1.3.0-to-v1.4.0-pgsql.sql

    r877 r882  
    10031003 
    10041004ALTER TABLE cc_ratecard ADD minimal_cost real NOT NULL DEFAULT 0; 
     1005 
     1006 
     1007-- add description for the REFILL AND PAYMENT 
     1008ALTER TABLE cc_logpayment ADD description text  ; 
     1009ALTER TABLE cc_logrefill ADD description text  ; 


Google