0000429: Class Action -> class Follow_Up

This commit is contained in:
Dany De Bontridder 2011-10-30 20:16:40 +00:00
parent 195e0f06dc
commit 0d4b7bec37
12 changed files with 34 additions and 34 deletions

View file

@ -43,7 +43,7 @@ if( isset($_REQUEST['sb']))
/*--------------------------------------------------------------------------- */
if ( isset($_POST['generate']))
{
$act=new Action($cn);
$act=new Follow_Up($cn);
$act->fromArray($_POST);
if ($act->ag_id == 0 )
{
@ -80,7 +80,7 @@ if ( $sub_action=="update" )
// Update the modification
if ( isset($_POST['save']))
{
$act2=new Action($cn);
$act2=new Follow_Up($cn);
$act2->fromArray($_POST );
if ( $act2->Update() == false )
@ -101,7 +101,7 @@ if ( $sub_action=="update" )
//----------------------------------------------------------------------
if ( isset ($_POST['add_action_here']) )
{
$act=new Action($cn);
$act=new Follow_Up($cn);
//----------------------------------------
@ -139,7 +139,7 @@ if ( $sub_action=="update" )
if ( $sub_action=='detail' )
{
echo '<div class="content">';
$act=new Action($cn);
$act=new Follow_Up($cn);
$act->ag_id=$ag_id;
echo $act->get();
$act->ag_comment=Decode($act->ag_comment);
@ -162,7 +162,7 @@ if ( $sub_action == 'delete' )
{
// confirmed
$cn->start();
$act=new Action($cn);
$act=new Follow_Up($cn);
$act->ag_id=$_REQUEST['ag_id'];
$act->get();
$act->remove();
@ -184,7 +184,7 @@ if ( $sub_action == "list" )
// Add an action
if ( $sub_action == "add_action" )
{
$act=new Action($cn);
$act=new Follow_Up($cn);
$act->fromArray($_POST );
$act->ag_id=0;
$act->d_id=0;
@ -208,12 +208,12 @@ if ( $sub_action == "add_action" )
echo '</div>';
}
//--------------------------------------------------------------------------------
// Save Action
// Save Follow_Up
// Stage 2 : Save the action + Files and generate eventually a document
//--------------------------------------------------------------------------------
if ( $sub_action == "save_action_st2" )
{
$act=new Action($cn);
$act=new Follow_Up($cn);
$act->fromArray($_POST);
$act->d_id=0;
$act->ag_ref_ag_id=(isset($_POST['ag_ref_ag_id']))?$_POST['ag_ref_ag_id']:0;
@ -359,7 +359,7 @@ function ShowActionList($cn,$p_base)
<?php
// show the action in
$act=new Action($cn);
$act=new Follow_Up($cn);
/*! \brief
* \note The field 'recherche' is about a part of the title or a ref. number
*/

View file

@ -27,13 +27,13 @@ $g_user->can_request(GECOUR);
$retour=HtmlInput::button_anchor(_('Retour'),'?ac='.$_REQUEST['ac'].'&my_action&'.dossier::get());
//-----------------------------------------------------
// Action
// Follow_Up
//-----------------------------------------------------
require_once("class_icard.php");
require_once("class_ispan.php");
require_once("class_ifile.php");
require_once("class_itext.php");
require_once("class_action.php");
require_once("class_follow_up.php");
require_once('class_iaction.php');
/*!\brief Show the list of action, this code should be common
* to several webpage. But for the moment we keep like that

View file

@ -2498,7 +2498,7 @@ class Acc_Ledger
/*!\brief return the last p_limit operation into an array
*\param $p_limit is the max of operation to return
*\return $p_array of Action object
*\return $p_array of Follow_Up object
*/
function get_last($p_limit)
{

View file

@ -20,7 +20,7 @@
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
require_once('class_own.php');
require_once('class_acc_account_ledger.php');
require_once('class_action.php');
require_once('class_follow_up.php');
require_once('class_acc_tva.php');
require_once('class_user.php');
require_once('class_zip_extended.php');
@ -755,7 +755,7 @@ class Document
break;
case 'REFERENCE':
$act=new Action($this->db);
$act=new Follow_Up($this->db);
$act->ag_id=$this->ag_id;
$act->get();
$r=$act->ag_ref;

View file

@ -32,7 +32,7 @@ require_once("class_document.php");
require_once("class_document_type.php");
require_once("class_document_modele.php");
require_once("user_common.php");
require_once('class_action_detail.php');
require_once('class_follow_up_detail.php');
require_once('class_inum.php');
/*!\file
@ -57,7 +57,7 @@ require_once('class_inum.php');
* The table document_type are the possible actions
*/
class Action
class Follow_Up
{
var $db; /*!< $db database connexion */
var $ag_comment; /*!< $ag_comment description (ag_gestion.ag_comment) */
@ -121,7 +121,7 @@ class Action
}
else
{
exit('class_action'.__LINE__.'Action::Display error unknown parameter'.$p_view);
exit('class_action'.__LINE__.'Follow_Up::Display error unknown parameter'.$p_view);
}
// Compute the widget
@ -546,7 +546,7 @@ class Action
$this->ag_priority=$row[0]['ag_priority'];
$this->ag_cal=$row[0]['ag_cal'];
$action_detail=new Action_Detail($this->db);
$action_detail=new Follow_Up_Detail($this->db);
$action_detail->set_parameter('ag_id',$this->ag_id);
$this->aAction_detail=$action_detail->load_all();
@ -982,7 +982,7 @@ class Action
/* save action details */
for ( $i = 0; $i < MAX_ARTICLE;$i++)
{
$act=new Action_Detail($this->db);
$act=new Follow_Up_Detail($this->db);
$act->from_array($_POST,$i);
$act->save();
}
@ -1056,7 +1056,7 @@ class Action
}
/*!\brief return the last p_limit operation into an array
*\param $p_limit is the max of operation to return
*\return $p_array of Action object
*\return $p_array of Follow_Up object
*/
function get_last($p_limit)
{

View file

@ -22,10 +22,10 @@ require_once ('class_database.php');
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
/*!\file
* \brief Action details are the details for a actions
* \brief Follow_Up details are the details for a actions
*/
/*!\brief Action Details are the details for an actions, it means
/*!\brief Follow_Up Details are the details for an actions, it means
* the details of an order, delivery order, submit a quote...
* this class is linked to the table action_detail
* - "id"=>"ad_id", primary key
@ -34,12 +34,12 @@ require_once ('class_database.php');
* - "price_unit"=>"ad_pu", price by unit
* - "quantity"=>"ad_quant", quantity
* - "tva_id"=>"ad_tva_id", tva_od
* - "tva_amount"=>"ad_tva_amount", vat amount
* - "tva_amount"=>"ad_tva_amount", vat amount
* - "total"=>"ad_total_amount", total amount including vat
* - "ag_id"=>"ag_id" => foreign key to action_gestion
* - db is the database connection
*/
class Action_Detail
class Follow_Up_Detail
{
private static $variable=array(
"id"=>"ad_id",
@ -140,9 +140,9 @@ class Action_Detail
}
/*!\brief retrieve all the details of an Action
/*!\brief retrieve all the details of an Follow_Up
*\return array of Action_Detail
*\see Action::get
*\see Follow_Up::get
*/
public function load_all()
{
@ -157,7 +157,7 @@ class Action_Detail
$aRet=array();
for($i=0;$i<count($res);$i++)
{
$a=new Action_Detail($this->db);
$a=new Follow_Up_Detail($this->db);
$row=$res[$i];
foreach ($row as $idx=>$value)
{
@ -191,7 +191,7 @@ class Action_Detail
exit(__FILE__.__LINE__.' : Non implémenté');
}
/*!\brief Fill an Action_Detail Object with the data contained in an array
*\param $array
*\param $array
- [ad_id7] => ad_id
- [e_march7] => f_id
- [e_march7_label] => ad_text

View file

@ -21,7 +21,7 @@ $Ledger=new Acc_Ledger($cn,0);
$last_ledger=array();
if ( $g_user->check_action(GESTION)==1)
{
$Operation=new Action($cn);
$Operation=new Follow_Up($cn);
$last_ledger=$Ledger->get_last(10);
$last_operation=$Operation->get_last(10);
}

View file

@ -142,7 +142,7 @@ for ($e=0;$e < Database::num_row($Res);$e++)
}
//-----------------------------------------------------
// Action
// Follow_Up
$pdf->SetFont('DejaVu','B',9);
$pdf->Cell(0,7,'Accès action',1,0,'C');
$pdf->Ln();

View file

@ -159,7 +159,7 @@ if ( isset ($_POST["FMOD_NAME"]) )
}
//---
// Cleaning Action
// Cleaning Follow_Up
//--
if ( isset($_POST['DOC'] ))
{

View file

@ -27,7 +27,7 @@
* - sd = this parameter is used here
* - $cn = database connection
*/
require_once('class_action.php');
require_once('class_follow_up.php');
$g_user->can_request(GECOUR);
/**

View file

@ -28,7 +28,7 @@
* - sd = this parameter is used here
* - $cn = database connection
*/
require_once('class_action.php');
require_once('class_follow_up.php');
load_all_script();
/**

View file

@ -27,7 +27,7 @@
* - sd = this parameter is used here
* - $cn = database connection
*/
require_once('class_action.php');
require_once('class_follow_up.php');
$g_user->can_request(GECOUR);
/**