Use more explicit name for class and functions
This commit is contained in:
parent
61a5735300
commit
12ffb19cec
@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/salaries.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ $memberstatic=new Adherent($db);
|
|||||||
$paymentstatic=new Paiement($db);
|
$paymentstatic=new Paiement($db);
|
||||||
$paymentsupplierstatic=new PaiementFourn($db);
|
$paymentsupplierstatic=new PaiementFourn($db);
|
||||||
$paymentvatstatic=new TVA($db);
|
$paymentvatstatic=new TVA($db);
|
||||||
$paymentsalstatic=new Salaries($db);
|
$paymentsalstatic=new PaymentSalary($db);
|
||||||
$bankstatic=new Account($db);
|
$bankstatic=new Account($db);
|
||||||
$banklinestatic=new AccountLine($db);
|
$banklinestatic=new AccountLine($db);
|
||||||
|
|
||||||
@ -466,9 +466,9 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// VAT
|
// VAT
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu2 ON bu2.fk_bank = b.rowid AND bu2.type='payment_vat'";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu2 ON bu2.fk_bank = b.rowid AND bu2.type='payment_vat'";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."tva as t ON bu2.url_id = t.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."tva as t ON bu2.url_id = t.rowid";
|
||||||
// Salaries
|
// Salary payment
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu3 ON bu3.fk_bank = b.rowid AND bu3.type='payment_sal'";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu3 ON bu3.fk_bank = b.rowid AND bu3.type='payment_salary'";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."salaries as sal ON bu3.url_id = sal.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."payment_salary as sal ON bu3.url_id = sal.rowid";
|
||||||
}
|
}
|
||||||
if ($mode_search && ! empty($conf->adherent->enabled))
|
if ($mode_search && ! empty($conf->adherent->enabled))
|
||||||
{
|
{
|
||||||
@ -586,7 +586,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$paymentvatstatic->ref=$links[$key]['url_id'];
|
$paymentvatstatic->ref=$links[$key]['url_id'];
|
||||||
print ' '.$paymentvatstatic->getNomUrl(2);
|
print ' '.$paymentvatstatic->getNomUrl(2);
|
||||||
}
|
}
|
||||||
elseif ($links[$key]['type']=='payment_sal')
|
elseif ($links[$key]['type']=='payment_salary')
|
||||||
{
|
{
|
||||||
$paymentsalstatic->id=$links[$key]['url_id'];
|
$paymentsalstatic->id=$links[$key]['url_id'];
|
||||||
$paymentsalstatic->ref=$links[$key]['url_id'];
|
$paymentsalstatic->ref=$links[$key]['url_id'];
|
||||||
|
|||||||
@ -28,7 +28,7 @@ require '../../main.inc.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/salaries.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
@ -61,7 +61,7 @@ if (! $sortorder) $sortorder="DESC";
|
|||||||
$tva_static = new Tva($db);
|
$tva_static = new Tva($db);
|
||||||
$socialcontrib=new ChargeSociales($db);
|
$socialcontrib=new ChargeSociales($db);
|
||||||
$payment_sc_static=new PaymentSocialContribution($db);
|
$payment_sc_static=new PaymentSocialContribution($db);
|
||||||
$sal_static = new Salaries($db);
|
$sal_static = new PaymentSalary($db);
|
||||||
|
|
||||||
llxHeader('',$langs->trans("TaxAndDividendsArea"));
|
llxHeader('',$langs->trans("TaxAndDividendsArea"));
|
||||||
|
|
||||||
@ -83,15 +83,15 @@ if (GETPOST("mode") != 'sconly')
|
|||||||
print "<br>";
|
print "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Salaries
|
// Payment Salary
|
||||||
if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly')
|
if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly')
|
||||||
{
|
{
|
||||||
$sal = new Salaries($db);
|
$sal = new PaymentSalary($db);
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("SalPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
|
print_fiche_titre($langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
|
||||||
|
|
||||||
$sql = "SELECT s.rowid, s.amount, s.label, s.datev as dm";
|
$sql = "SELECT s.rowid, s.amount, s.label, s.datev as dm";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."salaries as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s";
|
||||||
$sql.= " WHERE s.entity = ".$conf->entity;
|
$sql.= " WHERE s.entity = ".$conf->entity;
|
||||||
if ($year > 0)
|
if ($year > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/compta/salaries/class/salaries.class.php
|
* \file htdocs/compta/salaries/class/paymentsalary.class.php
|
||||||
* \ingroup tax
|
* \ingroup tax
|
||||||
* \brief Class for tax module salaries
|
* \brief Class for tax module salary payment
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Put here all includes required by your class file
|
// Put here all includes required by your class file
|
||||||
@ -28,10 +28,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
|
|||||||
/**
|
/**
|
||||||
* Put here description of your class
|
* Put here description of your class
|
||||||
*/
|
*/
|
||||||
class Salaries extends CommonObject
|
class PaymentSalary extends CommonObject
|
||||||
{
|
{
|
||||||
//public $element='salaries'; //!< Id that identify managed objects
|
//public $element='payment_salary'; //!< Id that identify managed objects
|
||||||
//public $table_element='salaries'; //!< Name of table without prefix where object is stored
|
//public $table_element='payment_salary'; //!< Name of table without prefix where object is stored
|
||||||
|
|
||||||
var $id;
|
var $id;
|
||||||
var $ref;
|
var $ref;
|
||||||
@ -59,8 +59,8 @@ class Salaries extends CommonObject
|
|||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->element = 'salaries';
|
$this->element = 'payment_salary';
|
||||||
$this->table_element = 'salaries';
|
$this->table_element = 'payment_salary';
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ class Salaries extends CommonObject
|
|||||||
// Put here code to add control on parameters values
|
// Put here code to add control on parameters values
|
||||||
|
|
||||||
// Insert request
|
// Insert request
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."salaries(";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_salary(";
|
||||||
$sql.= "tms,";
|
$sql.= "tms,";
|
||||||
$sql.= "fk_user,";
|
$sql.= "fk_user,";
|
||||||
$sql.= "datep,";
|
$sql.= "datep,";
|
||||||
@ -125,12 +125,12 @@ class Salaries extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."salaries");
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_salary");
|
||||||
|
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$result=$interface->run_triggers('SALARIES_CREATE',$this,$user,$langs,$conf);
|
$result=$interface->run_triggers('PAYMENT_SALARY_CREATE',$this,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ class Salaries extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update request
|
// Update request
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."salaries SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_salary SET";
|
||||||
|
|
||||||
$sql.= " tms=".$this->db->idate($this->tms).",";
|
$sql.= " tms=".$this->db->idate($this->tms).",";
|
||||||
$sql.= " fk_user='".$this->fk_user."',";
|
$sql.= " fk_user='".$this->fk_user."',";
|
||||||
@ -205,7 +205,7 @@ class Salaries extends CommonObject
|
|||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$result=$interface->run_triggers('SALARIES_MODIFY',$this,$user,$langs,$conf);
|
$result=$interface->run_triggers('PAYMENT_SALARY_MODIFY',$this,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
}
|
}
|
||||||
@ -243,7 +243,7 @@ class Salaries extends CommonObject
|
|||||||
$sql.= " b.fk_type,";
|
$sql.= " b.fk_type,";
|
||||||
$sql.= " b.rappro";
|
$sql.= " b.rappro";
|
||||||
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."salaries as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid";
|
||||||
$sql.= " WHERE s.rowid = ".$id;
|
$sql.= " WHERE s.rowid = ".$id;
|
||||||
|
|
||||||
@ -298,7 +298,7 @@ class Salaries extends CommonObject
|
|||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."salaries";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."payment_salary";
|
||||||
$sql.= " WHERE rowid=".$this->id;
|
$sql.= " WHERE rowid=".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::delete sql=".$sql);
|
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||||
@ -313,7 +313,7 @@ class Salaries extends CommonObject
|
|||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$result=$interface->run_triggers('SALARIES_DELETE',$this,$user,$langs,$conf);
|
$result=$interface->run_triggers('PAYMENT_SALARY_DELETE',$this,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
|
|
||||||
@ -389,7 +389,7 @@ class Salaries extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Insertion dans table des paiement salaires
|
// Insertion dans table des paiement salaires
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."salaries (fk_user";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_salary (fk_user";
|
||||||
$sql.= ", datep";
|
$sql.= ", datep";
|
||||||
$sql.= ", datev";
|
$sql.= ", datev";
|
||||||
$sql.= ", amount";
|
$sql.= ", amount";
|
||||||
@ -419,12 +419,12 @@ class Salaries extends CommonObject
|
|||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."salaries"); // TODO devrait s'appeler payment_sal
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_salary"); // TODO devrait s'appeler payment_salary
|
||||||
|
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
$interface=new Interfaces($this->db);
|
$interface=new Interfaces($this->db);
|
||||||
$result=$interface->run_triggers('SALARIES_ADDPAYMENT',$this,$user,$langs,$conf);
|
$result=$interface->run_triggers('PAYMENT_SALARY_ADDPAYMENT',$this,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
|
|
||||||
@ -441,7 +441,7 @@ class Salaries extends CommonObject
|
|||||||
if ($result <= 0) dol_print_error($this->db);
|
if ($result <= 0) dol_print_error($this->db);
|
||||||
|
|
||||||
// Insert payment into llx_bank
|
// Insert payment into llx_bank
|
||||||
// Add link 'payment_sal' in bank_url between payment and bank transaction
|
// Add link 'payment_salary' in bank_url between payment and bank transaction
|
||||||
$bank_line_id = $acc->addline(
|
$bank_line_id = $acc->addline(
|
||||||
$this->datep,
|
$this->datep,
|
||||||
$this->paymenttype,
|
$this->paymenttype,
|
||||||
@ -464,10 +464,10 @@ class Salaries extends CommonObject
|
|||||||
$ok=0;
|
$ok=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add link 'payment_sal' in bank_url between payment and bank transaction
|
// Add link 'payment_salary' in bank_url between payment and bank transaction
|
||||||
$url=DOL_URL_ROOT.'/compta/salaries/fiche.php?id=';
|
$url=DOL_URL_ROOT.'/compta/salaries/fiche.php?id=';
|
||||||
|
|
||||||
$result=$acc->add_url_line($bank_line_id, $this->id, $url, "(SalPayment)", "payment_sal");
|
$result=$acc->add_url_line($bank_line_id, $this->id, $url, "(SalaryPayment)", "payment_salary");
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
$this->error=$acc->error;
|
$this->error=$acc->error;
|
||||||
@ -478,7 +478,7 @@ class Salaries extends CommonObject
|
|||||||
$linkaddedforthirdparty=array();
|
$linkaddedforthirdparty=array();
|
||||||
foreach ($this->amounts as $key => $value)
|
foreach ($this->amounts as $key => $value)
|
||||||
{
|
{
|
||||||
$sal = new Salaries ($this->db);
|
$sal = new PaymentSalary ($this->db);
|
||||||
|
|
||||||
$sal->fetch($key);
|
$sal->fetch($key);
|
||||||
$sal->fetch_user($this->fk_user);
|
$sal->fetch_user($this->fk_user);
|
||||||
@ -534,7 +534,7 @@ class Salaries extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function update_fk_bank($id_bank)
|
function update_fk_bank($id_bank)
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'salaries SET fk_bank = '.$id_bank;
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_salary SET fk_bank = '.$id_bank;
|
||||||
$sql.= ' WHERE rowid = '.$this->id;
|
$sql.= ' WHERE rowid = '.$this->id;
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
@ -566,7 +566,7 @@ class Salaries extends CommonObject
|
|||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='payment';
|
$picto='payment';
|
||||||
$label=$langs->trans("ShowSalPayment").': '.$this->ref;
|
$label=$langs->trans("ShowSalaryPayment").': '.$this->ref;
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/salaries.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
@ -38,10 +38,10 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||||
|
|
||||||
$sal = new Salaries($db);
|
$sal = new PaymentSalary($db);
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('taxsalcard'));
|
$hookmanager->initHooks(array('taxsalarycard'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ $form = new Form($db);
|
|||||||
|
|
||||||
if ($id)
|
if ($id)
|
||||||
{
|
{
|
||||||
$salpayment = new Salaries($db);
|
$salpayment = new PaymentSalary($db);
|
||||||
$result = $salpayment->fetch($id);
|
$result = $salpayment->fetch($id);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
@ -177,7 +177,7 @@ if ($action == 'create')
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("NewSalPayment"));
|
print_fiche_titre($langs->trans("NewSalaryPayment"));
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="label" size="40" value="'.($_POST["label"]?$_POST["label"]:$langs->trans("SalPayment")).'"></td></tr>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="label" size="40" value="'.($_POST["label"]?$_POST["label"]:$langs->trans("SalaryPayment")).'"></td></tr>';
|
||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td class="fieldrequired">'.$langs->trans("DateStartPeriod").'</td><td>';
|
print '<td class="fieldrequired">'.$langs->trans("DateStartPeriod").'</td><td>';
|
||||||
@ -252,7 +252,7 @@ if ($id)
|
|||||||
$head[$h][2] = 'card';
|
$head[$h][2] = 'card';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("SalPayment"), 0, 'payment');
|
dol_fiche_head($head, 'card', $langs->trans("SalaryPayment"), 0, 'payment');
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/salaries.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
|
||||||
|
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
|
|
||||||
@ -39,14 +39,14 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$salstatic = new Salaries($db);
|
$salstatic = new PaymentSalary($db);
|
||||||
$userstatic = new User($db);
|
$userstatic = new User($db);
|
||||||
|
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("SalPayments"));
|
print_fiche_titre($langs->trans("SalariesPayments"));
|
||||||
|
|
||||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, s.rowid, s.fk_user, s.amount, s.label, s.datev as dm";
|
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, s.rowid, s.fk_user, s.amount, s.label, s.datev as dm";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."salaries as s, ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s, ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql.= " WHERE u.rowid = s.fk_user";
|
$sql.= " WHERE u.rowid = s.fk_user";
|
||||||
$sql.= " AND s.entity = ".$conf->entity;
|
$sql.= " AND s.entity = ".$conf->entity;
|
||||||
$sql.= " ORDER BY dm DESC";
|
$sql.= " ORDER BY dm DESC";
|
||||||
|
|||||||
@ -1039,7 +1039,7 @@ CREATE TABLE IF NOT EXISTS `llx_expeditiondet_batch` (
|
|||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
--Salary payment in tax module
|
--Salary payment in tax module
|
||||||
CREATE TABLE IF NOT EXISTS `llx_salaries` (
|
CREATE TABLE IF NOT EXISTS `llx_payment_salary` (
|
||||||
`rowid` integer AUTO_INCREMENT PRIMARY KEY,
|
`rowid` integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
`tms` timestamp,
|
`tms` timestamp,
|
||||||
`fk_user` integer NOT NULL,
|
`fk_user` integer NOT NULL,
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
--
|
--
|
||||||
-- ===================================================================
|
-- ===================================================================
|
||||||
|
|
||||||
create table llx_salaries
|
create table llx_payment_salary
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
tms timestamp,
|
tms timestamp,
|
||||||
@ -41,7 +41,7 @@ VATToCollect=VAT purchases
|
|||||||
VATSummary=VAT Balance
|
VATSummary=VAT Balance
|
||||||
LT2SummaryES=IRPF Balance
|
LT2SummaryES=IRPF Balance
|
||||||
VATPaid=VAT paid
|
VATPaid=VAT paid
|
||||||
SalPaid=Salary paid
|
SalaryPaid=Salary paid
|
||||||
LT2PaidES=IRPF Paid
|
LT2PaidES=IRPF Paid
|
||||||
LT2CustomerES=IRPF sales
|
LT2CustomerES=IRPF sales
|
||||||
LT2SupplierES=IRPF purchases
|
LT2SupplierES=IRPF purchases
|
||||||
@ -65,7 +65,7 @@ PaymentCustomerInvoice=Customer invoice payment
|
|||||||
PaymentSupplierInvoice=Supplier invoice payment
|
PaymentSupplierInvoice=Supplier invoice payment
|
||||||
PaymentSocialContribution=Social contribution payment
|
PaymentSocialContribution=Social contribution payment
|
||||||
PaymentVat=VAT payment
|
PaymentVat=VAT payment
|
||||||
PaymentSal=Salary payment
|
PaymentSalary=Salary payment
|
||||||
ListPayment=List of payments
|
ListPayment=List of payments
|
||||||
ListOfPayments=List of payments
|
ListOfPayments=List of payments
|
||||||
ListOfCustomerPayments=List of customer payments
|
ListOfCustomerPayments=List of customer payments
|
||||||
@ -74,17 +74,17 @@ DatePayment=Payment date
|
|||||||
DateStartPeriod=Date start period
|
DateStartPeriod=Date start period
|
||||||
DateEndPeriod=Date end period
|
DateEndPeriod=Date end period
|
||||||
NewVATPayment=New VAT payment
|
NewVATPayment=New VAT payment
|
||||||
NewSalPayment=New Salary payment
|
NewSalaryPayment=New salary payment
|
||||||
newLT2PaymentES=New IRPF payment
|
newLT2PaymentES=New IRPF payment
|
||||||
LT2PaymentES=IRPF Payment
|
LT2PaymentES=IRPF Payment
|
||||||
LT2PaymentsES=IRPF Payments
|
LT2PaymentsES=IRPF Payments
|
||||||
VATPayment=VAT Payment
|
VATPayment=VAT Payment
|
||||||
VATPayments=VAT Payments
|
VATPayments=VAT Payments
|
||||||
SalPayment=Salary payment
|
SalaryPayment=Salary payment
|
||||||
SalPayments=Saalries payments
|
SalariesPayments=Salaries payments
|
||||||
SocialContributionsPayments=Social contributions payments
|
SocialContributionsPayments=Social contributions payments
|
||||||
ShowVatPayment=Show VAT payment
|
ShowVatPayment=Show VAT payment
|
||||||
ShowSalPayment=Show salary payment
|
ShowSalaryPayment=Show salary payment
|
||||||
TotalToPay=Total to pay
|
TotalToPay=Total to pay
|
||||||
TotalVATReceived=Total VAT received
|
TotalVATReceived=Total VAT received
|
||||||
CustomerAccountancyCode=Customer accountancy code
|
CustomerAccountancyCode=Customer accountancy code
|
||||||
|
|||||||
@ -41,6 +41,7 @@ VATToCollect=TVA achats
|
|||||||
VATSummary=Balance de TVA
|
VATSummary=Balance de TVA
|
||||||
LT2SummaryES=Balance de IRPF
|
LT2SummaryES=Balance de IRPF
|
||||||
VATPaid=TVA payée
|
VATPaid=TVA payée
|
||||||
|
SalaryPaid=Salaire payé
|
||||||
LT2PaidES=IRPF Payée
|
LT2PaidES=IRPF Payée
|
||||||
LT2CustomerES=IRPF ventes
|
LT2CustomerES=IRPF ventes
|
||||||
LT2SupplierES=IRPF achats
|
LT2SupplierES=IRPF achats
|
||||||
@ -64,7 +65,7 @@ PaymentCustomerInvoice=Règlement facture client
|
|||||||
PaymentSupplierInvoice=Règlement facture fournisseur
|
PaymentSupplierInvoice=Règlement facture fournisseur
|
||||||
PaymentSocialContribution=Règlement charge sociale
|
PaymentSocialContribution=Règlement charge sociale
|
||||||
PaymentVat=Règlement TVA
|
PaymentVat=Règlement TVA
|
||||||
PaymentSal=Règlement salaire
|
PaymentSalary=Règlement salaire
|
||||||
ListPayment=Liste des règlements
|
ListPayment=Liste des règlements
|
||||||
ListOfPayments=Liste des règlements
|
ListOfPayments=Liste des règlements
|
||||||
ListOfCustomerPayments=Liste des règlements clients
|
ListOfCustomerPayments=Liste des règlements clients
|
||||||
@ -73,17 +74,17 @@ DatePayment=Date de règlement
|
|||||||
DateStartPeriod=Date de début période
|
DateStartPeriod=Date de début période
|
||||||
DateEndPeriod=Date de fin période
|
DateEndPeriod=Date de fin période
|
||||||
NewVATPayment=Nouveau règlement de TVA
|
NewVATPayment=Nouveau règlement de TVA
|
||||||
NewSalPayment=Nouveau règlement de salaire
|
NewSalaryPayment=Nouveau règlement de salaire
|
||||||
newLT2PaymentES=Nouveau règlement de IRPF
|
newLT2PaymentES=Nouveau règlement de IRPF
|
||||||
LT2PaymentES=Règlement IRPF
|
LT2PaymentES=Règlement IRPF
|
||||||
LT2PaymentsES=Règlements IRPF
|
LT2PaymentsES=Règlements IRPF
|
||||||
VATPayment=Règlement TVA
|
VATPayment=Règlement TVA
|
||||||
VATPayments=Règlements TVA
|
VATPayments=Règlements TVA
|
||||||
SalPayment=Règlement salaire
|
SalaryPayment=Règlement salaire
|
||||||
SalPayments=Règlements des salaires
|
SalariesPayments=Règlements des salaires
|
||||||
SocialContributionsPayments=Règlements charges sociales
|
SocialContributionsPayments=Règlements charges sociales
|
||||||
ShowVatPayment=Affiche paiement TVA
|
ShowVatPayment=Afficher paiement TVA
|
||||||
ShowSalPayment=Affiche paiement salaire
|
ShowSalaryPayment=Afficher paiement salaire
|
||||||
TotalToPay=Total à payer
|
TotalToPay=Total à payer
|
||||||
TotalVATReceived=Total TVA perçue
|
TotalVATReceived=Total TVA perçue
|
||||||
CustomerAccountancyCode=Compte comptable client
|
CustomerAccountancyCode=Compte comptable client
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user