Mode de paiement
This commit is contained in:
parent
b23783bf83
commit
fd9a5d0ca8
2 changed files with 5 additions and 39 deletions
|
|
@ -177,16 +177,15 @@ class Acc_Payment
|
|||
$sql="delete from mod_payment where mp_id=$1";
|
||||
$this->cn->exec_sql($sql,array($this->mp_id));
|
||||
}
|
||||
/*!\brief retrieve all the data for a certain ledger
|
||||
/*!\brief retrieve all the data for all ledgers
|
||||
*\param non
|
||||
*\return an array of row
|
||||
*/
|
||||
public function get_all()
|
||||
{
|
||||
$sql='select mp_id '.
|
||||
' from mod_payment '.
|
||||
' where jrn_def_id=$1';
|
||||
$array=$this->cn->get_array($sql,array($this->jrn_def_id));
|
||||
$sql='select mp_id,mp_lib '.
|
||||
' from mod_payment order by mp_lib';
|
||||
$array=$this->cn->get_array($sql);
|
||||
$ret=array();
|
||||
if ( !empty($array) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -114,10 +114,9 @@ if ( $sb=='insert')
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>Journaux d\' achat</legend>';
|
||||
echo '<legend>Journaux </legend>';
|
||||
/* Get the data from database */
|
||||
$mp=new Acc_Payment($cn);
|
||||
$mp->set_parameter('type','ACH');
|
||||
$array=$mp->get_all();
|
||||
/* if there are data show them in a table */
|
||||
if ( ! empty ($array))
|
||||
|
|
@ -138,37 +137,5 @@ if ( ! empty ($array))
|
|||
echo '</table>';
|
||||
}
|
||||
echo '</fieldset>';
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// LEDGER SOLD
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>Journaux de vente</legend>';
|
||||
$mp=new Acc_Payment($cn);
|
||||
$mp->set_parameter('type','VEN');
|
||||
$array=$mp->get_all();
|
||||
/* if there are data show them in a table */
|
||||
if ( ! empty ($array))
|
||||
{
|
||||
echo '<table style="border: 2px outset blue; width: 100%;" >';
|
||||
echo $tr.$th.'Libellé'.$eth.$th.'Type de fiche'
|
||||
.$eth.$th.'enregistré dans le journal'.$eth.
|
||||
$th.' Avec la fiche'.$eth.$th.'Action'.$eth.$etr;
|
||||
foreach ($array as $row)
|
||||
{
|
||||
echo $tr;
|
||||
echo $row->row();
|
||||
echo $td.HtmlInput::button_anchor('Modifie','?p_action=divers&sa=mp&sb=change&'.dossier::get().
|
||||
'&id='.$row->get_parameter('id'));
|
||||
echo $etr;
|
||||
|
||||
}
|
||||
echo '</table>';
|
||||
}
|
||||
echo '</fieldset>';
|
||||
// Button to insert new one
|
||||
echo HtmlInput::button_anchor(_('Ajout'),'?p_action=divers&sa=mp&sb=ins&'.dossier::get());
|
||||
|
||||
echo '</div>';
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue