diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index bb36fc7af21..00000000000 --- a/.cvsignore +++ /dev/null @@ -1,14 +0,0 @@ -index.php -*.htaccess -*.settings -*.buildpath -*.project -*.cache -*.log -*.DS_Store -document -documents -DEBIAN -install.lock -*.patch -default.properties diff --git a/ChangeLog b/ChangeLog index 33d948133b1..f91e2ea35a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ For users: - New: Can export into Excel 2007 format. - New: Add hidden option CASHDESK_FORCE_STOCK_ON_BILL - New: Can search on part of barcode into POS module. +- New: Cheques into cheques receipts are ordered by operation date. - Fix: Can use POS module with several concurrent users. For developers: diff --git a/build/.cvsignore b/build/.cvsignore deleted file mode 100644 index 53dd6ee2abd..00000000000 --- a/build/.cvsignore +++ /dev/null @@ -1,19 +0,0 @@ -dolibarr-*.exe -dolibarr-*.tgz -dolibarr-*.zip -dolibarr-*.rpm -dolibarr-*.deb -makepack-google.conf -module_google-*.tgz -module_pibarcode-1.0.tgz -*.exe -*.tgz -*.torrent -*.zip -version-phpsane.txt -makepack-phpsane.conf -html -*.deb -*.dsc -*.tar.gz -*.changes diff --git a/build/exe/doliwamp/.cvsignore b/build/exe/doliwamp/.cvsignore deleted file mode 100644 index b0ebc4e224b..00000000000 --- a/build/exe/doliwamp/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -*.db -ca_dolibarr.key -doliwamptest.iss diff --git a/dev/.cvsignore b/dev/.cvsignore deleted file mode 100644 index 79c6997b865..00000000000 --- a/dev/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -spec diff --git a/dev/phpunit/.cvsignore b/dev/phpunit/.cvsignore deleted file mode 100644 index 085e8baf0c8..00000000000 --- a/dev/phpunit/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Thumbs.db diff --git a/dev/skeletons/.cvsignore b/dev/skeletons/.cvsignore deleted file mode 100644 index 2dda6229d24..00000000000 --- a/dev/skeletons/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -out.* -socpeople* diff --git a/dev/test/.cvsignore b/dev/test/.cvsignore deleted file mode 100755 index ea7f2ddf499..00000000000 --- a/dev/test/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -example*.pdf diff --git a/dev/xdebug/.cvsignore b/dev/xdebug/.cvsignore deleted file mode 100644 index 085e8baf0c8..00000000000 --- a/dev/xdebug/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Thumbs.db diff --git a/doc/images/.cvsignore b/doc/images/.cvsignore deleted file mode 100644 index 98e6ef67fad..00000000000 --- a/doc/images/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.db diff --git a/htdocs/.cvsignore b/htdocs/.cvsignore deleted file mode 100644 index 3ae525b6634..00000000000 --- a/htdocs/.cvsignore +++ /dev/null @@ -1,10 +0,0 @@ -google -.htaccess -.DS_Store -.documents -dolibarr_mail -demo_pwc -phpsane -test.php -custom -custom2 diff --git a/htdocs/admin/.cvsignore b/htdocs/admin/.cvsignore deleted file mode 100644 index 284446f4393..00000000000 --- a/htdocs/admin/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.php diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 4e38149717e..7c72d94b83a 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -170,7 +170,7 @@ if ($action == 'classin') llxHeader(); -$html = new Form($db); +$form = new Form($db); /* * Action create @@ -191,17 +191,17 @@ if ($action == 'create') print ""; print ''.$langs->trans("Type").''; - print $html->select_type_fees(GETPOST("type"),'type',1); + print $form->select_type_fees(GETPOST("type"),'type',1); print ''; print ""; print ''.$langs->trans("Person").''; - print $html->select_users(GETPOST("fk_user"),'fk_user',1); + print $form->select_users(GETPOST("fk_user"),'fk_user',1); print ''; print ""; print ''.$langs->trans("Date").''; - print $html->select_date($datec?$datec:-1,'','','','','add',1,1); + print $form->select_date($datec?$datec:-1,'','','','','add',1,1); print ''; // Km @@ -210,7 +210,7 @@ if ($action == 'create') // Company print ""; print ''.$langs->trans("CompanyVisited").''; - print $html->select_societes(GETPOST("socid"),'socid','',1); + print $form->select_societes(GETPOST("socid"),'socid','',1); print ''; // Public note @@ -272,18 +272,18 @@ else if ($id) // Type print ""; print ''.$langs->trans("Type").''; - print $html->select_type_fees($_POST["type"]?$_POST["type"]:$object->type,'type',0); + print $form->select_type_fees($_POST["type"]?$_POST["type"]:$object->type,'type',0); print ''; // Who print ""; print ''.$langs->trans("Person").''; - print $html->select_users($_POST["fk_user"]?$_POST["fk_user"]:$object->fk_user,'fk_user',0); + print $form->select_users($_POST["fk_user"]?$_POST["fk_user"]:$object->fk_user,'fk_user',0); print ''; // Date print ''.$langs->trans("Date").''; - print $html->select_date($object->date,'','','','','update'); + print $form->select_date($object->date,'','','','','update'); print ''; // Km @@ -294,7 +294,7 @@ else if ($id) // Where print ""; print ''.$langs->trans("CompanyVisited").''; - print $html->select_societes($soc->id,'socid','',1); + print $form->select_societes($soc->id,'socid','',1); print ''; // Public note @@ -329,24 +329,19 @@ else if ($id) */ if ($action == 'delete') { - $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); + $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete"); if ($ret == 'html') print '
'; } $soc = new Societe($db); if ($object->socid) $soc->fetch($object->socid); - - if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && $user->rights->deplacement->creer) - { - include(DOL_DOCUMENT_ROOT.'/core/tpl/ajaxeditinplace.tpl.php'); - } print ''; // Ref print ""; print ''; // Type @@ -361,12 +356,12 @@ else if ($id) // Date print ''; // Km/Price print ''; - print ''; + print ''; // Where print ''; @@ -384,7 +379,7 @@ else if ($id) print '
'.$langs->trans("Ref").''; - print $html->showrefnav($object,'id','',1,'rowid','ref',''); + print $form->showrefnav($object,'id','',1,'rowid','ref',''); print '
'.$langs->trans("Date").''; - print dol_print_date($object->date,'day'); + print $form->editInPlace($object->date, 'dated', $user->rights->deplacement->creer, 'datepicker'); print '
'.$langs->trans("FeesKilometersOrAmout").'
'.$object->km.'
'.$form->editInPlace($object->km, 'km', $user->rights->deplacement->creer, 'numeric').'
'.$langs->trans("CompanyVisited").'
'; - if ($action != 'classify') + if ($action != 'classify' && $user->rights->deplacement->creer) { print ''; print ''; @@ -410,9 +405,7 @@ else if ($id) // Public note print ''; print '"; // Private note @@ -420,9 +413,7 @@ else if ($id) { print ''; print '"; } diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php new file mode 100644 index 00000000000..b6ac1e02af9 --- /dev/null +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -0,0 +1,595 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/compta/localtax/class/localtax.class.php + * \ingroup tax + * \author Laurent Destailleur + */ + +require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php"); + + +/** + * \class Localtax + * \brief Put here description of your class + */ +class localtax extends CommonObject +{ + var $id; + var $ref; + var $tms; + var $datep; + var $datev; + var $amount; + var $label; + var $note; + var $fk_bank; + var $fk_user_creat; + var $fk_user_modif; + + /** + * Constructor + * + * @param DoliDB $DB Database handler + */ + function __construct($DB) + { + $this->db = $DB; + } + + + /** + * Create in database + * + * @param User $user User that create + * @return int <0 if KO, >0 if OK + */ + function create($user) + { + global $conf, $langs; + + // Clean parameters + $this->amount=trim($this->amount); + $this->label=trim($this->label); + $this->note=trim($this->note); + $this->fk_bank=trim($this->fk_bank); + $this->fk_user_creat=trim($this->fk_user_creat); + $this->fk_user_modif=trim($this->fk_user_modif); + + // Insert request + $sql = "INSERT INTO ".MAIN_DB_PREFIX."localtax("; + $sql.= "tms,"; + $sql.= "datep,"; + $sql.= "datev,"; + $sql.= "amount,"; + $sql.= "label,"; + $sql.= "note,"; + $sql.= "fk_bank,"; + $sql.= "fk_user_creat,"; + $sql.= "fk_user_modif"; + $sql.= ") VALUES ("; + $sql.= " ".$this->db->idate($this->tms).","; + $sql.= " ".$this->db->idate($this->datep).","; + $sql.= " ".$this->db->idate($this->datev).","; + $sql.= " '".$this->amount."',"; + $sql.= " '".$this->label."',"; + $sql.= " '".$this->note."',"; + $sql.= " ".($this->fk_bank <= 0 ? "NULL" : "'".$this->fk_bank."'").","; + $sql.= " '".$this->fk_user_creat."',"; + $sql.= " '".$this->fk_user_modif."'"; + $sql.= ")"; + + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."localtax"); + + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('LOCALTAX_CREATE',$this,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers + + return $this->id; + } + else + { + $this->error="Error ".$this->db->lasterror(); + dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); + return -1; + } + } + + /** + * Update database + * + * @param User $user User that modify + * @param int $notrigger 0=no, 1=yes (no update trigger) + * @return int <0 if KO, >0 if OK + */ + function update($user=0, $notrigger=0) + { + global $conf, $langs; + + // Clean parameters + $this->amount=trim($this->amount); + $this->label=trim($this->label); + $this->note=trim($this->note); + $this->fk_bank=trim($this->fk_bank); + $this->fk_user_creat=trim($this->fk_user_creat); + $this->fk_user_modif=trim($this->fk_user_modif); + + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX."localtax SET"; + $sql.= " tms=".$this->db->idate($this->tms).","; + $sql.= " datep=".$this->db->idate($this->datep).","; + $sql.= " datev=".$this->db->idate($this->datev).","; + $sql.= " amount='".$this->amount."',"; + $sql.= " label='".$this->db->escape($this->label)."',"; + $sql.= " note='".$this->db->escape($this->note)."',"; + $sql.= " fk_bank='".$this->fk_bank."',"; + $sql.= " fk_user_creat='".$this->fk_user_creat."',"; + $sql.= " fk_user_modif='".$this->fk_user_modif."'"; + $sql.= " WHERE rowid=".$this->id; + + dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + $resql = $this->db->query($sql); + if (! $resql) + { + $this->error="Error ".$this->db->lasterror(); + dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR); + return -1; + } + + if (! $notrigger) + { + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('LOCALTAX_MODIFY',$this,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers + } + + return 1; + } + + + /** + * Load object in memory from database + * + * @param int $id Object id + * @return int <0 if KO, >0 if OK + */ + function fetch($id) + { + global $langs; + $sql = "SELECT"; + $sql.= " t.rowid,"; + $sql.= " t.tms,"; + $sql.= " t.datep,"; + $sql.= " t.datev,"; + $sql.= " t.amount,"; + $sql.= " t.label,"; + $sql.= " t.note,"; + $sql.= " t.fk_bank,"; + $sql.= " t.fk_user_creat,"; + $sql.= " t.fk_user_modif,"; + $sql.= " b.fk_account,"; + $sql.= " b.fk_type,"; + $sql.= " b.rappro"; + $sql.= " FROM ".MAIN_DB_PREFIX."localtax as t"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid"; + $sql.= " WHERE t.rowid = ".$id; + + dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) + { + if ($this->db->num_rows($resql)) + { + $obj = $this->db->fetch_object($resql); + + $this->id = $obj->rowid; + $this->ref = $obj->rowid; + $this->tms = $this->db->jdate($obj->tms); + $this->datep = $this->db->jdate($obj->datep); + $this->datev = $this->db->jdate($obj->datev); + $this->amount = $obj->amount; + $this->label = $obj->label; + $this->note = $obj->note; + $this->fk_bank = $obj->fk_bank; + $this->fk_user_creat = $obj->fk_user_creat; + $this->fk_user_modif = $obj->fk_user_modif; + $this->fk_account = $obj->fk_account; + $this->fk_type = $obj->fk_type; + $this->rappro = $obj->rappro; + } + $this->db->free($resql); + + return 1; + } + else + { + $this->error="Error ".$this->db->lasterror(); + dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); + return -1; + } + } + + + /** + * Delete object in database + * + * @param User $user User that delete + * @return int <0 if KO, >0 if OK + */ + function delete($user) + { + global $conf, $langs; + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."localtax"; + $sql.= " WHERE rowid=".$this->id; + + dol_syslog(get_class($this)."::delete sql=".$sql, LOG_DEBUG); + $resql = $this->db->query($sql); + if (! $resql) + { + $this->error="Error ".$this->db->lasterror(); + dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); + return -1; + } + + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('LOCALTAX_DELETE',$this,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers + + return 1; + } + + + /** + * Initialise an instance with random values. + * Used to build previews or test instances. + * id must be 0 if object instance is a specimen. + * + * @return void + */ + function initAsSpecimen() + { + $this->id=0; + + $this->tms=''; + $this->datep=''; + $this->datev=''; + $this->amount=''; + $this->label=''; + $this->note=''; + $this->fk_bank=''; + $this->fk_user_creat=''; + $this->fk_user_modif=''; + } + + + /** + * Hum la fonction s'appelle 'Solde' elle doit a mon avis calcluer le solde de localtax, non ? + * + */ + function solde($year = 0) + { + + $reglee = $this->localtax_sum_reglee($year); + + $payee = $this->localtax_sum_payee($year); + $collectee = $this->localtax_sum_collectee($year); + + $solde = $reglee - ($collectee - $payee); + + return $solde; + } + + /** + * Total de la localtax des factures emises par la societe. + * + */ + + function localtax_sum_collectee($year = 0) + { + + $sql = "SELECT sum(f.localtax) as amount"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.paye = 1"; + + if ($year) + { + $sql .= " AND f.datef >= '$year-01-01' AND f.datef <= '$year-12-31' "; + } + + $result = $this->db->query($sql); + + if ($result) + { + if ($this->db->num_rows($result)) + { + $obj = $this->db->fetch_object($result); + return $obj->amount; + } + else + { + return 0; + } + + $this->db->free($result); + + } + else + { + print $this->db->error(); + return -1; + } + } + + /** + * localtax payed + * + */ + + function localtax_sum_payee($year = 0) + { + + $sql = "SELECT sum(f.total_localtax) as total_localtax"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; + + if ($year) + { + $sql .= " WHERE f.datef >= '$year-01-01' AND f.datef <= '$year-12-31' "; + } + $result = $this->db->query($sql); + + if ($result) + { + if ($this->db->num_rows($result)) + { + $obj = $this->db->fetch_object($result); + return $obj->total_localtax; + } + else + { + return 0; + } + + $this->db->free(); + + } + else + { + print $this->db->error(); + return -1; + } + } + + + /** + * localtax payed + * Total de la localtax payed + * + */ + + function localtax_sum_reglee($year = 0) + { + + $sql = "SELECT sum(f.amount) as amount"; + $sql .= " FROM ".MAIN_DB_PREFIX."localtax as f"; + + if ($year) + { + $sql .= " WHERE f.datev >= '$year-01-01' AND f.datev <= '$year-12-31' "; + } + + $result = $this->db->query($sql); + + if ($result) + { + if ($this->db->num_rows($result)) + { + $obj = $this->db->fetch_object($result); + return $obj->amount; + } + else + { + return 0; + } + + $this->db->free(); + + } + else + { + print $this->db->error(); + return -1; + } + } + + + /** + * Add a payment of localtax + * + * @param User $user Object user that insert + * @return int <0 if KO, rowid in localtax table if OK + */ + function addPayment($user) + { + global $conf,$langs; + + $this->db->begin(); + + // Check parameters + $this->amount=price2num($this->amount); + if (! $this->label) + { + $this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")); + return -3; + } + if ($this->amount <= 0) + { + $this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount")); + return -4; + } + if ($conf->banque->enabled && (empty($this->accountid) || $this->accountid <= 0)) + { + $this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Account")); + return -5; + } + if ($conf->banque->enabled && (empty($this->paymenttype) || $this->paymenttype <= 0)) + { + $this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode")); + return -5; + } + + // Insertion dans table des paiement localtax + $sql = "INSERT INTO ".MAIN_DB_PREFIX."localtax (datep, datev, amount"; + if ($this->note) $sql.=", note"; + if ($this->label) $sql.=", label"; + $sql.= ", fk_user_creat, fk_bank"; + $sql.= ") "; + $sql.= " VALUES ('".$this->db->idate($this->datep)."',"; + $sql.= "'".$this->db->idate($this->datev)."'," . $this->amount; + if ($this->note) $sql.=", '".$this->db->escape($this->note)."'"; + if ($this->label) $sql.=", '".$this->db->escape($this->label)."'"; + $sql.=", '".$user->id."', NULL"; + $sql.= ")"; + + dol_syslog(get_class($this)."::addPayment sql=".$sql); + $result = $this->db->query($sql); + if ($result) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."localtax"); // TODO devrait s'appeler paiementlocaltax + if ($this->id > 0) + { + $ok=1; + if ($conf->banque->enabled) + { + // Insertion dans llx_bank + require_once(DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'); + + $acc = new Account($this->db); + $result=$acc->fetch($this->accountid); + if ($result <= 0) dol_print_error($db); + + $bank_line_id = $acc->addline($this->datep, $this->paymenttype, $this->label, -abs($this->amount), '', '', $user); + + // Mise a jour fk_bank dans llx_localtax. On connait ainsi la ligne de localtax qui a g�n�r� l'�criture bancaire + if ($bank_line_id > 0) + { + $this->update_fk_bank($bank_line_id); + } + else + { + $this->error=$acc->error; + $ok=0; + } + + // Mise a jour liens + $result=$acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/compta/localtax/fiche.php?id=', "(VATPayment)", "payment_vat"); + if ($result < 0) + { + $this->error=$acc->error; + $ok=0; + } + } + + if ($ok) + { + $this->db->commit(); + return $this->id; + } + else + { + $this->db->rollback(); + return -3; + } + } + else + { + $this->error=$this->db->error(); + $this->db->rollback(); + return -2; + } + } + else + { + $this->error=$this->db->error(); + $this->db->rollback(); + return -1; + } + } + + /** + * Update the link betwen localtax payment and the line into llx_bank + * + * @param int $id Id bank account + * @return int <0 if KO, >0 if OK + */ + function update_fk_bank($id) + { + $sql = 'UPDATE llx_localtax set fk_bank = '.$id; + $sql.= ' WHERE rowid = '.$this->id; + $result = $this->db->query($sql); + if ($result) + { + return 1; + } + else + { + dol_print_error($this->db); + return -1; + } + } + + + /** + * Returns clickable name + * + * @param int $withpicto 0=Link, 1=Picto into link, 2=Picto + * @param string $option Sur quoi pointe le lien + * @return string Chaine avec URL + */ + function getNomUrl($withpicto=0, $option='') + { + global $langs; + + $result=''; + + $lien = ''; + $lienfin=''; + + $picto='payment'; + $label=$langs->trans("ShowVatPayment").': '.$this->ref; + + if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin); + if ($withpicto && $withpicto != 2) $result.=' '; + if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin; + return $result; + } + +} +?> \ No newline at end of file diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php new file mode 100644 index 00000000000..6f2bbae3029 --- /dev/null +++ b/htdocs/compta/localtax/clients.php @@ -0,0 +1,299 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/compta/localtax/clients.php + * \ingroup tax + * \brief Third parties localtax report + */ + +require('../../main.inc.php'); +require_once(DOL_DOCUMENT_ROOT."/core/lib/report.lib.php"); +require_once(DOL_DOCUMENT_ROOT."/core/lib/tax.lib.php"); +require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"); +require_once(DOL_DOCUMENT_ROOT."/compta/localtax/class/localtax.class.php"); + +$langs->load("bills"); +$langs->load("compta"); +$langs->load("companies"); +$langs->load("products"); + +// Date range +$year=GETPOST("year"); +if (empty($year)) +{ + $year_current = strftime("%Y",dol_now()); + $year_start = $year_current; +} else { + $year_current = $year; + $year_start = $year; +} +$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); +$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); +// Quarter +if (empty($date_start) || empty($date_end)) // We define date_start and date_end +{ + $q=GETPOST("q"); + if (empty($q)) + { + if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); } + else + { + $month_current = strftime("%m",dol_now()); + if ($month_current >= 10) $q=4; + elseif ($month_current >= 7) $q=3; + elseif ($month_current >= 4) $q=2; + else $q=1; + } + } + if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); } + if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); } + if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); } + if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); } +} + +$min = GETPOST("min"); +if (empty($min)) $min = 0; + +// Define modetax (0 or 1) +// 0=normal, 1=option vat for services is on debit +$modetax = $conf->global->TAX_MODE; +if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"]; + +// Security check +$socid = GETPOST("socid"); +if ($user->societe_id) $socid=$user->societe_id; +$result = restrictedArea($user, 'tax', '', '', 'charges'); + +/* + * View + */ + +$html=new Form($db); +$company_static=new Societe($db); + +$morequerystring=''; +$listofparams=array('date_startmonth','date_startyear','date_startday','date_endmonth','date_endyear','date_endday'); +foreach($listofparams as $param) +{ + if (GETPOST($param)!='') $morequerystring.=($morequerystring?'&':'').$param.'='.GETPOST($param); +} + +llxHeader('','','','',0,0,'','',$morequerystring); + +$fsearch.='
'; +$fsearch.=' '; +$fsearch.=' '; +$fsearch.=' '.$langs->trans("SalesTurnover").' '.$langs->trans("Minimum").': '; +$fsearch.=' '; + +// Affiche en-tete du rapport +if ($modetax==1) // Calculate on invoice for goods and services +{ + $nom=$langs->transcountry("LT2ReportByCustomersInInputOutputMode",$mysoc->pays_code); + $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $description=$langs->trans("RulesVATDue"); + if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); + $description.=$fsearch; + $description.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; + $builddate=time(); + + $elementcust=$langs->trans("CustomersInvoices"); + $productcust=$langs->trans("Description"); + $amountcust=$langs->trans("AmountHT"); + $elementsup=$langs->trans("SuppliersInvoices"); + $productsup=$langs->trans("Description"); + $amountsup=$langs->trans("AmountHT"); +} +if ($modetax==0) // Invoice for goods, payment for services +{ + $nom=$langs->transcountry("LT2ReportByCustomersInInputOutputMode",$mysoc->pays_code); + $period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1); + $description=$langs->trans("RulesVATIn"); + if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='
'.$langs->trans("WarningDepositsNotIncluded"); + $description.=$fsearch; + $description.='
('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; + $builddate=time(); + + $elementcust=$langs->trans("CustomersInvoices"); + $productcust=$langs->trans("Description"); + $amountcust=$langs->trans("AmountHT"); + $elementsup=$langs->trans("SuppliersInvoices"); + $productsup=$langs->trans("Description"); + $amountsup=$langs->trans("AmountHT"); +} +report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink); + +$vatcust=$langs->transcountry("LT2",$mysoc->pays_code); +$vatsup=$langs->transcountry("LT2",$mysoc->pays_code); + +// IRPF that the customer has retained me + +print "
'; print $langs->trans('Project'); print 'id.'">'; print img_edit($langs->trans('SetProject'),1); @@ -394,11 +389,11 @@ else if ($id) print ''; if ($action == 'classify') { - $html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid'); } else { - $html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none'); } print '
'.$langs->trans("NotePublic").''; - print '
'; - print ($object->note_public ? dol_nl2br($object->note_public) : " "); - print '
'; + print $form->editInPlace($object->note_public, 'note_public', $user->rights->deplacement->creer, 'textarea'); print "
'.$langs->trans("NotePrivate").''; - print '
'; - print ($object->note_private ? dol_nl2br($object->note_private) : " "); - print '
'; + print $form->editInPlace($object->note_private, 'note', $user->rights->deplacement->creer, 'textarea'); print "
"; +print ""; +print '"; +print '"; +print ""; +print ""; +print ""; +print "\n"; + +$coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'sell'); +if (is_array($coll_list)) +{ + $var=true; + $total = 0; $totalamount = 0; + $i = 1; + foreach($coll_list as $coll) + { + if(($min == 0 or ($min > 0 && $coll->amount > $min)) && $coll->localtax2>0) + { + $var=!$var; + $intra = str_replace($find,$replace,$coll->tva_intra); + if(empty($intra)) + { + if($coll->assuj == '1') + { + $intra = $langs->trans('Unknown'); + } + else + { + $intra = ''; + } + } + print ""; + print ""; + $company_static->id=$coll->socid; + $company_static->nom=$coll->nom; + print ''; + $find = array(' ','.'); + $replace = array('',''); + print ""; + print ""; + print ""; + $totalamount = $totalamount + $coll->amount; + $total = $total + $coll->localtax2; + print "\n"; + $i++; + } + } + $x_coll_sum = $total; + + print ''; + print ''; + print ''; + print ''; +} +else +{ + $langs->load("errors"); + if ($coll_list == -1) + print ''; + else if ($coll_list == -2) + print ''; + else + print ''; +} + +// IRPF I retained my supplier + +print ""; +print '"; +print '"; +print ""; +print ""; +print ""; +print "\n"; + +$company_static=new Societe($db); + +$coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'buy'); +if (is_array($coll_list)) +{ + $var=true; + $total = 0; $totalamount = 0; + $i = 1; + foreach($coll_list as $coll) + { + if(($min == 0 or ($min > 0 && $coll->amount > $min)) && $coll->localtax2>0) + { + $var=!$var; + $intra = str_replace($find,$replace,$coll->tva_intra); + if(empty($intra)) + { + if($coll->assuj == '1') + { + $intra = $langs->trans('Unknown'); + } + else + { + $intra = ''; + } + } + print ""; + print ""; + $company_static->id=$coll->socid; + $company_static->nom=$coll->nom; + print ''; + $find = array(' ','.'); + $replace = array('',''); + print ""; + print ""; + print ""; + $totalamount = $totalamount + $coll->amount; + $total = $total + $coll->localtax2; + print "\n"; + $i++; + } + } + $x_paye_sum = $total; + + print ''; + print ''; + print ''; + print ''; + + print '
'.$langs->trans("Num")."'.$langs->trans("Customer")."".$langs->transcountry("ProfId1",$mysoc->pays_code)."".$langs->trans("TotalHT")."".$vatcust."
".$i."'.$company_static->getNomUrl(1).'".$intra."".price($coll->amount)."".price($coll->localtax2)."
'.$langs->trans("Total").':'.price($totalamount).''.price($total).'
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("FeatureNotYetAvailable").'
'.$langs->trans("Error").'
'.$langs->trans("Num")."'.$langs->trans("Supplier")."".$langs->transcountry("ProfId1",$mysoc->pays_code)."".$langs->trans("TotalHT")."".$vatsup."
".$i."'.$company_static->getNomUrl(1).'".$intra."".price($coll->amount)."".price($coll->localtax2)."
'.$langs->trans("Total").':'.price($totalamount).''.price($total).'
'; + + // Total to pay + print '

'; + print ''; + $diff = $x_paye_sum; + print ''; + print ''; + print '\n"; + print "\n"; + +} +else +{ + $langs->load("errors"); + if ($coll_list == -1) + print ''; + else if ($coll_list == -2) + print ''; + else + print ''; +} + +print '
'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').''.price(price2num($diff,'MT'))."
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("FeatureNotYetAvailable").'
'.$langs->trans("Error").'
'; + + +$db->close(); + +llxFooter(); +?> diff --git a/htdocs/compta/localtax/fiche.php b/htdocs/compta/localtax/fiche.php new file mode 100644 index 00000000000..b27fe6f63b2 --- /dev/null +++ b/htdocs/compta/localtax/fiche.php @@ -0,0 +1,266 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/compta/localtax/fiche.php + * \ingroup tax + * \brief Page of IRPF payments + */ + +require('../../main.inc.php'); +require_once(DOL_DOCUMENT_ROOT."/compta/localtax/class/localtax.class.php"); +require_once(DOL_DOCUMENT_ROOT."/compta/bank/class/account.class.php"); + +$langs->load("compta"); +$langs->load("banks"); +$langs->load("bills"); + +$id=$_REQUEST["id"]; + +$mesg = ''; + +// Security check +$socid = isset($_GET["socid"])?$_GET["socid"]:''; +if ($user->societe_id) $socid=$user->societe_id; +$result = restrictedArea($user, 'tax', '', '', 'charges'); + + +/* + * Actions + */ + +//add payment of localtax +if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) +{ + $localtax = new localtax($db); + + $db->begin(); + + $datev=dol_mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]); + $datep=dol_mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]); + + $localtax->accountid=$_POST["accountid"]; + $localtax->paymenttype=$_POST["paiementtype"]; + $localtax->datev=$datev; + $localtax->datep=$datep; + $localtax->amount=$_POST["amount"]; + $localtax->label=$_POST["label"]; + + $ret=$localtax->addPayment($user); + if ($ret > 0) + { + $db->commit(); + Header("Location: reglement.php"); + exit; + } + else + { + $db->rollback(); + $mesg='
'.$localtax->error.'
'; + $_GET["action"]="create"; + } +} + +//delete payment of localtax +if ($_GET["action"] == 'delete') +{ + $localtax = new localtax($db); + $result=$localtax->fetch($_GET['id']); + + if ($localtax->rappro == 0) + { + $db->begin(); + + $ret=$localtax->delete($user); + if ($ret > 0) + { + if ($localtax->fk_bank) + { + $accountline=new AccountLine($db); + $result=$accountline->fetch($localtax->fk_bank); + $result=$accountline->delete($user); + } + + if ($result > 0) + { + $db->commit(); + header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php'); + exit; + } + else + { + $localtax->error=$accountline->error; + $db->rollback(); + $mesg='
'.$localtax->error.'
'; + } + } + else + { + $db->rollback(); + $mesg='
'.$localtax->error.'
'; + } + } + else + { + $mesg='
Error try do delete a line linked to a conciliated bank transaction
'; + } +} + + +/* +* View +*/ + +llxHeader(); + +$html = new Form($db); + +if ($id) +{ + $vatpayment = new localtax($db); + $result = $vatpayment->fetch($id); + if ($result <= 0) + { + dol_print_error($db); + exit; + } +} + + +if ($_GET["action"] == 'create') +{ + print "
\n"; + print ''; + print ''; + + print_fiche_titre($langs->transcountry("newLT2Payment",$mysoc->pays_code)); + + if ($mesg) print $mesg; + + print ''; + + print ""; + print ''; + + print ''; + + // Label + print ''; + + // Amount + print ''; + + if ($conf->banque->enabled) + { + print ''; + + print '\n"; + print ""; + } + print '
'.$langs->trans("DatePayment").''; + print $html->select_date($datep,"datep",'','','','add'); + print '
'.$langs->trans("DateValue").''; + print $html->select_date($datev,"datev",'','','','add'); + print '
'.$langs->trans("Label").'transcountry("LT2Payment",$mysoc->pays_code)).'">
'.$langs->trans("Amount").'
'.$langs->trans("Account").''; + $html->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant + print '
'.$langs->trans("PaymentMode").''; + $html->select_types_paiements($_POST["paiementtype"], "paiementtype"); + print "
'; + + print "
"; + + print '
  '; + print '
'; + + print '
'; +} + + +/* ************************************************************************** */ +/* */ +/* Barre d'action */ +/* */ +/* ************************************************************************** */ + +if ($id) +{ + if ($mesg) print $mesg; + + $h = 0; + $head[$h][0] = DOL_URL_ROOT.'/compta/localtax/fiche.php?id='.$vatpayment->id; + $head[$h][1] = $langs->trans('Card'); + $head[$h][2] = 'card'; + $h++; + + dol_fiche_head($head, 'card', $langs->trans("VATPayment"), 0, 'payment'); + + + print ''; + + print ""; + print ''; + + print ""; + print ''; + + print ''; + + print ''; + + if ($conf->banque->enabled) + { + if ($vatpayment->fk_account > 0) + { + $bankline=new AccountLine($db); + $bankline->fetch($vatpayment->fk_bank); + + print ''; + print ''; + print ''; + print ''; + } + } + + print '
'.$langs->trans("Ref").''; + print $vatpayment->ref; + print '
'.$langs->trans("DatePayment").''; + print dol_print_date($vatpayment->datep,'day'); + print '
'.$langs->trans("DateValue").''; + print dol_print_date($vatpayment->datev,'day'); + print '
'.$langs->trans("Amount").''.price($vatpayment->amount).'
'.$langs->trans('BankTransactionLine').''; + print $bankline->getNomUrl(1,0,'showall'); + print '
'; + + print ''; + + /* + * Boutons d'actions + */ + print "
\n"; + if ($vatpayment->rappro == 0) + print ''.$langs->trans("Delete").''; + else + print ''.$langs->trans("Delete").''; + print "
"; +} + + +$db->close(); + +llxFooter(); + +?> diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php new file mode 100644 index 00000000000..8f2239ebc59 --- /dev/null +++ b/htdocs/compta/localtax/index.php @@ -0,0 +1,219 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/compta/localtax/index.php + * \ingroup tax + * \brief Index page of IRPF reports + */ +require('../../main.inc.php'); +require_once(DOL_DOCUMENT_ROOT."/core/lib/tax.lib.php"); +require_once(DOL_DOCUMENT_ROOT."/compta/tva/class/tva.class.php"); +require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"); + +$langs->load("other"); + +$year=$_GET["year"]; +if ($year == 0 ) +{ + $year_current = strftime("%Y",time()); + $year_start = $year_current; +} else { + $year_current = $year; + $year_start = $year; +} + +// Security check +$socid = isset($_GET["socid"])?$_GET["socid"]:''; +if ($user->societe_id) $socid=$user->societe_id; +$result = restrictedArea($user, 'tax', '', '', 'charges'); + +// Define modetax (0 or 1) +// 0=normal, 1=option vat for services is on debit +$modetax = $conf->global->TAX_MODE; +if (isset($_GET["modetax"])) $modetax=$_GET["modetax"]; + +function pt ($db, $sql, $date) +{ + global $conf, $bc,$langs; + + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $i = 0; + $total = 0; + print ''; + print ''; + print ''; + print ''; + print ''."\n"; + print "\n"; + $var=True; + while ($i < $num) + { + $obj = $db->fetch_object($result); + $var=!$var; + print ''; + print '\n"; + $total = $total + $obj->mm; + + print '\n"; + print "\n"; + + $i++; + } + print '"; + + print "
'.$date.''.$langs->trans("Amount").' 
'.$obj->dm."'.price($obj->mm)." 
'.$langs->trans("Total")." :".price($total)." 
"; + $db->free($result); + } + else { + dolibar_print_error($db); + } +} + + +/* + * View + */ + +llxHeader(); + +$tva = new Tva($db); + + +$textprevyear="".img_previous().""; +$textnextyear=" ".img_next().""; + +print_fiche_titre($langs->transcountry("LT2",$mysoc->pays_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); + +print $langs->trans("VATReportBuildWithOptionDefinedInModule").'
'; +print '('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')
'; +print '
'; + +print ''; +print ''; + +print '
'; +print_titre($langs->transcountry("LT2Summary",$mysoc->pays_code)); + +print ' '; +print_titre($langs->transcountry("LT2Paid",$mysoc->pays_code)); +print '
'; + +print ""; +print ""; +print ""; +print ""; +print ""; +print ""; +print "\n"; +print "\n"; + +$y = $year_current ; + +$var=True; +$total=0; $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; +$i=0; +for ($m = 1 ; $m < 13 ; $m++ ) +{ + $coll_listsell = vat_by_date($db, $y, 0, 0, 0, $modetax, 'sell', $m); + $coll_listbuy = vat_by_date($db, $y, 0, 0, 0, $modetax, 'buy', $m); + + if (! is_array($coll_listbuy) && $coll_listbuy == -1) + { + $langs->load("errors"); + print ''; + break; + } + if (! is_array($coll_listbuy) && $coll_listbuy == -2) + { + print ''; + break; + } + + $var=!$var; + print ""; + print ''; + + $x_coll = 0; + foreach($coll_listsell as $vatrate=>$val) + { + $x_coll+=$val['localtax2']; + } + $subtotalcoll = $subtotalcoll + $x_coll; + print ""; + + $x_paye = 0; + foreach($coll_listbuy as $vatrate=>$val) + { + $x_paye+=$val['localtax2']; + } + $subtotalpaye = $subtotalpaye + $x_paye; + print ""; + + $diff = $x_coll - $x_paye; + $total = $total + $diff; + $subtotal = $subtotal + $diff; + + print "\n"; + print "\n"; + print "\n"; + + $i++; + if ($i > 2) { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $i = 0; + $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; + } +} +print ''; +print "\n"; +print ''; + +print '
".$langs->trans("Year")." $y".$langs->transcountry("LT2Customer",$mysoc->pays_code)."".$langs->transcountry("LT2Supplier",$mysoc->pays_code)."".$langs->trans("TotalToPay")." 
'.$langs->trans("ErrorNoAccountancyModuleLoaded").'
'.$langs->trans("FeatureNotYetAvailable").'
'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'".price($x_coll)."".price($x_paye)."".price($diff)." 
'.$langs->trans("SubTotal").':'.price($subtotalcoll).''.price($subtotalpaye).''.price($subtotalpaye).' 
'.$langs->trans("TotalToPay").':'.price($total).' 
'; + +print '
 '; + +/* + * Payed + */ + +$sql = "SELECT SUM(amount) as mm, date_format(f.datev,'%Y-%m') as dm"; +$sql.= " FROM ".MAIN_DB_PREFIX."localtax as f"; +$sql.= " WHERE f.entity = ".$conf->entity; +$sql.= " AND f.datev >= '".$db->idate(dol_get_first_day($y,1,false))."'"; +$sql.= " AND f.datev <= '".$db->idate(dol_get_last_day($y,12,false))."'"; +$sql.= " GROUP BY dm ASC"; + +pt($db, $sql,$langs->trans("Year")." $y"); + +print "
"; + +print ''; +print ''; + +$db->close(); + +llxFooter(); +?> diff --git a/htdocs/compta/localtax/reglement.php b/htdocs/compta/localtax/reglement.php new file mode 100644 index 00000000000..bcfc27194e0 --- /dev/null +++ b/htdocs/compta/localtax/reglement.php @@ -0,0 +1,97 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/compta/localtax/reglement.php + * \ingroup tax + * \brief List of IRPF payments + */ + +require('../../main.inc.php'); +require_once(DOL_DOCUMENT_ROOT."/compta/localtax/class/localtax.class.php"); + +$langs->load("compta"); +$langs->load("compta"); + +// Security check +$socid = isset($_GET["socid"])?$_GET["socid"]:''; +if ($user->societe_id) $socid=$user->societe_id; +$result = restrictedArea($user, 'tax', '', '', 'charges'); + +/* + * View + */ + +llxHeader(); + +$localtax_static = new localtax($db); + +print_fiche_titre($langs->transcountry("LT2Payments",$mysoc->pays_code)); + +$sql = "SELECT rowid, amount, label, f.datev as dm"; +$sql.= " FROM ".MAIN_DB_PREFIX."localtax as f "; +$sql.= " WHERE f.entity = ".$conf->entity; +$sql.= " ORDER BY dm DESC"; + +$result = $db->query($sql); +if ($result) +{ + $num = $db->num_rows($result); + $i = 0; + $total = 0 ; + + print ''; + print ''; + print ''; + print ""; + print ''; + print ""; + print "\n"; + $var=1; + while ($i < $num) + { + $obj = $db->fetch_object($result); + $var=!$var; + print ""; + + $localtax_static->id=$obj->rowid; + $localtax_static->ref=$obj->rowid; + print "\n"; + print "\n"; + print '\n"; + $total = $total + $obj->amount; + + print ""; + print "\n"; + + $i++; + } + print ''; + print ""; + + print "
'.$langs->trans("Ref").'".$langs->trans("Label")."'.$langs->trans("DatePayment").'".$langs->trans("PayedByThisPayment")."
".$localtax_static->getNomUrl(1)."".dol_trunc($obj->label,40)."'.dol_print_date($db->jdate($obj->dm),'day')."".price($obj->amount)."
'.$langs->trans("Total").'".price($total)."
"; + $db->free($result); +} +else +{ + dol_print_error($db); +} + +$db->close(); + +llxFooter(); +?> diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index dfe19ad5988..0a1fbb8c9f0 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -56,9 +56,9 @@ class RemiseCheque extends CommonObject /** * Load record * - * @param id Id record - * @param ref Ref record - * @return int <0 if KO, > 0 if OK + * @param int $id Id record + * @param string $ref Ref record + * @return int <0 if KO, > 0 if OK */ function fetch($id,$ref='') { @@ -72,7 +72,7 @@ class RemiseCheque extends CommonObject $sql.= " WHERE bc.entity = ".$conf->entity; if ($id) $sql.= " AND bc.rowid = ".$id; if ($ref) $sql.= " AND bc.number = '".$this->db->escape($ref)."'"; - + dol_syslog("RemiseCheque::fetch sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -397,10 +397,14 @@ class RemiseCheque extends CommonObject $num=0; - // We use +0 to convert varchar to number - $sql = "SELECT MAX(number+0)"; + // We use +0 to convert varchar to number for mysql, use ::integer for postgres. + // We must found a generic solution (Use a $db->toint function ?) + $sql = "SELECT "; + if ($this->db->type == 'pgsql') $sql.="MAX(number::integer)"; + else $sql.="MAX(number+0)"; $sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque"; $sql.= " WHERE entity = ".$conf->entity; + $sql.= " AND number not like '(%'"; dol_syslog("Remisecheque::getNextNumber sql=".$sql); $resql = $this->db->query($sql); @@ -499,14 +503,14 @@ class RemiseCheque extends CommonObject $sql.= " AND b.fk_bordereau = bc.rowid"; $sql.= " AND bc.rowid = ".$this->id; $sql.= " AND bc.entity = ".$conf->entity; - $sql.= " ORDER BY b.emetteur ASC, b.rowid ASC;"; + $sql.= " ORDER BY b.dateo ASC, b.rowid ASC"; dol_syslog("RemiseCheque::generatePdf sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { $i = 0; - while ( $objp = $this->db->fetch_object($result) ) + while ($objp = $this->db->fetch_object($result)) { $docmodel->lines[$i]->bank_chq = $objp->banque; $docmodel->lines[$i]->emetteur_chq = $objp->emetteur; @@ -527,7 +531,7 @@ class RemiseCheque extends CommonObject // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. - $sav_charset_output=$outputlangs->charset_output; + $sav_charseSupprimert_output=$outputlangs->charset_output; $result=$docmodel->write_file($conf->banque->dir_output.'/bordereau', $this->number, $outputlangs); if ($result > 0) { diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index 7a687d7a67b..a2933c0959a 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -46,11 +46,11 @@ $result = restrictedArea($user, 'cheque', $id, 'bordereau_cheque','','',$fieldid $mesg=''; -$sortfield=isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"]; -$sortorder=isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; +$sortfield=GETPOST("sortfield"); +$sortorder=GETPOST("sortorder"); $page=$_GET["page"]; if (! $sortorder) $sortorder="ASC"; -if (! $sortfield) $sortfield="b.emetteur"; +if (! $sortfield) $sortfield="b.dateo,b.rowid"; if ($page < 0) { $page = 0 ; } $limit = $conf->liste_limit; $offset = $limit * $page ; @@ -309,15 +309,15 @@ if ($action == 'new') print ''.$langs->trans("BankAccount").''; print $html->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1); print ''; - print ''; + print ''; + print '
'; print ''; if ($filterdate || $filteraccountid > 0) { print '   '; print ''; } - print ''; - print ''; + print '
'; //print ''; print ''; print '
'; @@ -522,12 +522,12 @@ else $param="&id=".$remisecheque->id; print ''; print_liste_field_titre($langs->trans("Cheque"),'','','','','width="30"'); + print_liste_field_titre($langs->trans("DateChequeReceived"),$_SERVER["PHP_SELF"],"b.dateo,b.rowid", "",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Numero"),$_SERVER["PHP_SELF"],"b.num_chq", "",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CheckTransmitter"),$_SERVER["PHP_SELF"],"b.emetteur", "",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Bank"),$_SERVER["PHP_SELF"],"b.banque", "",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"b.amount", "",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("LineRecord"),$_SERVER["PHP_SELF"],"b.rowid", "",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateChequeReceived"),$_SERVER["PHP_SELF"],"b.dateo", "",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre('','',''); print "\n"; $i=1; @@ -539,6 +539,7 @@ else print ""; print ''.$i.''; + print ''.dol_print_date($db->jdate($objp->date),'day').''; // Date operation print ''.($objp->num_chq?$objp->num_chq:' ').''; print ''.dol_trunc($objp->emetteur,24).''; print ''.dol_trunc($objp->banque,24).''; @@ -554,7 +555,6 @@ else print ' '; } print ''; - print ''.dol_print_date($db->jdate($objp->date),'day').''; if($remisecheque->statut == 0) { print 'rowid.'">'.img_delete().''; @@ -593,12 +593,12 @@ if ($user->societe_id == 0 && count($accounts) == 1 && $action == 'new' && $user if ($user->societe_id == 0 && $remisecheque->statut == 0 && $remisecheque->id && $user->rights->banque->cheque) { - print ''.$langs->trans('Valid').''; + print ''.$langs->trans('Valid').''; } if ($user->societe_id == 0 && $remisecheque->id && $user->rights->banque->cheque) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } print ''; diff --git a/htdocs/conf/.cvsignore b/htdocs/conf/.cvsignore deleted file mode 100644 index ff44c5dfae4..00000000000 --- a/htdocs/conf/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -conf.php*.sav -*.php -conf.php.mysql -conf.php.postgres diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index 96ea34f3936..88af8e50ef5 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -48,12 +48,15 @@ if((isset($_GET['field']) && ! empty($_GET['field'])) $table_element = GETPOST('table_element'); $field = GETPOST('field'); $fk_element = GETPOST('fk_element'); + $type = GETPOST('type'); + + if ($element == 'fichinter') $element = 'ficheinter'; if ($user->rights->$element->lire || $user->rights->$element->read) { $object = new GenericObject($db); - $ret=$object->getValueFrom($table_element, $fk_element, $field); - echo $ret; + $value=$object->getValueFrom($table_element, $fk_element, $field); + echo $value; } else { diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php index f14537066ca..f710797c8fd 100644 --- a/htdocs/core/ajax/saveinplace.php +++ b/htdocs/core/ajax/saveinplace.php @@ -37,7 +37,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/genericobject.class.php"); top_httphead(); //print ''."\n"; -//var_dump($_POST); +//print_r($_POST); // Load original field value if((isset($_POST['field']) && ! empty($_POST['field'])) @@ -51,23 +51,54 @@ if((isset($_POST['field']) && ! empty($_POST['field'])) $fk_element = GETPOST('fk_element'); $value = GETPOST('value'); $type = GETPOST('type'); + $timestamp = GETPOST('timestamp'); + + $format='text'; + $return=array(); + $error=0; + + if ($element == 'fichinter') $element = 'ficheinter'; if ($user->rights->$element->creer || $user->rights->$element->write) { $object = new GenericObject($db); // Clean parameters - $value = trim($value); + $newvalue = trim($value); if ($type == 'numeric') { - $value = price2num($value); + $newvalue = price2num($newvalue); // Check parameters - if (! is_numeric($value)) $value = 0; + if (! is_numeric($newvalue)) + { + $error++; + $return['error'] = $langs->trans('ErrorBadValue'); + } + } + else if ($type == 'datepicker') + { + $format = 'date'; + $newvalue = ($timestamp / 1000); } - $ret=$object->setValueFrom($table_element, $fk_element, $field, $value); - if ($ret > 0) echo (! empty($value) ? dol_nl2br($value) : ' '); + if (! $error) + { + $ret=$object->setValueFrom($table_element, $fk_element, $field, $newvalue, $format); + if ($ret > 0) + { + if ($type == 'numeric') $value = price($newvalue); + else if ($type == 'textarea') $value = dol_nl2br($newvalue); + + $return['value'] = $value; + } + else + { + $return['error'] = $object->error; + } + } + + echo json_encode($return); } else { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b47b5b07f74..d4583a02d7e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -622,25 +622,31 @@ abstract class CommonObject * @param int $id Object id * @param string $field Field to update * @param mixte $value New value + * @param string $format Data format * @return int <0 if KO, >0 if OK */ - function setValueFrom($table, $id, $field, $value) + function setValueFrom($table, $id, $field, $value, $format='text') { global $conf; + + $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX.$table." SET "; - $sql.= $field." = '".$this->db->escape($value)."'"; + if ($format == 'text') $sql.= $field." = '".$this->db->escape($value)."'"; + else if ($format == 'date') $sql.= $field." = '".$this->db->idate($value)."'"; $sql.= " WHERE rowid = ".$id; dol_syslog(get_class($this)."::setValueFrom sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { + $this->db->commit(); return 1; } else { - dol_print_error($this->db); + $this->error=$this->db->lasterror(); + $this->db->rollback(); return -1; } } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 79d3dc57eb6..53e69f414cc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2006 Marc Barilley/Ocebo * Copyright (C) 2007 Franky Van Liedekerke @@ -141,6 +141,43 @@ class Form } return $ret; } + + /** + * Output edit in place form + * + * @param string $value Value to show/edit + * @param string $htmlname DIV ID (field name) + * @param int $condition Condition to edit + * @param string $area Type of edit + * @return string HTML edit in place + */ + function editInPlace($value, $htmlname, $condition, $type='textarea') + { + global $conf; + + $out=''; + + // Check parameters + if ($type == 'textarea') $value = dol_nl2br($value); + else if ($type == 'numeric') $value = price($value); + else if ($type == 'datepicker') $value = dol_print_date($value, 'day'); + + if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && $condition) + { + // Use for timestamp format + if ($type == 'datepicker') $out.= ''; + + $out.= '
'; + $out.= $value; + $out.= '
'; + } + else + { + $out = $value; + } + + return $out; + } /** * Show a text and picto with tooltip on text or picto diff --git a/htdocs/core/js/datepicker.js b/htdocs/core/js/datepicker.js new file mode 100644 index 00000000000..4af0dbd5ad4 --- /dev/null +++ b/htdocs/core/js/datepicker.js @@ -0,0 +1,14 @@ +// Copyright (C) 2011 Regis Houssin +// +// Script javascript that contains functions for datepicker default options +// +// \file htdocs/core/js/jnotify.js +// \brief File that include javascript functions for datepicker default options + + +$(document).ready(function() { + $.datepicker.setDefaults({ + altField: '#timeStamp', + altFormat: '@' // Gives a timestamp dateformat + }); +}); \ No newline at end of file diff --git a/htdocs/core/js/editinplace.js b/htdocs/core/js/editinplace.js new file mode 100644 index 00000000000..9e905f43cc8 --- /dev/null +++ b/htdocs/core/js/editinplace.js @@ -0,0 +1,128 @@ +// Copyright (C) 2011 Regis Houssin +// +// Script javascript that contains functions for edit in place +// +// \file htdocs/core/js/editinplace.js +// \brief File that include javascript functions for edit in place + + +$(document).ready(function() { + var element = $('#element').html(); + var table_element = $('#table_element').html(); + var fk_element = $('#fk_element').html(); + + $('.edit_textarea').editable(urlSaveInPlace, { + type : 'textarea', + rows : 4, + id : 'field', + tooltip : tooltipInPlace, + placeholder : placeholderInPlace, + cancel : cancelInPlace, + submit : submitInPlace, + indicator : indicatorInPlace, + loadurl : urlLoadInPlace, + loaddata : { + type: 'textarea', + element: element, + table_element: table_element, + fk_element: fk_element + }, + submitdata : { + type: 'textarea', + element: element, + table_element: table_element, + fk_element: fk_element + }, + callback : function(result, settings) { + var obj = $.parseJSON(result); + + if (obj.error) { + $(this).html(this.revert); + $.jnotify(obj.error, "error", true); + } else { + $(this).html(obj.value); + } + } + }); + $('.edit_text').editable(urlSaveInPlace, { + type : 'text', + id : 'field', + width : 300, + tooltip : tooltipInPlace, + placeholder : placeholderInPlace, + cancel : cancelInPlace, + submit : submitInPlace, + indicator : indicatorInPlace, + submitdata : { + type: 'text', + element: element, + table_element: table_element, + fk_element: fk_element + }, + callback : function(result, settings) { + var obj = $.parseJSON(result); + + if (obj.error) { + $(this).html(this.revert); + $.jnotify(obj.error, "error", true); + } else { + $(this).html(obj.value); + } + } + }); + $('.edit_numeric').editable(urlSaveInPlace, { + type : 'text', + id : 'field', + width : 100, + tooltip : tooltipInPlace, + placeholder : placeholderInPlace, + cancel : cancelInPlace, + submit : submitInPlace, + indicator : indicatorInPlace, + submitdata : { + type: 'numeric', + element: element, + table_element: table_element, + fk_element: fk_element + }, + callback : function(result, settings) { + var obj = $.parseJSON(result); + + if (obj.error) { + $(this).html(this.revert); + $.jnotify(obj.error, "error", true); + } else { + $(this).html(obj.value); + } + } + }); + $('.edit_datepicker').editable(urlSaveInPlace, { + type : 'datepicker', + id : 'field', + onblur : 'ignore', + tooltip : tooltipInPlace, + placeholder : placeholderInPlace, + cancel : cancelInPlace, + submit : submitInPlace, + indicator : indicatorInPlace, + submitdata : function(value, settings) { + return { + type: 'datepicker', + element: element, + table_element: table_element, + fk_element: fk_element, + timestamp: $('#timeStamp').val() + }; + }, + callback : function(result, settings) { + var obj = $.parseJSON(result); + + if (obj.error) { + $(this).html(this.revert); + $.jnotify(obj.error, "error", true); + } else { + $(this).html(obj.value); + } + } + }); +}); \ No newline at end of file diff --git a/htdocs/core/js/jnotify.js b/htdocs/core/js/jnotify.js new file mode 100644 index 00000000000..18673c8d17a --- /dev/null +++ b/htdocs/core/js/jnotify.js @@ -0,0 +1,26 @@ +// Copyright (C) 2011 Regis Houssin +// +// Script javascript that contains functions for jnotify default options +// +// \file htdocs/core/js/jnotify.js +// \brief File that include javascript functions for jnotify default options + + +$(document).ready(function() { + $.jnotify.setup({ + delay: 3000 // the default time to show each notification (in milliseconds) + , sticky: false // determines if the message should be considered "sticky" (user must manually close notification) + , closeLabel: "×" // the HTML to use for the "Close" link + , showClose: true // determines if the "Close" link should be shown if notification is also sticky + , fadeSpeed: 1000 // the speed to fade messages out (in milliseconds) + , slideSpeed: 250 // the speed used to slide messages out (in milliseconds) + , classContainer: "jnotify-container" + , classNotification: "jnotify-notification" + , classBackground: "jnotify-background" + , classClose: "jnotify-close" + , classMessage: "jnotify-message" + , init: null // callback that occurs when the main jnotify container is created + , create: null // callback that occurs when when the note is created (occurs just before appearing in DOM) + , beforeRemove: null // callback that occurs when before the notification starts to fade away + }); +}); \ No newline at end of file diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index bac286e3c20..a9d7d4c01c0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -585,6 +585,14 @@ function dol_get_fiche_head($links=array(), $active='0', $title='', $notab=0, $p $out.="\n"; if (! $notab) $out.="\n".'
'."\n"; + + // Parameters for edit in place + if (! empty($GLOBALS['object'])) + { + $out.=''."\n"; + $out.=''."\n"; + $out.=''."\n"; + } return $out; } @@ -3955,21 +3963,6 @@ function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb jQuery.jnotify("'.dol_escape_js($out).'", "'.($style=="ok" ? 3000 : $style).'", '.($style=="ok" ? "false" : "true").', - { - closeLabel: "×" // the HTML to use for the "Close" link - , showClose: true // determines if the "Close" link should be shown if notification is also sticky - , fadeSpeed: 1000 // the speed to fade messages out (in milliseconds) - , slideSpeed: 250 // the speed used to slide messages out (in milliseconds) - , classContainer: "jnotify-container" - , classNotification: "jnotify-notification" - , classBackground: "jnotify-background" - , classClose: "jnotify-close" - , classMessage: "jnotify-message" - , init: null // callback that occurs when the main jnotify container is created - , create: null // callback that occurs when when the note is created (occurs just before - // appearing in DOM) - , beforeRemove: null // callback that occurs when before the notification starts to fade away - }, { remove: function (){} } ); }); '; @@ -4236,6 +4229,16 @@ function dol_eval($s) eval($s); } +/** +* Return if var element is ok +* +* @param string $element Variable to check +* @return boolean Return true of variable is not empty +*/ +function dol_validElement($element) +{ + return (trim($element) != ''); +} /** * Return img flag of country for a language code or country code diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 7483cbd8e0f..4af19179e25 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1,6 +1,7 @@ - * Copyright (C) 2008 Raphael Bertrand (Resultic) +/* Copyright (C) 2008-2011 Laurent Destailleur + * Copyright (C) 2008-2011 Regis Houssin + * Copyright (C) 2008 Raphael Bertrand (Resultic) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 12268fd370d..eb84d069053 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -275,7 +275,7 @@ function dol_loginfunction($langs,$conf,$mysoc) { $mc = new ActionsMulticompany($db); - $select_entity=$mc->select_entities($lastentity, 'tabindex="3"'); + $select_entity=$mc->select_entities($lastentity, 'tabindex="3"', 1); } } diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index d205b155185..3f6e6cb34ac 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -49,6 +49,8 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction $invoicedettable='facturedet'; $fk_facture='fk_facture'; $total_tva='total_tva'; + $total_localtax1='total_localtax1'; + $total_localtax2='total_localtax2'; } if ($direction == 'buy') { @@ -56,6 +58,8 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction $invoicedettable='facture_fourn_det'; $fk_facture='fk_facture_fourn'; $total_tva='tva'; + $total_localtax1='total_localtax1'; + $total_localtax2='total_localtax2'; } // Define sql request @@ -74,8 +78,10 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction } if ($conf->global->MAIN_MODULE_COMPTABILITE) { - $sql = "SELECT s.rowid as socid, s.nom as nom, s.tva_intra as tva_intra, s.tva_assuj as assuj,"; - $sql.= " sum(fd.total_ht) as amount, sum(fd.".$total_tva.") as tva"; + $sql = "SELECT s.rowid as socid, s.nom as nom, s.siren as tva_intra, s.tva_assuj as assuj,"; + $sql.= " sum(fd.total_ht) as amount, sum(fd.".$total_tva.") as tva,"; + $sql.= " sum(fd.".$total_localtax1.") as localtax1,"; + $sql.= " sum(fd.".$total_localtax2.") as localtax2"; $sql.= " FROM ".MAIN_DB_PREFIX.$invoicetable." as f,"; $sql.= " ".MAIN_DB_PREFIX.$invoicedettable." as fd,"; $sql.= " ".MAIN_DB_PREFIX."societe as s"; @@ -195,6 +201,8 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, $fk_facture2='fk_facture'; $fk_payment='fk_paiement'; $total_tva='total_tva'; + $total_localtax1='total_localtax1'; + $total_localtax2='total_localtax2'; $paymenttable='paiement'; $paymentfacturetable='paiement_facture'; } @@ -206,6 +214,8 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, $fk_facture2='fk_facturefourn'; $fk_payment='fk_paiementfourn'; $total_tva='tva'; + $total_localtax1='total_localtax1'; + $total_localtax2='total_localtax2'; $paymenttable='paiementfourn'; $paymentfacturetable='paiementfourn_facturefourn'; } @@ -229,6 +239,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, { // Count on delivery date (use invoice date as delivery is unknown) $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,"; + $sql .=" d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, "; $sql.= " d.date_start as date_start, d.date_end as date_end,"; $sql.= " f.facnumber as facnum, f.type, f.total_ttc as ftotal_ttc,"; $sql.= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; @@ -275,6 +286,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, { // Count on delivery date (use invoice date as delivery is unknown) $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,"; + $sql .=" d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, "; $sql.= " d.date_start as date_start, d.date_end as date_end,"; $sql.= " f.facnumber as facnum, f.type, f.total_ttc as ftotal_ttc,"; $sql.= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; @@ -331,12 +343,16 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, { if (! isset($list[$assoc['rate']]['totalht'])) $list[$assoc['rate']]['totalht']=0; if (! isset($list[$assoc['rate']]['vat'])) $list[$assoc['rate']]['vat']=0; + if (! isset($list[$assoc['rate']]['locatax1'])) $list[$assoc['rate']]['localtax1']=0; + if (! isset($list[$assoc['rate']]['locatax2'])) $list[$assoc['rate']]['localtax2']=0; if ($assoc['rowid'] != $oldrowid) // Si rupture sur d.rowid { $oldrowid=$assoc['rowid']; $list[$assoc['rate']]['totalht'] += $assoc['total_ht']; $list[$assoc['rate']]['vat'] += $assoc['total_vat']; + $list[$assoc['rate']]['localtax1'] += $assoc['total_localtax1']; + $list[$assoc['rate']]['localtax2'] += $assoc['total_localtax2']; } $list[$assoc['rate']]['dtotal_ttc'][] = $assoc['total_ttc']; $list[$assoc['rate']]['dtype'][] = $assoc['dtype']; @@ -351,6 +367,8 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, $list[$assoc['rate']]['totalht_list'][] = $assoc['total_ht']; $list[$assoc['rate']]['vat_list'][] = $assoc['total_vat']; + $list[$assoc['rate']]['localtax1_list'][] = $assoc['total_localtax1']; + $list[$assoc['rate']]['localtax2_list'][] = $assoc['total_localtax2']; $list[$assoc['rate']]['pid'][] = $assoc['pid']; $list[$assoc['rate']]['pref'][] = $assoc['pref']; @@ -390,6 +408,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, { // Count on invoice date $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,"; + $sql .=" d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, "; $sql.= " d.date_start as date_start, d.date_end as date_end,"; $sql.= " f.facnumber as facnum, f.type, f.total_ttc as ftotal_ttc,"; $sql.= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; @@ -437,6 +456,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, { // Count on payments date $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,"; + $sql .=" d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, "; $sql.= " d.date_start as date_start, d.date_end as date_end,"; $sql.= " f.facnumber as facnum, f.type, f.total_ttc as ftotal_ttc,"; $sql.= " p.rowid as pid, p.ref as pref, p.fk_product_type as ptype,"; @@ -491,12 +511,16 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, { if (! isset($list[$assoc['rate']]['totalht'])) $list[$assoc['rate']]['totalht']=0; if (! isset($list[$assoc['rate']]['vat'])) $list[$assoc['rate']]['vat']=0; + if (! isset($list[$assoc['rate']]['locatax1'])) $list[$assoc['rate']]['localtax1']=0; + if (! isset($list[$assoc['rate']]['locatax2'])) $list[$assoc['rate']]['localtax2']=0; if ($assoc['rowid'] != $oldrowid) // Si rupture sur d.rowid { $oldrowid=$assoc['rowid']; $list[$assoc['rate']]['totalht'] += $assoc['total_ht']; $list[$assoc['rate']]['vat'] += $assoc['total_vat']; + $list[$assoc['rate']]['localtax1'] += $assoc['total_localtax1']; + $list[$assoc['rate']]['localtax2'] += $assoc['total_localtax2']; } $list[$assoc['rate']]['dtotal_ttc'][] = $assoc['total_ttc']; $list[$assoc['rate']]['dtype'][] = $assoc['dtype']; @@ -511,6 +535,8 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, $list[$assoc['rate']]['totalht_list'][] = $assoc['total_ht']; $list[$assoc['rate']]['vat_list'][] = $assoc['total_vat']; + $list[$assoc['rate']]['localtax1_list'][] = $assoc['total_localtax1']; + $list[$assoc['rate']]['localtax2_list'][] = $assoc['total_localtax2']; $list[$assoc['rate']]['pid'][] = $assoc['pid']; $list[$assoc['rate']]['pref'][] = $assoc['pref']; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 9cf00b15144..fef135ddf43 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -941,7 +941,20 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after) if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/tva/reglement.php?leftmenu=tax_vat",$langs->trans("Payments"),2,$user->rights->tax->charges->lire); if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); + global $mysoc; + + //Local Taxes + if($mysoc->pays_code=='ES' && $mysoc->localtax2_assuj=="1") + { + if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/index.php?leftmenu=tax_vat&mainmenu=accountancy",$langs->transcountry("LT2",$mysoc->pays_code),1,$user->rights->tax->charges->lire); + if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/fiche.php?leftmenu=tax_vat&action=create",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer); + if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/reglement.php?leftmenu=tax_vat",$langs->trans("Payments"),2,$user->rights->tax->charges->lire); + if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_vat", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); + //if (preg_match('/^tax/i',$leftmenu)) $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); + } + } + } // Compta simple diff --git a/htdocs/core/modules/.cvsignore b/htdocs/core/modules/.cvsignore deleted file mode 100644 index 6c3a451f7c8..00000000000 --- a/htdocs/core/modules/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -modGoogle.class.php -modPHPSane.class.php diff --git a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php index 3f56674b8b9..1a0ef43a2bc 100644 --- a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php @@ -39,7 +39,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts var $emetteur; // Objet societe qui emet /** - * \brief Constructeur + * Constructor + * + * @param DoliDB $db Database handler */ function BordereauChequeBlochet($db) { @@ -76,6 +78,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts /** * Fonction generant le rapport sur le disque + * * @param _dir Directory * @param number Number * @param outputlangs Lang output object diff --git a/htdocs/core/modules/mailings/.cvsignore b/htdocs/core/modules/mailings/.cvsignore deleted file mode 100644 index 91cc9955acd..00000000000 --- a/htdocs/core/modules/mailings/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -mailinglist_chatsderace.modules.php -mailinglist_chiensderace.modules.php diff --git a/htdocs/core/tpl/ajaxeditinplace.tpl.php b/htdocs/core/tpl/ajaxeditinplace.tpl.php deleted file mode 100644 index 5502c4508d5..00000000000 --- a/htdocs/core/tpl/ajaxeditinplace.tpl.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -?> - - - - \ No newline at end of file diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 1a3afead912..98fcb0d37ac 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -80,21 +80,22 @@ class Fichinter extends CommonObject /** - * Create a intervention into data base + * Create an intervention into data base + * * @return int <0 if KO, >0 if OK */ function create() { global $conf; - dol_syslog("Fichinter.class::create ref=".$this->ref); + dol_syslog(get_class($this)."::create ref=".$this->ref); // Check parameters if (! is_numeric($this->duree)) { $this->duree = 0; } if ($this->socid <= 0) { $this->error='ErrorBadParameterForFunc'; - dol_syslog("Fichinter::create ".$this->error,LOG_ERR); + dol_syslog(get_class($this)."::create ".$this->error,LOG_ERR); return -1; } // on verifie si la ref n'est pas utilisee @@ -106,14 +107,14 @@ class Fichinter extends CommonObject if ($result > 0) { $this->error='ErrorRefAlreadyExists'; - dol_syslog("Fichinter::create ".$this->error,LOG_WARNING); + dol_syslog(get_class($this)."::create ".$this->error,LOG_WARNING); $this->db->rollback(); return -3; } else if ($result < 0) { $this->error=$this->db->error(); - dol_syslog("Fichinter::create ".$this->error,LOG_ERR); + dol_syslog(get_class($this)."::create ".$this->error,LOG_ERR); $this->db->rollback(); return -2; } @@ -133,6 +134,8 @@ class Fichinter extends CommonObject $sql.= ", model_pdf"; $sql.= ", fk_projet"; $sql.= ", fk_statut"; + $sql.= ", note_private"; + $sql.= ", note_public"; $sql.= ") "; $sql.= " VALUES ("; $sql.= $this->socid; @@ -144,9 +147,11 @@ class Fichinter extends CommonObject $sql.= ", '".$this->modelpdf."'"; $sql.= ", ".($this->fk_project ? $this->fk_project : 0); $sql.= ", ".$this->statut; + $sql.= ", ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null"); + $sql.= ", ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= ")"; - dol_syslog("Fichinter::create sql=".$sql); + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $result=$this->db->query($sql); if ($result) { @@ -157,7 +162,7 @@ class Fichinter extends CommonObject else { $this->error=$this->db->error(); - dol_syslog("Fichinter::create ".$this->error,LOG_ERR); + dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -165,41 +170,45 @@ class Fichinter extends CommonObject } /** - * Update a intervention + * Update an intervention + * * @return int <0 if KO, >0 if OK */ - function update($user) + function update() { - global $conf; - if (! is_numeric($this->duree)) { $this->duree = 0; } if (! dol_strlen($this->fk_project)) { $this->fk_project = 0; } - /* - * Insertion dans la base - */ + $this->db->begin(); + $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter SET "; $sql.= ", description = '".$this->db->escape($this->description)."'"; $sql.= ", duree = ".$this->duree; $sql.= ", fk_projet = ".$this->fk_project; + $sql.= ", note_private = ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null"); + $sql.= ", note_public = ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= " WHERE rowid = ".$this->id; - $sql.= " AND entity = ".$conf->entity; - dol_syslog("Fichinter::update sql=".$sql); - if (! $this->db->query($sql)) + dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); + if ($this->db->query($sql)) + { + $this->db->commit(); + return 1; + } + else { $this->error=$this->db->error(); - dol_syslog("Fichinter::update error ".$this->error,LOG_ERR); + dol_syslog(get_class($this)."::update error ".$this->error, LOG_ERR); + $this->db->rollback(); return -1; } - - return 1; } /** * Fetch a intervention - * @param rowid Id of intervention - * @param ref Ref of intervention + * + * @param int $id Id of intervention + * @param string $ref Ref of intervention * @return int <0 if ko, >0 if ok */ function fetch($rowid,$ref='') @@ -213,7 +222,7 @@ class Fichinter extends CommonObject if ($ref) $sql.= " WHERE f.ref='".$ref."'"; else $sql.= " WHERE f.rowid=".$rowid; - dol_syslog("Fichinter::fetch sql=".$sql); + dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -252,7 +261,7 @@ class Fichinter extends CommonObject else { $this->error=$this->db->error(); - dol_syslog("Fichinter::fetch ".$this->error,LOG_ERR); + dol_syslog(get_class($this)."::fetch ".$this->error,LOG_ERR); return -1; } } diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 0415b741b2a..c92aa692cab 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -1,8 +1,8 @@ - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin - * Copyright (C) 2011 Juanjo Menent +/* Copyright (C) 2002-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2005-2011 Regis Houssin + * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,43 +43,25 @@ if (! empty($conf->global->FICHEINTER_ADDON) && is_readable(DOL_DOCUMENT_ROOT ." $langs->load("companies"); $langs->load("interventions"); -$id=GETPOST('id'); -$action=GETPOST("action"); -$mesg=GETPOST("msg"); - -// Load object if defined -$fichinterid=0; -$object = new Fichinter($db); -if ($id > 0 || ! empty($_GET["ref"])) -{ - $result=$object->fetch($id,$_GET["ref"]); - if (! $result > 0) - { - dol_print_error($db); - exit; - } - $fichinterid=$object->id; -} +$id = GETPOST('id'); +$ref = GETPOST('ref'); +$socid = GETPOST('socid'); +$action = GETPOST("action"); +$confirm = GETPOST("confirm"); +$mesg = GETPOST("msg"); // Security check if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'ficheinter', $fichinterid, 'fichinter'); - +$result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); +$object = new Fichinter($db); /* * Actions */ -if ($action != 'create' && $action != 'add' && $action != 'classifybilled' && ! ($_REQUEST["id"] > 0) && empty($_REQUEST["ref"])) +if ($action == 'confirm_validate' && $confirm == 'yes') { - Header("Location: ".DOL_URL_ROOT.'/fichinter/list.php'); - exit; -} - -if ($action == 'confirm_validate' && $_REQUEST['confirm'] == 'yes') -{ - $object = new Fichinter($db); $object->fetch($id); $object->fetch_thirdparty(); @@ -106,9 +88,8 @@ if ($action == 'confirm_validate' && $_REQUEST['confirm'] == 'yes') } } -if ($action == 'confirm_modify' && $_REQUEST['confirm'] == 'yes') +if ($action == 'confirm_modify' && $confirm == 'yes') { - $object = new Fichinter($db); $object->fetch($id); $object->fetch_thirdparty(); @@ -135,17 +116,17 @@ if ($action == 'confirm_modify' && $_REQUEST['confirm'] == 'yes') } } -if ($_POST["action"] == 'add') +if ($action == 'add') { - $object = new Fichinter($db); - - $object->socid = $_POST["socid"]; - $object->duree = $_POST["duree"]; - $object->fk_project = $_POST["projectid"]; - $object->author = $user->id; - $object->description = $_POST["description"]; - $object->ref = $_POST["ref"]; - $object->modelpdf = $_POST["model"]; + $object->socid = $socid; + $object->duree = $_POST["duree"]; + $object->fk_project = $_POST["projectid"]; + $object->author = $user->id; + $object->description = $_POST["description"]; + $object->ref = $ref; + $object->modelpdf = $_POST["model"]; + $object->note_private = $_POST["note_private"]; + $object->note_public = $_POST["note_public"]; if ($object->socid > 0) { @@ -153,14 +134,12 @@ if ($_POST["action"] == 'add') if ($result > 0) { $id=$result; // Force raffraichissement sur fiche venant d'etre cree - $fichinterid=$result; } else { $langs->load("errors"); $mesg='
'.$langs->trans($object->error).'
'; $action = 'create'; - $_GET["socid"] = $_POST["socid"]; } } else @@ -170,18 +149,17 @@ if ($_POST["action"] == 'add') } } -if ($_POST["action"] == 'update') +if ($action == 'update') { - $object = new Fichinter($db); $object->fetch($id); - $object->socid = $_POST["socid"]; - $object->fk_project = $_POST["projectid"]; - $object->author = $user->id; - $object->description = $_POST["description"]; - $object->ref = $_POST["ref"]; + $object->socid = $socid; + $object->fk_project = $_POST["projectid"]; + $object->author = $user->id; + $object->description = $_POST["description"]; + $object->ref = $ref; - $object->update($user); + $object->update(); } /* @@ -189,7 +167,6 @@ if ($_POST["action"] == 'update') */ if ($action == 'builddoc') // En get ou en post { - $object = new Fichinter($db); $object->fetch($id); $object->fetch_thirdparty(); $object->fetch_lines(); @@ -220,17 +197,15 @@ if ($action == 'builddoc') // En get ou en post // Set into a project if ($action == 'classin') { - $object = new Fichinter($db); $object->fetch($id); $result=$object->setProject($_POST['projectid']); if ($result < 0) dol_print_error($db,$object->error); } -if ($action == 'confirm_delete' && $_REQUEST['confirm'] == 'yes') +if ($action == 'confirm_delete' && $confirm == 'yes') { if ($user->rights->ficheinter->supprimer) { - $object = new Fichinter($db); $object->fetch($id); $object->delete($user); } @@ -240,7 +215,6 @@ if ($action == 'confirm_delete' && $_REQUEST['confirm'] == 'yes') if ($action == 'setdescription') { - $object = new Fichinter($db); $object->fetch($id); $result=$object->set_description($user,$_POST['description']); if ($result < 0) dol_print_error($db,$object->error); @@ -263,8 +237,7 @@ if ($action == "addline" && $user->rights->ficheinter->creer) { $db->begin(); - $object = new Fichinter($db); - $ret=$object->fetch($_POST['fichinterid']); + $ret=$object->fetch($id); $object->fetch_thirdparty(); $desc=$_POST['np_desc']; @@ -272,7 +245,7 @@ if ($action == "addline" && $user->rights->ficheinter->creer) $duration = ConvertTime2Seconds($_POST['durationhour'],$_POST['durationmin']); $result=$object->addline( - $_POST['fichinterid'], + $id, $desc, $date_intervention, $duration @@ -294,7 +267,7 @@ if ($action == "addline" && $user->rights->ficheinter->creer) $db->commit(); fichinter_create($db, $object, $object->modelpdf, $outputlangs); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']); + Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else @@ -308,12 +281,11 @@ if ($action == "addline" && $user->rights->ficheinter->creer) // Classify Billed if ($action == 'classifybilled') { - $object = new Fichinter($db); $object->fetch($id); $result=$object->setBilled(); if ($result > 0) { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']); + Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else @@ -325,31 +297,30 @@ if ($action == 'classifybilled') /* * Mise a jour d'une ligne d'intervention */ -if ($action == 'updateligne' && $user->rights->ficheinter->creer && $_POST["save"] == $langs->trans("Save")) +if ($action == 'updateline' && $user->rights->ficheinter->creer && $_POST["save"] == $langs->trans("Save")) { - $fichinterline = new FichinterLigne($db); - if ($fichinterline->fetch($_POST['ligne']) <= 0) + $objectline = new FichinterLigne($db); + if ($objectline->fetch($_POST['line_id']) <= 0) { dol_print_error($db); exit; } - $object = new Fichinter($db); - if ($object->fetch($fichinterline->fk_fichinter) <= 0) + if ($object->fetch($objectline->fk_fichinter) <= 0) { dol_print_error($db); exit; } $object->fetch_thirdparty(); - $desc=$_POST['np_desc']; - $date_intervention = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]); - $duration = ConvertTime2Seconds($_POST['durationhour'],$_POST['durationmin']); + $desc = $_POST['np_desc']; + $date_inter = dol_mktime($_POST["dihour"], $_POST["dimin"], 0, $_POST["dimonth"], $_POST["diday"], $_POST["diyear"]); + $duration = ConvertTime2Seconds($_POST['durationhour'],$_POST['durationmin']); - $fichinterline->datei=$date_intervention; - $fichinterline->desc=$desc; - $fichinterline->duration=$duration; - $result = $fichinterline->update(); + $objectline->datei = $date_inter; + $objectline->desc = $desc; + $objectline->duration = $duration; + $result = $objectline->update(); if ($result < 0) { dol_print_error($db); @@ -368,34 +339,26 @@ if ($action == 'updateligne' && $user->rights->ficheinter->creer && $_POST["save } fichinter_create($db, $object, $object->modelpdf, $outputlangs); - unset($_POST['dihour']); - unset($_POST['dimin']); - unset($_POST['dimonth']); - $dateintervention=''; - unset($_POST['np_desc']); - unset($_POST['durationhour']); - unset($_POST['durationmin']); - - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']); + Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } /* * Supprime une ligne d'intervention AVEC confirmation */ -if ($action == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes') +if ($action == 'confirm_deleteline' && $confirm == 'yes') { if ($user->rights->ficheinter->creer) { - $fichinterline = new FichinterLigne($db); - if ($fichinterline->fetch($_GET['ligne']) <= 0) + $objectline = new FichinterLigne($db); + if ($objectline->fetch($_GET['line_id']) <= 0) { dol_print_error($db); exit; } - $result=$fichinterline->deleteline(); - $object = new Fichinter($db); - if ($object->fetch($fichinterline->fk_fichinter) <= 0) + $result=$objectline->deleteline(); + + if ($object->fetch($objectline->fk_fichinter) <= 0) { dol_print_error($db); exit; @@ -413,7 +376,7 @@ if ($action == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes') } fichinter_create($db, $object, $object->modelpdf, $outputlangs); } - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } @@ -423,10 +386,9 @@ if ($action == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes') if ($action == 'up' && $user->rights->ficheinter->creer) { - $object = new Fichinter($db); $object->fetch($id); $object->fetch_thirdparty(); - $object->line_up($_GET['rowid']); + $object->line_up($_GET['line_id']); // Define output language $outputlangs = $langs; @@ -439,16 +401,15 @@ if ($action == 'up' && $user->rights->ficheinter->creer) $outputlangs->setDefaultLang($newlang); } fichinter_create($db, $object, $object->modelpdf, $outputlangs); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']); + Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.$_GET['line_id']); exit; } if ($action == 'down' && $user->rights->ficheinter->creer) { - $object = new Fichinter($db); $object->fetch($id); $object->fetch_thirdparty(); - $object->line_down($_GET['rowid']); + $object->line_down($_GET['line_id']); // Define output language $outputlangs = $langs; @@ -461,7 +422,7 @@ if ($action == 'down' && $user->rights->ficheinter->creer) $outputlangs->setDefaultLang($newlang); } fichinter_create($db, $object, $object->modelpdf, $outputlangs); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']); + Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.$_GET['line_id']); exit; } @@ -505,11 +466,10 @@ if ($action == 'send' && ! $_POST['cancel'] && (empty($conf->global->MAIN_USE_AD { $langs->load('mails'); - $object = new Fichinter($db); - if ( $object->fetch($_POST['fichinter_id']) ) + if ($object->fetch($id) > 0) { - $ficheinterref = dol_sanitizeFileName($object->ref); - $file = $conf->ficheinter->dir_output . '/' . $ficheinterref . '/' . $ficheinterref . '.pdf'; + $objectref = dol_sanitizeFileName($object->ref); + $file = $conf->ficheinter->dir_output . '/' . $objectref . '/' . $objectref . '.pdf'; if (is_readable($file)) { @@ -540,11 +500,11 @@ if ($action == 'send' && ! $_POST['cancel'] && (empty($conf->global->MAIN_USE_AD { $langs->load("commercial"); - $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; - $replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>'; - $message = $_POST['message']; - $sendtocc = $_POST['sendtocc']; - $deliveryreceipt = $_POST['deliveryreceipt']; + $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; + $replyto = $_POST['replytoname']. ' <' . $_POST['replytomail'].'>'; + $message = $_POST['message']; + $sendtocc = $_POST['sendtocc']; + $deliveryreceipt = $_POST['deliveryreceipt']; if ($action == 'send') { @@ -592,7 +552,7 @@ if ($action == 'send' && ! $_POST['cancel'] && (empty($conf->global->MAIN_USE_AD $object->actionmsg = $actionmsg; $object->actionmsg2 = $actionmsg2; $object->fk_element = $object->id; - $object->elementtype = $object->element; + $object->elementtype = $object->element; // Appel des triggers include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); @@ -659,7 +619,7 @@ if ($action == 'send' && ! $_POST['cancel'] && (empty($conf->global->MAIN_USE_AD * View */ -$html = new Form($db); +$form = new Form($db); $formfile = new FormFile($db); llxHeader(); @@ -671,11 +631,7 @@ if ($action == 'create') * Creation d'une nouvelle fiche d'intervention */ - $societe=new Societe($db); - if ($_GET["socid"] > 0) - { - $societe->fetch($_GET["socid"]); - } + $soc=new Societe($db); print_fiche_titre($langs->trans("AddIntervention")); @@ -687,31 +643,37 @@ if ($action == 'create') exit; } - $ficheinter = new Fichinter($db); - $ficheinter->date = time(); - if ($fichinterid) $result=$ficheinter->fetch($fichinterid); + $object->date = dol_now(); $obj = $conf->global->FICHEINTER_ADDON; $obj = "mod_".$obj; $modFicheinter = new $obj; - $numpr = $modFicheinter->getNextValue($societe,$ficheinter); + $numpr = $modFicheinter->getNextValue($soc, $object); - if ($_GET["socid"] > 0) + if ($socid > 0) { + $soc->fetch($socid); + print '
'; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; // Ref print ''; print ''."\n"; + + // Description (must be a textarea and not html must be allowed (used in list view) + print ''; + print ''; // Project if ($conf->projet->enabled) @@ -719,10 +681,10 @@ if ($action == 'create') $langs->load("project"); print ''; } @@ -732,14 +694,25 @@ if ($action == 'create') print ''; print '"; - - // Description (must be a textarea and not html must be allowed (used in list view) - print ''; - print ''; + print ''; + print ''; + + // Private note + if (! $user->societe_id) + { + print ''; + print ''; + print ''; + } print '
'.$langs->trans("Thirdparty").''.$societe->getNomUrl(1).'
'.$langs->trans("ThirdParty").''.$soc->getNomUrl(1).'
'.$langs->trans("Ref").'
'.$langs->trans("Description").''; + print ''; + print '
'.$langs->trans("Project").''; - $numprojet=select_projects($societe->id,$_POST["projectid"],'projectid'); + $numprojet=select_projects($soc->id,$_POST["projectid"],'projectid'); if ($numprojet==0) { - print '   '.$langs->trans("AddProject").''; + print '   '.$langs->trans("AddProject").''; } print '
'.$langs->trans("DefaultModel").''; $liste=ModelePDFFicheinter::liste_modeles($db); - print $html->selectarray('model',$liste,$conf->global->FICHEINTER_ADDON_PDF); + print $form->selectarray('model',$liste,$conf->global->FICHEINTER_ADDON_PDF); print "
'.$langs->trans("Description").''; - print ''; + + // Public note + print '
'.$langs->trans('NotePublic').''; + print ''; print '
'.$langs->trans('NotePrivate').''; + print ''; + print '
'; @@ -751,10 +724,10 @@ if ($action == 'create') } else { - print ''; + print ''; print ''; - print ''; print '
'.$langs->trans("Thirdparty").''; - $html->select_societes('','socid','',1,1); + print '
'.$langs->trans("ThirdParty").''; + $form->select_societes('','socid','',1,1); print '
'; @@ -767,20 +740,20 @@ if ($action == 'create') } } -elseif ($fichinterid) +else if ($id > 0 || ! empty($ref)) { /* * Affichage en mode visu */ + + $object->fetch($id, $ref); $object->fetch_thirdparty(); - $societe=new Societe($db); - $societe->fetch($object->socid); - + $soc=new Societe($db); + $soc->fetch($object->socid); dol_htmloutput_mesg($mesg); - $head = fichinter_prepare_head($object); dol_fiche_head($head, 'card', $langs->trans("InterventionCard"), 0, 'intervention'); @@ -788,28 +761,28 @@ elseif ($fichinterid) // Confirmation de la suppression de la fiche d'intervention if ($action == 'delete') { - $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1); + $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteIntervention'), $langs->trans('ConfirmDeleteIntervention'), 'confirm_delete','',0,1); if ($ret == 'html') print '
'; } // Confirmation validation if ($action == 'validate') { - $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $langs->trans('ConfirmValidateIntervention'), 'confirm_validate','',0,1); + $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $langs->trans('ConfirmValidateIntervention'), 'confirm_validate','',0,1); if ($ret == 'html') print '
'; } // Confirmation de la validation de la fiche d'intervention if ($action == 'modify') { - $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1); + $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify','',0,1); if ($ret == 'html') print '
'; } // Confirmation de la suppression d'une ligne d'intervention if ($action == 'ask_deleteline') { - $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&ligne='.$_GET["ligne"], $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1); + $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&line_id='.$_GET["line_id"], $langs->trans('DeleteInterventionLine'), $langs->trans('ConfirmDeleteInterventionLine'), 'confirm_deleteline','',0,1); if ($ret == 'html') print '
'; } @@ -817,7 +790,7 @@ elseif ($fichinterid) // Ref print ''.$langs->trans("Ref").''; - print $html->showrefnav($object,'ref','',1,'ref','ref'); + print $form->showrefnav($object,'ref','',1,'ref','ref'); print ''; // Third party @@ -825,31 +798,38 @@ elseif ($fichinterid) // Duration print ''.$langs->trans("TotalDuration").''; - //print $object->duree.'-'.$conf->global->MAIN_DURATION_OF_WORKDAY; print ''.ConvertSecondToTime($object->duree,'all',$conf->global->MAIN_DURATION_OF_WORKDAY).''; - //print ''.ConvertSecondToTime(90000,'all',$conf->global->MAIN_DURATION_OF_WORKDAY).''; print ''; // Description (must be a textarea and not html must be allowed (used in list view) print ''; - print ''; - if ($action != 'editdescription' && $object->statut == 0) print ''; - print '
'; - print $langs->trans('Description'); - print 'id.'">'.img_edit($langs->trans('Modify'),1).'
'; - print ''; - if ($action == 'editdescription') + if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) { - print ''; - print ''; - print ''; - print '
'; - print ''; - print '
'; + print $langs->trans('Description'); + print ''; + print $form->editInPlace($object->description, 'description', $user->rights->ficheinter->creer && $object->statut == 0, 'textarea'); } else { - print dol_nl2br($object->description); + print ''; + if ($action != 'editdescription' && $object->statut == 0) print ''; + print '
'; + print $langs->trans('Description'); + print 'id.'">'.img_edit($langs->trans('Modify'),1).'
'; + print ''; + if ($action == 'editdescription') + { + print '
'; + print ''; + print ''; + print '
'; + print ''; + print '
'; + } + else + { + print dol_nl2br($object->description); + } } print ''; print ''; @@ -874,11 +854,11 @@ elseif ($fichinterid) print ''; if ($action == 'classify') { - $html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'projectid'); } else { - $html->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none'); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project,'none'); } print ''; print ''; @@ -886,6 +866,21 @@ elseif ($fichinterid) // Statut print ''.$langs->trans("Status").''.$object->getLibStatut(4).''; + + // Public note + print ''.$langs->trans("NotePublic").''; + print ''; + print $form->editInPlace($object->note_public, 'note_public', $user->rights->ficheinter->creer, 'textarea'); + print ""; + + // Private note + if (! $user->societe_id) + { + print ''.$langs->trans("NotePrivate").''; + print ''; + print $form->editInPlace($object->note_private, 'note_private', $user->rights->ficheinter->creer, 'textarea'); + print ""; + } print ""; @@ -895,7 +890,7 @@ elseif ($fichinterid) $sql = 'SELECT ft.rowid, ft.description, ft.fk_fichinter, ft.duree, ft.rang,'; $sql.= ' ft.date as date_intervention'; $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft'; - $sql.= ' WHERE ft.fk_fichinter = '.$fichinterid; + $sql.= ' WHERE ft.fk_fichinter = '.$object->id; $sql.= ' ORDER BY ft.rang ASC, ft.rowid'; $resql = $db->query($sql); @@ -922,7 +917,7 @@ elseif ($fichinterid) $var=!$var; // Ligne en mode visu - if ($action != 'editline' || $_GET['ligne'] != $objp->rowid) + if ($action != 'editline' || $_GET['line_id'] != $objp->rowid) { print ''; print ''; @@ -942,12 +937,12 @@ elseif ($fichinterid) if ($object->statut == 0 && $user->rights->ficheinter->creer) { print ''; - print 'rowid.'#'.$objp->rowid.'">'; + print 'rowid.'#'.$objp->rowid.'">'; print img_edit(); print ''; print ''; print ''; - print 'rowid.'">'; + print 'rowid.'">'; print img_delete(); print ''; if ($num > 1) @@ -955,13 +950,13 @@ elseif ($fichinterid) print ''; if ($i > 0) { - print 'rowid.'">'; + print 'rowid.'">'; print img_up(); print ''; } if ($i < $num-1) { - print 'rowid.'">'; + print 'rowid.'">'; print img_down(); print ''; } @@ -977,13 +972,13 @@ elseif ($fichinterid) } // Ligne en mode update - if ($object->statut == 0 && $action == 'editline' && $user->rights->ficheinter->creer && $_GET["ligne"] == $objp->rowid) + if ($object->statut == 0 && $action == 'editline' && $user->rights->ficheinter->creer && $_GET["line_id"] == $objp->rowid) { print '
rowid.'" method="post">'; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; // ancre pour retourner sur la ligne @@ -996,12 +991,12 @@ elseif ($fichinterid) // Date d'intervention print ''; - $html->select_date($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention"); + $form->select_date($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention"); print ''; // Duration print ''; - $html->select_duration('duration',$objp->duree); + $form->select_duration('duration',$objp->duree); print ''; print ''; @@ -1036,7 +1031,7 @@ elseif ($fichinterid) // Ajout ligne d'intervention print ''; print ''; - print ''; + print ''; print ''; $var=false; @@ -1054,12 +1049,12 @@ elseif ($fichinterid) $timearray=dol_getdate(mktime()); if (empty($_POST['diday'])) $timewithnohour=dol_mktime(0,0,0,$timearray['mon'],$timearray['mday'],$timearray['year']); else $timewithnohour=dol_mktime($_POST['dihour'],$_POST['dimin'],$_POST['disec'],$_POST['dimonth'],$_POST['diday'],$_POST['diyear']); - $html->select_date($timewithnohour,'di',1,1,0,"addinter"); + $form->select_date($timewithnohour,'di',1,1,0,"addinter"); print ''; // Duration print ''; - $html->select_duration('duration',(empty($_POST["durationhour"]) && empty($_POST["durationmin"]))?3600:(60*60*$_POST["durationhour"]+60*$_POST["durationmin"])); + $form->select_duration('duration',(empty($_POST["durationhour"]) && empty($_POST["durationmin"]))?3600:(60*60*$_POST["durationhour"]+60*$_POST["durationmin"])); print ''; print ''; @@ -1107,8 +1102,8 @@ elseif ($fichinterid) // Send if ($object->statut > 0) { - $ficheinterref = dol_sanitizeFileName($object->ref); - $file = $conf->ficheinter->dir_output . '/'.$ficheinterref.'/'.$ficheinterref.'.pdf'; + $objectref = dol_sanitizeFileName($object->ref); + $file = $conf->ficheinter->dir_output . '/'.$objectref.'/'.$objectref.'.pdf'; if (file_exists($file)) { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->ficheinter->ficheinter_advance->send) @@ -1168,7 +1163,7 @@ elseif ($fichinterid) $var=true; //print "
\n"; - $somethingshown=$formfile->show_documents('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$societe->default_lang); + $somethingshown=$formfile->show_documents('ficheinter',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang); /* * Linked object block @@ -1223,7 +1218,7 @@ elseif ($fichinterid) $formmail->param['action']='send'; $formmail->param['models']='fichinter_send'; $formmail->param['fichinter_id']=$object->id; - $formmail->param['returnurl']=DOL_URL_ROOT.'/fichinter/fiche.php?id='.$object->id; + $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; // Init list of files if (! empty($_REQUEST["mode"]) && $_REQUEST["mode"]=='init') diff --git a/htdocs/includes/.cvsignore b/htdocs/includes/.cvsignore deleted file mode 100644 index ee6265250e2..00000000000 --- a/htdocs/includes/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -jpgraph2 -phpsane -php_excelreader -.DS_Store -ckfinder diff --git a/htdocs/includes/jquery/i18n/README b/htdocs/includes/jquery/i18n/README new file mode 100644 index 00000000000..44fe75ed28e --- /dev/null +++ b/htdocs/includes/jquery/i18n/README @@ -0,0 +1,10 @@ +http://github.com/jquery/jquery-ui + +add "js" directory in language directory +eg: /langs/fr_FR/js/ + +move datepicker language file +eg: /langs/fr_FR/js/jquery.ui.datepicker-fr.js + +and rename the file +eg: /langs/fr_FR/js/jquery.ui.datepicker.js diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-af.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-af.js new file mode 100644 index 00000000000..0922ef7a1c0 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-af.js @@ -0,0 +1,23 @@ +/* Afrikaans initialisation for the jQuery UI date picker plugin. */ +/* Written by Renier Pretorius. */ +jQuery(function($){ + $.datepicker.regional['af'] = { + closeText: 'Selekteer', + prevText: 'Vorige', + nextText: 'Volgende', + currentText: 'Vandag', + monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie', + 'Julie','Augustus','September','Oktober','November','Desember'], + monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', + 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], + dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], + dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'], + dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'], + weekHeader: 'Wk', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['af']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ar-DZ.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ar-DZ.js new file mode 100644 index 00000000000..7b175af40ea --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ar-DZ.js @@ -0,0 +1,23 @@ +/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/ +/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */ + +jQuery(function($){ + $.datepicker.regional['ar-DZ'] = { + closeText: 'إغلاق', + prevText: '<السابق', + nextText: 'التالي>', + currentText: 'اليوم', + monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان', + 'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'], + monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], + dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + weekHeader: 'أسبوع', + dateFormat: 'dd/mm/yy', + firstDay: 6, + isRTL: true, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['ar-DZ']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ar.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ar.js new file mode 100644 index 00000000000..f24b3ff5a1c --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ar.js @@ -0,0 +1,23 @@ +/* Arabic Translation for jQuery UI date picker plugin. */ +/* Khaled Alhourani -- me@khaledalhourani.com */ +/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */ +jQuery(function($){ + $.datepicker.regional['ar'] = { + closeText: 'إغلاق', + prevText: '<السابق', + nextText: 'التالي>', + currentText: 'اليوم', + monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران', + 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], + dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], + weekHeader: 'أسبوع', + dateFormat: 'dd/mm/yy', + firstDay: 6, + isRTL: true, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['ar']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-az.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-az.js new file mode 100644 index 00000000000..1101c8b91b2 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-az.js @@ -0,0 +1,23 @@ +/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Jamil Najafov (necefov33@gmail.com). */ +jQuery(function($) { + $.datepicker.regional['az'] = { + closeText: 'Bağla', + prevText: '<Geri', + nextText: 'İrəli>', + currentText: 'Bugün', + monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun', + 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'], + monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun', + 'İyul','Avq','Sen','Okt','Noy','Dek'], + dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'], + dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'], + dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'], + weekHeader: 'Hf', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['az']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-bg.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-bg.js new file mode 100644 index 00000000000..4e0ee2f509f --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-bg.js @@ -0,0 +1,24 @@ +/* Bulgarian initialisation for the jQuery UI date picker plugin. */ +/* Written by Stoyan Kyosev (http://svest.org). */ +jQuery(function($){ + $.datepicker.regional['bg'] = { + closeText: 'затвори', + prevText: '<назад', + nextText: 'напред>', + nextBigText: '>>', + currentText: 'днес', + monthNames: ['Януари','Февруари','Март','Април','Май','Юни', + 'Юли','Август','Септември','Октомври','Ноември','Декември'], + monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни', + 'Юли','Авг','Сеп','Окт','Нов','Дек'], + dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'], + dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'], + dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'], + weekHeader: 'Wk', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['bg']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-bs.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-bs.js new file mode 100644 index 00000000000..d6457375544 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-bs.js @@ -0,0 +1,23 @@ +/* Bosnian i18n for the jQuery UI date picker plugin. */ +/* Written by Kenan Konjo. */ +jQuery(function($){ + $.datepicker.regional['bs'] = { + closeText: 'Zatvori', + prevText: '<', + nextText: '>', + currentText: 'Danas', + monthNames: ['Januar','Februar','Mart','April','Maj','Juni', + 'Juli','August','Septembar','Oktobar','Novembar','Decembar'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Aug','Sep','Okt','Nov','Dec'], + dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'], + dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'], + dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], + weekHeader: 'Wk', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['bs']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-cs.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-cs.js new file mode 100644 index 00000000000..bf56baf01ef --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-cs.js @@ -0,0 +1,23 @@ +/* Czech initialisation for the jQuery UI date picker plugin. */ +/* Written by Tomas Muller (tomas@tomas-muller.net). */ +jQuery(function($){ + $.datepicker.regional['cs'] = { + closeText: 'Zavřít', + prevText: '<Dříve', + nextText: 'Později>', + currentText: 'Nyní', + monthNames: ['leden','únor','březen','duben','květen','červen', + 'červenec','srpen','září','říjen','listopad','prosinec'], + monthNamesShort: ['led','úno','bře','dub','kvě','čer', + 'čvc','srp','zář','říj','lis','pro'], + dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], + dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'], + dayNamesMin: ['ne','po','út','st','čt','pá','so'], + weekHeader: 'Týd', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['cs']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-eo.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-eo.js new file mode 100644 index 00000000000..39e44fc57c1 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-eo.js @@ -0,0 +1,23 @@ +/* Esperanto initialisation for the jQuery UI date picker plugin. */ +/* Written by Olivier M. (olivierweb@ifrance.com). */ +jQuery(function($){ + $.datepicker.regional['eo'] = { + closeText: 'Fermi', + prevText: '<Anta', + nextText: 'Sekv>', + currentText: 'Nuna', + monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio', + 'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Aŭg','Sep','Okt','Nov','Dec'], + dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'], + dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'], + dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'], + weekHeader: 'Sb', + dateFormat: 'dd/mm/yy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['eo']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-et.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-et.js new file mode 100644 index 00000000000..92f81f63786 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-et.js @@ -0,0 +1,23 @@ +/* Estonian initialisation for the jQuery UI date picker plugin. */ +/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */ +jQuery(function($){ + $.datepicker.regional['et'] = { + closeText: 'Sulge', + prevText: 'Eelnev', + nextText: 'Järgnev', + currentText: 'Täna', + monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni', + 'Juuli','August','September','Oktoober','November','Detsember'], + monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni', + 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'], + dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'], + dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'], + dayNamesMin: ['P','E','T','K','N','R','L'], + weekHeader: 'Sm', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['et']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-eu.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-eu.js new file mode 100644 index 00000000000..4c40eebec67 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-eu.js @@ -0,0 +1,23 @@ +/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */ +/* Karrikas-ek itzulia (karrikas@karrikas.com) */ +jQuery(function($){ + $.datepicker.regional['eu'] = { + closeText: 'Egina', + prevText: '<Aur', + nextText: 'Hur>', + currentText: 'Gaur', + monthNames: ['Urtarrila','Otsaila','Martxoa','Apirila','Maiatza','Ekaina', + 'Uztaila','Abuztua','Iraila','Urria','Azaroa','Abendua'], + monthNamesShort: ['Urt','Ots','Mar','Api','Mai','Eka', + 'Uzt','Abu','Ira','Urr','Aza','Abe'], + dayNames: ['Igandea','Astelehena','Asteartea','Asteazkena','Osteguna','Ostirala','Larunbata'], + dayNamesShort: ['Iga','Ast','Ast','Ast','Ost','Ost','Lar'], + dayNamesMin: ['Ig','As','As','As','Os','Os','La'], + weekHeader: 'Wk', + dateFormat: 'yy/mm/dd', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['eu']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-fo.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-fo.js new file mode 100644 index 00000000000..9c848a04be2 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-fo.js @@ -0,0 +1,23 @@ +/* Faroese initialisation for the jQuery UI date picker plugin */ +/* Written by Sverri Mohr Olsen, sverrimo@gmail.com */ +jQuery(function($){ + $.datepicker.regional['fo'] = { + closeText: 'Lat aftur', + prevText: '<Fyrra', + nextText: 'Næsta>', + currentText: 'Í dag', + monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni', + 'Juli','August','September','Oktober','November','Desember'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', + 'Jul','Aug','Sep','Okt','Nov','Des'], + dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'], + dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'], + dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'], + weekHeader: 'Vk', + dateFormat: 'dd-mm-yy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['fo']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-gl.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-gl.js new file mode 100644 index 00000000000..3e24312a4d6 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-gl.js @@ -0,0 +1,23 @@ +/* Galician localization for 'UI date picker' jQuery extension. */ +/* Translated by Jorge Barreiro . */ +jQuery(function($){ + $.datepicker.regional['gl'] = { + closeText: 'Pechar', + prevText: '<Ant', + nextText: 'Seg>', + currentText: 'Hoxe', + monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño', + 'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'], + monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ', + 'Xul','Ago','Set','Out','Nov','Dec'], + dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'], + dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'], + dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'], + weekHeader: 'Sm', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['gl']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-he.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-he.js new file mode 100644 index 00000000000..58ea8c6d8d6 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-he.js @@ -0,0 +1,23 @@ +/* Hebrew initialisation for the UI Datepicker extension. */ +/* Written by Amir Hardon (ahardon at gmail dot com). */ +jQuery(function($){ + $.datepicker.regional['he'] = { + closeText: 'סגור', + prevText: '<הקודם', + nextText: 'הבא>', + currentText: 'היום', + monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני', + 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'], + monthNamesShort: ['1','2','3','4','5','6', + '7','8','9','10','11','12'], + dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'], + dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], + dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], + weekHeader: 'Wk', + dateFormat: 'dd/mm/yy', + firstDay: 0, + isRTL: true, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['he']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-hr.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-hr.js new file mode 100644 index 00000000000..6bc5aade129 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-hr.js @@ -0,0 +1,23 @@ +/* Croatian i18n for the jQuery UI date picker plugin. */ +/* Written by Vjekoslav Nesek. */ +jQuery(function($){ + $.datepicker.regional['hr'] = { + closeText: 'Zatvori', + prevText: '<', + nextText: '>', + currentText: 'Danas', + monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj', + 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'], + monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip', + 'Srp','Kol','Ruj','Lis','Stu','Pro'], + dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'], + dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'], + dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], + weekHeader: 'Tje', + dateFormat: 'dd.mm.yy.', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['hr']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-hy.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-hy.js new file mode 100644 index 00000000000..b4285159613 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-hy.js @@ -0,0 +1,23 @@ +/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/ +jQuery(function($){ + $.datepicker.regional['hy'] = { + closeText: 'Փակել', + prevText: '<Նախ.', + nextText: 'Հաջ.>', + currentText: 'Այսօր', + monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս', + 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'], + monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս', + 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'], + dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'], + dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'], + dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'], + weekHeader: 'ՇԲՏ', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['hy']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-id.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-id.js new file mode 100644 index 00000000000..4ad46f64083 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-id.js @@ -0,0 +1,23 @@ +/* Indonesian initialisation for the jQuery UI date picker plugin. */ +/* Written by Deden Fathurahman (dedenf@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['id'] = { + closeText: 'Tutup', + prevText: '<mundur', + nextText: 'maju>', + currentText: 'hari ini', + monthNames: ['Januari','Februari','Maret','April','Mei','Juni', + 'Juli','Agustus','September','Oktober','Nopember','Desember'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', + 'Jul','Agus','Sep','Okt','Nop','Des'], + dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'], + dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'], + dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'], + weekHeader: 'Mg', + dateFormat: 'dd/mm/yy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['id']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ko.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ko.js new file mode 100644 index 00000000000..5b3531652d9 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ko.js @@ -0,0 +1,23 @@ +/* Korean initialisation for the jQuery calendar extension. */ +/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['ko'] = { + closeText: '닫기', + prevText: '이전달', + nextText: '다음달', + currentText: '오늘', + monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)', + '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'], + monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)', + '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'], + dayNames: ['일','월','화','수','목','금','토'], + dayNamesShort: ['일','월','화','수','목','금','토'], + dayNamesMin: ['일','월','화','수','목','금','토'], + weekHeader: 'Wk', + dateFormat: 'yy-mm-dd', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: '년'}; + $.datepicker.setDefaults($.datepicker.regional['ko']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-kz.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-kz.js new file mode 100644 index 00000000000..658c21275d2 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-kz.js @@ -0,0 +1,23 @@ +/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['kz'] = { + closeText: 'Жабу', + prevText: '<Алдыңғы', + nextText: 'Келесі>', + currentText: 'Бүгін', + monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым', + 'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'], + monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау', + 'Шіл','Там','Қыр','Қаз','Қар','Жел'], + dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'], + dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'], + dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'], + weekHeader: 'Не', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['kz']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-lt.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-lt.js new file mode 100644 index 00000000000..2970f8f37c2 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-lt.js @@ -0,0 +1,23 @@ +/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* @author Arturas Paleicikas */ +jQuery(function($){ + $.datepicker.regional['lt'] = { + closeText: 'Uždaryti', + prevText: '<Atgal', + nextText: 'Pirmyn>', + currentText: 'Šiandien', + monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis', + 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'], + monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir', + 'Lie','Rugp','Rugs','Spa','Lap','Gru'], + dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'], + dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'], + dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'], + weekHeader: 'Wk', + dateFormat: 'yy-mm-dd', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['lt']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-lv.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-lv.js new file mode 100644 index 00000000000..003934e7212 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-lv.js @@ -0,0 +1,23 @@ +/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* @author Arturas Paleicikas */ +jQuery(function($){ + $.datepicker.regional['lv'] = { + closeText: 'Aizvērt', + prevText: 'Iepr', + nextText: 'Nāka', + currentText: 'Šodien', + monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs', + 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn', + 'Jūl','Aug','Sep','Okt','Nov','Dec'], + dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'], + dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'], + dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'], + weekHeader: 'Nav', + dateFormat: 'dd-mm-yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['lv']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ml.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ml.js new file mode 100644 index 00000000000..1e3432c0a8f --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ml.js @@ -0,0 +1,23 @@ +/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Saji Nediyanchath (saji89@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['ml'] = { + closeText: 'ശരി', + prevText: 'മുന്നത്തെ', + nextText: 'അടുത്തത് ', + currentText: 'ഇന്ന്', + monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്‍ച്ച്','ഏപ്രില്‍','മേയ്','ജൂണ്‍', + 'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്‍','ഒക്ടോബര്‍','നവംബര്‍','ഡിസംബര്‍'], + monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്‍', 'ഏപ്രി', 'മേയ്', 'ജൂണ്‍', + 'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'], + dayNames: ['ഞായര്‍', 'തിങ്കള്‍', 'ചൊവ്വ', 'ബുധന്‍', 'വ്യാഴം', 'വെള്ളി', 'ശനി'], + dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'], + dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'], + weekHeader: 'ആ', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['ml']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ms.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ms.js new file mode 100644 index 00000000000..c290af10a57 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ms.js @@ -0,0 +1,23 @@ +/* Malaysian initialisation for the jQuery UI date picker plugin. */ +/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */ +jQuery(function($){ + $.datepicker.regional['ms'] = { + closeText: 'Tutup', + prevText: '<Sebelum', + nextText: 'Selepas>', + currentText: 'hari ini', + monthNames: ['Januari','Februari','Mac','April','Mei','Jun', + 'Julai','Ogos','September','Oktober','November','Disember'], + monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun', + 'Jul','Ogo','Sep','Okt','Nov','Dis'], + dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'], + dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'], + dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'], + weekHeader: 'Mg', + dateFormat: 'dd/mm/yy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['ms']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-rm.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-rm.js new file mode 100644 index 00000000000..22ed21685dd --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-rm.js @@ -0,0 +1,21 @@ +/* Romansh initialisation for the jQuery UI date picker plugin. */ +/* Written by Yvonne Gienal (yvonne.gienal@educa.ch). */ +jQuery(function($){ + $.datepicker.regional['rm'] = { + closeText: 'Serrar', + prevText: '<Suandant', + nextText: 'Precedent>', + currentText: 'Actual', + monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'], + monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'], + dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'], + dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'], + dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'], + weekHeader: 'emna', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['rm']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sk.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sk.js new file mode 100644 index 00000000000..83ae8e811f1 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sk.js @@ -0,0 +1,23 @@ +/* Slovak initialisation for the jQuery UI date picker plugin. */ +/* Written by Vojtech Rinik (vojto@hmm.sk). */ +jQuery(function($){ + $.datepicker.regional['sk'] = { + closeText: 'Zavrieť', + prevText: '<Predchádzajúci', + nextText: 'Nasledujúci>', + currentText: 'Dnes', + monthNames: ['Január','Február','Marec','Apríl','Máj','Jún', + 'Júl','August','September','Október','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún', + 'Júl','Aug','Sep','Okt','Nov','Dec'], + dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'], + dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'], + dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'], + weekHeader: 'Ty', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['sk']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sq.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sq.js new file mode 100644 index 00000000000..d6086a78960 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sq.js @@ -0,0 +1,23 @@ +/* Albanian initialisation for the jQuery UI date picker plugin. */ +/* Written by Flakron Bytyqi (flakron@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['sq'] = { + closeText: 'mbylle', + prevText: '<mbrapa', + nextText: 'Përpara>', + currentText: 'sot', + monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor', + 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'], + monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer', + 'Kor','Gus','Sht','Tet','Nën','Dhj'], + dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'], + dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'], + dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'], + weekHeader: 'Ja', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['sq']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sr-SR.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sr-SR.js new file mode 100644 index 00000000000..6d5d042110e --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sr-SR.js @@ -0,0 +1,23 @@ +/* Serbian i18n for the jQuery UI date picker plugin. */ +/* Written by Dejan Dimić. */ +jQuery(function($){ + $.datepicker.regional['sr-SR'] = { + closeText: 'Zatvori', + prevText: '<', + nextText: '>', + currentText: 'Danas', + monthNames: ['Januar','Februar','Mart','April','Maj','Jun', + 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Avg','Sep','Okt','Nov','Dec'], + dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'], + dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'], + dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], + weekHeader: 'Sed', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['sr-SR']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sr.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sr.js new file mode 100644 index 00000000000..d4e1d9af09a --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-sr.js @@ -0,0 +1,23 @@ +/* Serbian i18n for the jQuery UI date picker plugin. */ +/* Written by Dejan Dimić. */ +jQuery(function($){ + $.datepicker.regional['sr'] = { + closeText: 'Затвори', + prevText: '<', + nextText: '>', + currentText: 'Данас', + monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун', + 'Јул','Август','Септембар','Октобар','Новембар','Децембар'], + monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун', + 'Јул','Авг','Сеп','Окт','Нов','Дец'], + dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'], + dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'], + dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'], + weekHeader: 'Сед', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['sr']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ta.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ta.js new file mode 100644 index 00000000000..40431ed8ec7 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-ta.js @@ -0,0 +1,23 @@ +/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by S A Sureshkumar (saskumar@live.com). */ +jQuery(function($){ + $.datepicker.regional['ta'] = { + closeText: 'மூடு', + prevText: 'முன்னையது', + nextText: 'அடுத்தது', + currentText: 'இன்று', + monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி', + 'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'], + monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி', + 'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'], + dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'], + dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'], + dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'], + weekHeader: 'Не', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['ta']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-th.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-th.js new file mode 100644 index 00000000000..d57541f640f --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-th.js @@ -0,0 +1,23 @@ +/* Thai initialisation for the jQuery UI date picker plugin. */ +/* Written by pipo (pipo@sixhead.com). */ +jQuery(function($){ + $.datepicker.regional['th'] = { + closeText: 'ปิด', + prevText: '« ย้อน', + nextText: 'ถัดไป »', + currentText: 'วันนี้', + monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน', + 'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'], + monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.', + 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'], + dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'], + dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], + dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], + weekHeader: 'Wk', + dateFormat: 'dd/mm/yy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['th']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-tj.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-tj.js new file mode 100644 index 00000000000..ed662392c53 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-tj.js @@ -0,0 +1,23 @@ +/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Abdurahmon Saidov (saidovab@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['tj'] = { + closeText: 'Идома', + prevText: '<Қафо', + nextText: 'Пеш>', + currentText: 'Имрӯз', + monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн', + 'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'], + monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн', + 'Июл','Авг','Сен','Окт','Ноя','Дек'], + dayNames: ['якшанбе','душанбе','сешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'], + dayNamesShort: ['якш','душ','сеш','чор','пан','ҷум','шан'], + dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'], + weekHeader: 'Хф', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['tj']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-uk.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-uk.js new file mode 100644 index 00000000000..07ce206b9ec --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-uk.js @@ -0,0 +1,23 @@ +/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['uk'] = { + closeText: 'Закрити', + prevText: '<', + nextText: '>', + currentText: 'Сьогодні', + monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень', + 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'], + monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер', + 'Лип','Сер','Вер','Жов','Лис','Гру'], + dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'], + dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'], + dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'], + weekHeader: 'Не', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['uk']); +}); \ No newline at end of file diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-vi.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-vi.js new file mode 100644 index 00000000000..b49e7eb130e --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-vi.js @@ -0,0 +1,23 @@ +/* Vietnamese initialisation for the jQuery UI date picker plugin. */ +/* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */ +jQuery(function($){ + $.datepicker.regional['vi'] = { + closeText: 'Đóng', + prevText: '<Trước', + nextText: 'Tiếp>', + currentText: 'Hôm nay', + monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu', + 'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'], + monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6', + 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'], + dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'], + dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], + dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], + weekHeader: 'Tu', + dateFormat: 'dd/mm/yy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['vi']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-zh-HK.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-zh-HK.js new file mode 100644 index 00000000000..3c26d0ec224 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-zh-HK.js @@ -0,0 +1,23 @@ +/* Chinese initialisation for the jQuery UI date picker plugin. */ +/* Written by SCCY (samuelcychan@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['zh-HK'] = { + closeText: '關閉', + prevText: '<上月', + nextText: '下月>', + currentText: '今天', + monthNames: ['一月','二月','三月','四月','五月','六月', + '七月','八月','九月','十月','十一月','十二月'], + monthNamesShort: ['一','二','三','四','五','六', + '七','八','九','十','十一','十二'], + dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], + dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], + dayNamesMin: ['日','一','二','三','四','五','六'], + weekHeader: '周', + dateFormat: 'dd-mm-yy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: true, + yearSuffix: '年'}; + $.datepicker.setDefaults($.datepicker.regional['zh-HK']); +}); diff --git a/htdocs/includes/jquery/i18n/jquery.ui.datepicker-zh-TW.js b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-zh-TW.js new file mode 100644 index 00000000000..19702a65c92 --- /dev/null +++ b/htdocs/includes/jquery/i18n/jquery.ui.datepicker-zh-TW.js @@ -0,0 +1,23 @@ +/* Chinese initialisation for the jQuery UI date picker plugin. */ +/* Written by Ressol (ressol@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['zh-TW'] = { + closeText: '關閉', + prevText: '<上月', + nextText: '下月>', + currentText: '今天', + monthNames: ['一月','二月','三月','四月','五月','六月', + '七月','八月','九月','十月','十一月','十二月'], + monthNamesShort: ['一','二','三','四','五','六', + '七','八','九','十','十一','十二'], + dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], + dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], + dayNamesMin: ['日','一','二','三','四','五','六'], + weekHeader: '周', + dateFormat: 'yy/mm/dd', + firstDay: 1, + isRTL: false, + showMonthAfterYear: true, + yearSuffix: '年'}; + $.datepicker.setDefaults($.datepicker.regional['zh-TW']); +}); diff --git a/htdocs/includes/jquery/plugins/flot/.cvsignore b/htdocs/includes/jquery/plugins/flot/.cvsignore deleted file mode 100755 index 1e107f52e47..00000000000 --- a/htdocs/includes/jquery/plugins/flot/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -examples diff --git a/htdocs/includes/jquery/plugins/jcrop/.cvsignore b/htdocs/includes/jquery/plugins/jcrop/.cvsignore deleted file mode 100755 index 7f27eaa98d0..00000000000 --- a/htdocs/includes/jquery/plugins/jcrop/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -aaa.txt -demos diff --git a/htdocs/includes/jquery/plugins/jeditable/jquery.jeditable.ui-datepicker.js b/htdocs/includes/jquery/plugins/jeditable/jquery.jeditable.ui-datepicker.js new file mode 100644 index 00000000000..19e738b1ee8 --- /dev/null +++ b/htdocs/includes/jquery/plugins/jeditable/jquery.jeditable.ui-datepicker.js @@ -0,0 +1,17 @@ +/* Create an inline datepicker which leverages the + jQuery UI datepicker +*/ +$.editable.addInputType('datepicker', { + element: function(settings, original) { + var input = $(''); + + input.datepicker({ + onSelect: function(dateText, inst) { + $(this).parents("form").submit(); + } + }); + + $(this).append(input); + return (input); + } +}); \ No newline at end of file diff --git a/htdocs/includes/nusoap/.cvsignore b/htdocs/includes/nusoap/.cvsignore deleted file mode 100644 index 81154dd4d19..00000000000 --- a/htdocs/includes/nusoap/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -samples diff --git a/htdocs/install/.cvsignore b/htdocs/install/.cvsignore deleted file mode 100644 index ba9d2cb1f4a..00000000000 --- a/htdocs/install/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -install.forced.php diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index db1a3928437..ad8aebf52a9 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -69,3 +69,17 @@ DROP TABLE IF EXISTS llx_pos_tmp; ALTER TABLE llx_deplacement ADD COLUMN fk_user_modif integer AFTER fk_user_author; +CREATE TABLE IF NOT EXISTS `llx_localtax` ( + `rowid` int(11) NOT NULL AUTO_INCREMENT, + `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `datep` date DEFAULT NULL, + `datev` date DEFAULT NULL, + `amount` double NOT NULL DEFAULT '0', + `label` varchar(255) DEFAULT NULL, + `entity` int(11) NOT NULL DEFAULT '1', + `note` text, + `fk_bank` int(11) DEFAULT NULL, + `fk_user_creat` int(11) DEFAULT NULL, + `fk_user_modif` int(11) DEFAULT NULL, + PRIMARY KEY (`rowid`) +) ENGINE=InnoDB; diff --git a/htdocs/install/mysql/tables/llx_localtax.sql b/htdocs/install/mysql/tables/llx_localtax.sql new file mode 100644 index 00000000000..460c3c29c63 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_localtax.sql @@ -0,0 +1,42 @@ +-- =================================================================== +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- Copyright (C) 2005-2009 Regis Houssin +-- Copyright (C) 2011 Juanjo Menent +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- =================================================================== + +create table llx_localtax +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + datep date, -- date of payment + datev date, -- date of value + amount real NOT NULL DEFAULT 0, + label varchar(255), + entity integer DEFAULT 1 NOT NULL, + note text, + fk_bank integer, + fk_user_creat integer, + fk_user_modif integer +)ENGINE=innodb; + +-- +-- List of codes for the field entity +-- +-- 1 : first company vat +-- 2 : second company vat +-- 3 : etc... +-- \ No newline at end of file diff --git a/htdocs/langs/.htaccess b/htdocs/langs/.htaccess index 93169e4eb44..d87f1072807 100644 --- a/htdocs/langs/.htaccess +++ b/htdocs/langs/.htaccess @@ -1,2 +1,7 @@ Order deny,allow Deny from all + + +Order deny,allow +Allow from all + diff --git a/htdocs/langs/ca_ES/.cvsignore b/htdocs/langs/ca_ES/.cvsignore deleted file mode 100644 index 1fd02e68d65..00000000000 --- a/htdocs/langs/ca_ES/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/ca_ES/bills.lang b/htdocs/langs/ca_ES/bills.lang index 20cdeaff9cd..caafb2956e1 100644 --- a/htdocs/langs/ca_ES/bills.lang +++ b/htdocs/langs/ca_ES/bills.lang @@ -234,7 +234,10 @@ GlobalDiscount=Descompte fixe CreditNote=Abonament CreditNotes=Abonaments AddDiscount=Crear descompte fix +AddRelativeDiscount=Crear descompte relatiu +EditRelativeDiscount=Editar descompte relatiu AddGlobalDiscount=Crear descompte fixe +EditGlobalDiscounts=Editar descompte fixe AddCreditNote=Crear factura de pagament Deposit=Bestreta Deposits=Bestretes @@ -277,7 +280,7 @@ TotalOfTwoDiscountMustEqualsOriginal=La suma de l'import dels 2 nous descomptes ConfirmRemoveDiscount=Esteu segur de voler eliminar aquest descompte? RelatedBill=Factura associada RelatedBills=Factures associades -# PaymentConditions== +# PaymentConditions PaymentConditionShortRECEP=A la recepció PaymentConditionRECEP=A la recepció de la factura PaymentConditionShort30D=30 dies @@ -288,7 +291,7 @@ PaymentConditionShort60D=60 dies PaymentCondition60D=Pagament als 60 dies PaymentConditionShort60DENDMONTH=60 dies a fi de mes PaymentCondition60DENDMONTH=Pagament als 60 dies a fi de mes -# PaymentType== +# PaymentType PaymentTypeVIR=Transferència bancària PaymentTypeShortVIR=Transferència PaymentTypePRE=Domiciliació bancària @@ -379,4 +382,4 @@ PDFCrabeDescription=Model de factura complet (model recomanat per defecte) # oursin PDF Model PDFOursinDescription=Model de factura complet (model alternatiu) # NumRef Modules -TerreNumRefModelDesc1=Retorna el nombre sota el format %syymm-nnnn per a les factures i %syymm-nnnn per als abonaments on yy és l'any, mm. el mes i nnnn un comptador seqüencial sense ruptura i sense permanència a 0 \ No newline at end of file +TerreNumRefModelDesc1=Retorna el nombre sota el format %syymm-nnnn per a les factures i %syymm-nnnn per als abonaments on yy és l'any, mm. el mes i nnnn un comptador seqüencial sense ruptura i sense permanència a 0 diff --git a/htdocs/langs/ca_ES/js/jquery.ui.datepicker.js b/htdocs/langs/ca_ES/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..23c5c8c8151 --- /dev/null +++ b/htdocs/langs/ca_ES/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Inicialització en català per a l'extenció 'calendar' per jQuery. */ +/* Writers: (joan.leon@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['ca'] = { + closeText: 'Tancar', + prevText: '<Ant', + nextText: 'Seg>', + currentText: 'Avui', + monthNames: ['Gener','Febrer','Març','Abril','Maig','Juny', + 'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'], + monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun', + 'Jul','Ago','Set','Oct','Nov','Des'], + dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'], + dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'], + dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'], + weekHeader: 'Sm', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['ca']); +}); \ No newline at end of file diff --git a/htdocs/langs/ca_ES/main.lang b/htdocs/langs/ca_ES/main.lang index a7b91bf1f81..65e2182be34 100644 --- a/htdocs/langs/ca_ES/main.lang +++ b/htdocs/langs/ca_ES/main.lang @@ -296,6 +296,8 @@ IncludedVAT=IVA inclòs HT=Sense IVA TTC=IVA inclòs VAT=IVA +LT1ES=RE +LT2ES=IRPF VATRate=Taxa IVA Average=Mitja Sum=Suma @@ -598,6 +600,7 @@ NewAttribute=Nou atribut AttributeCode=Codi atribut OptionalFieldsSetup=Configuració dels atributs opcionals CreateDraft=Crea esborrany +ClickToEdit=Clic per a editar # Week day Monday=Dilluns diff --git a/htdocs/langs/da_DK/js/jquery.ui.datepicker.js b/htdocs/langs/da_DK/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..fb2d3356d78 --- /dev/null +++ b/htdocs/langs/da_DK/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Danish initialisation for the jQuery UI date picker plugin. */ +/* Written by Jan Christensen ( deletestuff@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['da'] = { + closeText: 'Luk', + prevText: '<Forrige', + nextText: 'Næste>', + currentText: 'Idag', + monthNames: ['Januar','Februar','Marts','April','Maj','Juni', + 'Juli','August','September','Oktober','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Aug','Sep','Okt','Nov','Dec'], + dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], + dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], + dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], + weekHeader: 'Uge', + dateFormat: 'dd-mm-yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['da']); +}); diff --git a/htdocs/langs/de_DE/js/jquery.ui.datepicker.js b/htdocs/langs/de_DE/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..52d6c82ce97 --- /dev/null +++ b/htdocs/langs/de_DE/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* German initialisation for the jQuery UI date picker plugin. */ +/* Written by Milian Wolff (mail@milianw.de). */ +jQuery(function($){ + $.datepicker.regional['de'] = { + closeText: 'schließen', + prevText: '<zurück', + nextText: 'Vor>', + currentText: 'heute', + monthNames: ['Januar','Februar','März','April','Mai','Juni', + 'Juli','August','September','Oktober','November','Dezember'], + monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', + 'Jul','Aug','Sep','Okt','Nov','Dez'], + dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], + dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], + dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], + weekHeader: 'Wo', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['de']); +}); diff --git a/htdocs/langs/el_GR/js/jquery.ui.datepicker.js b/htdocs/langs/el_GR/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..6d775f995f9 --- /dev/null +++ b/htdocs/langs/el_GR/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Greek (el) initialisation for the jQuery UI date picker plugin. */ +/* Written by Alex Cicovic (http://www.alexcicovic.com) */ +jQuery(function($){ + $.datepicker.regional['el'] = { + closeText: 'Κλείσιμο', + prevText: 'Προηγούμενος', + nextText: 'Επόμενος', + currentText: 'Τρέχων Μήνας', + monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος', + 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'], + monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν', + 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'], + dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'], + dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'], + dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'], + weekHeader: 'Εβδ', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['el']); +}); \ No newline at end of file diff --git a/htdocs/langs/en_AU/.cvsignore b/htdocs/langs/en_AU/.cvsignore deleted file mode 100644 index 1fd02e68d65..00000000000 --- a/htdocs/langs/en_AU/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/en_AU/js/jquery.ui.datepicker.js b/htdocs/langs/en_AU/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..c1a1020a140 --- /dev/null +++ b/htdocs/langs/en_AU/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* English/Australia initialisation for the jQuery UI date picker plugin. */ +/* Based on the en-GB initialisation. */ +jQuery(function($){ + $.datepicker.regional['en-AU'] = { + closeText: 'Done', + prevText: 'Prev', + nextText: 'Next', + currentText: 'Today', + monthNames: ['January','February','March','April','May','June', + 'July','August','September','October','November','December'], + monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], + weekHeader: 'Wk', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['en-AU']); +}); diff --git a/htdocs/langs/en_GB/js/jquery.ui.datepicker.js b/htdocs/langs/en_GB/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..16a096e758a --- /dev/null +++ b/htdocs/langs/en_GB/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* English/UK initialisation for the jQuery UI date picker plugin. */ +/* Written by Stuart. */ +jQuery(function($){ + $.datepicker.regional['en-GB'] = { + closeText: 'Done', + prevText: 'Prev', + nextText: 'Next', + currentText: 'Today', + monthNames: ['January','February','March','April','May','June', + 'July','August','September','October','November','December'], + monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], + weekHeader: 'Wk', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['en-GB']); +}); diff --git a/htdocs/langs/en_IN/.cvsignore b/htdocs/langs/en_IN/.cvsignore deleted file mode 100755 index 1fd02e68d65..00000000000 --- a/htdocs/langs/en_IN/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/en_NZ/.cvsignore b/htdocs/langs/en_NZ/.cvsignore deleted file mode 100755 index 1fd02e68d65..00000000000 --- a/htdocs/langs/en_NZ/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/en_NZ/js/jquery.ui.datepicker.js b/htdocs/langs/en_NZ/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..7819df05286 --- /dev/null +++ b/htdocs/langs/en_NZ/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* English/New Zealand initialisation for the jQuery UI date picker plugin. */ +/* Based on the en-GB initialisation. */ +jQuery(function($){ + $.datepicker.regional['en-NZ'] = { + closeText: 'Done', + prevText: 'Prev', + nextText: 'Next', + currentText: 'Today', + monthNames: ['January','February','March','April','May','June', + 'July','August','September','October','November','December'], + monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], + weekHeader: 'Wk', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['en-NZ']); +}); diff --git a/htdocs/langs/en_US/.cvsignore b/htdocs/langs/en_US/.cvsignore deleted file mode 100644 index 1fd02e68d65..00000000000 --- a/htdocs/langs/en_US/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 0e720a94b5d..6fb68b6bd24 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -37,7 +37,11 @@ VATToPay=VAT sells VATReceived=VAT received VATToCollect=VAT purchases VATSummary=VAT Balance +LT2SummaryES=IRPF Balance VATPaid=VAT paid +LT2PaidES=IRPF Paid +LT2CustomerES=IRPF sales +LT2SupplierES=IRPF purchases VATCollected=VAT collected ToPay=To pay ToGet=To get back @@ -63,6 +67,9 @@ ListOfCustomerPayments=List of customer payments ListOfSupplierPayments=List of supplier payments DatePayment=Payment date NewVATPayment=New VAT payment +newLT2PaymentES=New IRPF payment +LT2PaymentES=IRPF Payment +LT2PaymentsES=IRPF Payments VATPayment=VAT Payment VATPayments=VAT Payments SocialContributionsPayments=Social contributions payments @@ -104,6 +111,7 @@ RulesResultDue=- Amounts shown are with all taxes included
- It includes outs RulesResultInOut=- Amounts shown are with all taxes included
- It includes the real payments made on invoices, expenses and VAT.
- It is based on the payment dates of the invoices, expenses anf VAT.
RulesCADue=- It includes the client's due invoices (except deposit invoices) whether they are paid or not.
- It is based on the validation date of these invoices.
RulesCAIn=- It includes all the effective payments of invoices received from clients.
- It is based on the payment date of these invoices
+LT2ReportByCustomersInInputOutputModeES=Report by third party IRPF VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid (VAT receipt) VATReportByCustomersInDueDebtMode=Report by the customer VAT collected and paid (VAT rate) VATReportByQuartersInInputOutputMode=Report by rate of the VAT collected and paid (VAT receipt) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 10bd9adc5ce..4ae7c7e8fad 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -298,6 +298,8 @@ IncludedVAT=Included tax HT=Net of tax TTC=Inc. tax VAT=Sales tax +LT1ES=RE +LT2ES=IRPF VATRate=Tax Rate Average=Average Sum=Sum @@ -601,6 +603,7 @@ AttributeCode=Attribute code OptionalFieldsSetup=Extra attributes setup URLPhoto=Url of photo/logo CreateDraft=Create draft +ClickToEdit=Click to edit # Week day Monday=Monday diff --git a/htdocs/langs/es_ES/.cvsignore b/htdocs/langs/es_ES/.cvsignore deleted file mode 100644 index 1fd02e68d65..00000000000 --- a/htdocs/langs/es_ES/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/es_ES/bills.lang b/htdocs/langs/es_ES/bills.lang index fe11cf0fac8..7bcc3cb432c 100644 --- a/htdocs/langs/es_ES/bills.lang +++ b/htdocs/langs/es_ES/bills.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - es_ES - bills +# Dolibarr language file - es_ES - bills CHARSET=UTF-8 Bill=Factura Bills=Facturas @@ -234,7 +234,10 @@ GlobalDiscount=Descuento fijo CreditNote=Abono CreditNotes=Abonos AddDiscount=Crear descuento fijo +AddRelativeDiscount=Crear descuento relativo +EditRelativeDiscount=Editar descuento relativo AddGlobalDiscount=Crear descuento fijo +EditGlobalDiscounts=Editar descuento fijo AddCreditNote=Crear factura de abono Deposit=Anticipo Deposits=Anticipos @@ -277,7 +280,7 @@ TotalOfTwoDiscountMustEqualsOriginal=La suma del importe de los 2 nuevos descuen ConfirmRemoveDiscount=¿Está seguro de querer eliminar este descuento? RelatedBill=Factura asociada RelatedBills=Facturas asociadas -# PaymentConditions= +# PaymentConditions PaymentConditionShortRECEP=A la recepción PaymentConditionRECEP=A la recepción de la factura PaymentConditionShort30D=30 días @@ -288,7 +291,7 @@ PaymentConditionShort60D=60 días PaymentCondition60D=Pago a los 60 días PaymentConditionShort60DENDMONTH=60 días a fin de mes PaymentCondition60DENDMONTH=Pago a los 60 días a fin de mes -# PaymentType= +# PaymentType PaymentTypeVIR=Transferencia bancaria PaymentTypeShortVIR=Transferencia PaymentTypePRE=Domiciliación bancaria @@ -379,4 +382,4 @@ PDFCrabeDescription=Modelo de factura completo (modelo recomendado por defecto) # oursin PDF Model PDFOursinDescription=Modelo de factura completo (modelo alternativo) # NumRef Modules -TerreNumRefModelDesc1=Devuelve el número bajo el formato %syymm-nnnn para las facturas y %syymm-nnnn para los abonos donde yy es el año, mm. el mes y nnnn un contador secuencial sin ruptura y sin permanencia a 0 \ No newline at end of file +TerreNumRefModelDesc1=Devuelve el número bajo el formato %syymm-nnnn para las facturas y %syymm-nnnn para los abonos donde yy es el año, mm. el mes y nnnn un contador secuencial sin ruptura y sin permanencia a 0 diff --git a/htdocs/langs/es_ES/compta.lang b/htdocs/langs/es_ES/compta.lang index 8d7575fb961..64c104a878a 100644 --- a/htdocs/langs/es_ES/compta.lang +++ b/htdocs/langs/es_ES/compta.lang @@ -37,7 +37,11 @@ VATToPay=IVA ventas VATReceived=IVA repercutido VATToCollect=IVA compras VATSummary=Balance de IVA +LT2SummaryES=Balance de IRPF VATPaid=IVA Pagado +LT2PaidES=IRPF Pagado +LT2CustomerES=IRPF ventas +LT2SupplierES=IRPF compras VATCollected=IVA recuperado ToPay=A pagar ToGetBack=A recuperar @@ -63,6 +67,9 @@ ListOfCustomerPayments=Listado de pagos de clientes ListOfSupplierPayments=Listado de pagos a proveedores DatePayment=Fecha de pago NewVATPayment=Nuevo pago de IVA +newLT2PaymentES=Nuevo pago de IRPF +LT2PaymentES=Pago IRPF +LT2PaymentsES=Pagos IRPF VATPayment=Pago IVA VATPayments=Pagos IVA SocialContributionsPayments=Pagos cargas sociales @@ -104,6 +111,7 @@ RulesResultDue=- Los importes mostrados son importes totales
- Incluye las fa RulesResultInOut=- Los importes mostrados son importes totales
- Incluye los pagos realizados para las facturas, cargas e IVA.
- Se basa en la fecha de pago de las mismas.
RulesCADue=- Incluye las facturas a clientes (que no sean de anticipo), estén pagadas o no.
- Se base en la fecha de validación de las mismas.
RulesCAIn=- Incluye los pagos efectuados de las facturas a clientes.
- Se basa en la fecha de pago de las mismas
+LT2ReportByCustomersInInputOutputModeES=Informe por tercero del IRPF VATReportByCustomersInInputOutputMode=Informe por cliente del IVA repercutido y pagado (IVA pagado) VATReportByCustomersInDueDebtMode=Informe por cliente del IVA repercutido y pagado (IVA debido) VATReportByQuartersInInputOutputMode=Informe por tasa del IVA repercutido y pagado (IVA pagado) diff --git a/htdocs/langs/es_ES/js/jquery.ui.datepicker.js b/htdocs/langs/es_ES/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..5f90cb50640 --- /dev/null +++ b/htdocs/langs/es_ES/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Inicialización en español para la extensión 'UI date picker' para jQuery. */ +/* Traducido por Vester (xvester@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['es'] = { + closeText: 'Cerrar', + prevText: '<Ant', + nextText: 'Sig>', + currentText: 'Hoy', + monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', + 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'], + monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun', + 'Jul','Ago','Sep','Oct','Nov','Dic'], + dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'], + dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], + dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], + weekHeader: 'Sm', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['es']); +}); \ No newline at end of file diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index 362aa346f85..a9301630afa 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -296,6 +296,8 @@ IncludedVAT=IVA incluido HT=Sin IVA TTC=IVA incluido VAT=IVA +LT1ES=RE +LT2ES=IRPF VATRate=Tasa IVA Average=Media Sum=Suma @@ -598,6 +600,7 @@ NewAttribute=Nuevo atributo AttributeCode=Código atributo OptionalFieldsSetup=Configuración de los atributos opcionales CreateDraft=Crear borrador +ClickToEdit=Clic para editar # Week day Monday=Lunes diff --git a/htdocs/langs/es_PR/.cvsignore b/htdocs/langs/es_PR/.cvsignore deleted file mode 100755 index 1fd02e68d65..00000000000 --- a/htdocs/langs/es_PR/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/fa_IR/js/jquery.ui.datepicker.js b/htdocs/langs/fa_IR/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..1d7fbd23c74 --- /dev/null +++ b/htdocs/langs/fa_IR/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */ +/* Javad Mowlanezhad -- jmowla@gmail.com */ +/* Jalali calendar should supported soon! (Its implemented but I have to test it) */ +jQuery(function($) { + $.datepicker.regional['fa'] = { + closeText: 'بستن', + prevText: '<قبلي', + nextText: 'بعدي>', + currentText: 'امروز', + monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور', + 'مهر','آبان','آذر','دي','بهمن','اسفند'], + monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], + dayNames: ['يکشنبه','دوشنبه','سه‌شنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'], + dayNamesShort: ['ي','د','س','چ','پ','ج', 'ش'], + dayNamesMin: ['ي','د','س','چ','پ','ج', 'ش'], + weekHeader: 'هف', + dateFormat: 'yy/mm/dd', + firstDay: 6, + isRTL: true, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['fa']); +}); \ No newline at end of file diff --git a/htdocs/langs/fi_FI/js/jquery.ui.datepicker.js b/htdocs/langs/fi_FI/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..ece04e3b254 --- /dev/null +++ b/htdocs/langs/fi_FI/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Finnish initialisation for the jQuery UI date picker plugin. */ +/* Written by Harri Kilpi� (harrikilpio@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['fi'] = { + closeText: 'Sulje', + prevText: '«Edellinen', + nextText: 'Seuraava»', + currentText: 'Tänään', + monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu', + 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'], + monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä', + 'Heinä','Elo','Syys','Loka','Marras','Joulu'], + dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'], + dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'], + dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'], + weekHeader: 'Vk', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['fi']); +}); diff --git a/htdocs/langs/fr_BE/.cvsignore b/htdocs/langs/fr_BE/.cvsignore deleted file mode 100644 index 1fd02e68d65..00000000000 --- a/htdocs/langs/fr_BE/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/fr_CH/js/jquery.ui.datepicker.js b/htdocs/langs/fr_CH/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..fec03a042f2 --- /dev/null +++ b/htdocs/langs/fr_CH/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Swiss-French initialisation for the jQuery UI date picker plugin. */ +/* Written Martin Voelkle (martin.voelkle@e-tc.ch). */ +jQuery(function($){ + $.datepicker.regional['fr-CH'] = { + closeText: 'Fermer', + prevText: '<Préc', + nextText: 'Suiv>', + currentText: 'Courant', + monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', + 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], + monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun', + 'Jul','Aoû','Sep','Oct','Nov','Déc'], + dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], + dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'], + dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'], + weekHeader: 'Sm', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['fr-CH']); +}); \ No newline at end of file diff --git a/htdocs/langs/fr_FR/.cvsignore b/htdocs/langs/fr_FR/.cvsignore deleted file mode 100644 index 1fd02e68d65..00000000000 --- a/htdocs/langs/fr_FR/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index 1bd9a474680..f4d2a469fb7 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -37,8 +37,12 @@ VATToPay=TVA ventes VATReceived=TVA collectée VATToCollect=TVA achats VATSummary=Balance de TVA +LT2SummaryES=Balance de IRPF VATPaid=TVA payée +LT2PaidES=IRPF Payée VATCollected=TVA récupérée +LT2CustomerES=IRPF ventes +LT2SupplierES=IRPF achats ToPay=A payer ToGetBack=A récupérer TaxAndDividendsArea=Espace taxes, charges sociales et dividendes @@ -65,6 +69,9 @@ DatePayment=Date de règlement NewVATPayment=Nouveau règlement de TVA VATPayment=Règlement TVA VATPayments=Règlements TVA +LT2PaymentES=Règlement IRPF +LT2PaymentsES=Règlements IRPF +newLT2PaymentES=Nouveau règlement de IRPF SocialContributionsPayments=Règlements charges sociales ShowVatPayment=Affiche paiement TVA TotalToPay=Total à payer @@ -104,6 +111,7 @@ RulesResultDue=- Les montants affichés sont les montants taxe incluse
- Il i RulesResultInOut=- Les montants affichés sont les montants taxe incluse
- Il inclut les règlements effectivement réalisés pour les factures, les charges et la TVA.
- Il se base sur la date de règlement de ces factures, charges et TVA.
RulesCADue=- Il inclut les factures clients dues (hors facture accompte), qu'elles soient payées ou non.
- Il se base sur la date de validation de ces factures.
RulesCAIn=- Il inclut les règlements effectivement reçus des factures clients.
- Il se base sur la date de règlement de ces factures
+LT2ReportByCustomersInInputOutputModeES=Rapport par client des IRPF VATReportByCustomersInInputOutputMode=Rapport par client des TVA collectées et payées (TVA sur encaissement) VATReportByCustomersInDueDebtMode=Rapport par client des TVA collectées et payées (TVA sur débit) VATReportByQuartersInInputOutputMode=Rapport par taux des TVA collectées et payées (TVA sur encaissement) diff --git a/htdocs/langs/fr_FR/js/jquery.ui.datepicker.js b/htdocs/langs/fr_FR/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..7e793639f5f --- /dev/null +++ b/htdocs/langs/fr_FR/js/jquery.ui.datepicker.js @@ -0,0 +1,25 @@ +/* French initialisation for the jQuery UI date picker plugin. */ +/* Written by Keith Wood (kbwood{at}iinet.com.au), + Stéphane Nahmani (sholby@sholby.net), + Stéphane Raimbault */ +jQuery(function($){ + $.datepicker.regional['fr'] = { + closeText: 'Fermer', + prevText: 'Précédent', + nextText: 'Suivant', + currentText: 'Aujourd\'hui', + monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', + 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], + monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin', + 'Juil.','Août','Sept.','Oct.','Nov.','Déc.'], + dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], + dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'], + dayNamesMin: ['D','L','M','M','J','V','S'], + weekHeader: 'Sem.', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['fr']); +}); diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index ca02f0dbec0..d5a42c3a6e0 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -298,6 +298,8 @@ IncludedVAT=Dont TVA HT=HT TTC=TTC VAT=TVA +LT1ES=RE +LT2ES=IRPF VATRate=Taux TVA Average=Moyenne Sum=Somme @@ -601,6 +603,7 @@ AttributeCode=Code de l'attribut OptionalFieldsSetup=Configuration des attributs complémentaires URLPhoto=Url vers photo/logo CreateDraft=Créer brouillon +ClickToEdit=Cliquer ici pour éditer # Week day Monday=Lundi diff --git a/htdocs/langs/hu_HU/js/jquery.ui.datepicker.js b/htdocs/langs/hu_HU/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..b28c268c1c4 --- /dev/null +++ b/htdocs/langs/hu_HU/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Hungarian initialisation for the jQuery UI date picker plugin. */ +/* Written by Istvan Karaszi (jquery@spam.raszi.hu). */ +jQuery(function($){ + $.datepicker.regional['hu'] = { + closeText: 'bezár', + prevText: 'vissza', + nextText: 'előre', + currentText: 'ma', + monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', + 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'], + monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', + 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'], + dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'], + dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'], + dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'], + weekHeader: 'Hét', + dateFormat: 'yy.mm.dd.', + firstDay: 1, + isRTL: false, + showMonthAfterYear: true, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['hu']); +}); diff --git a/htdocs/langs/is_IS/js/jquery.ui.datepicker.js b/htdocs/langs/is_IS/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..b52959a0377 --- /dev/null +++ b/htdocs/langs/is_IS/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Icelandic initialisation for the jQuery UI date picker plugin. */ +/* Written by Haukur H. Thorsson (haukur@eskill.is). */ +jQuery(function($){ + $.datepicker.regional['is'] = { + closeText: 'Loka', + prevText: '< Fyrri', + nextText: 'Næsti >', + currentText: 'Í dag', + monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní', + 'Júlí','Ágúst','September','Október','Nóvember','Desember'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún', + 'Júl','Ágú','Sep','Okt','Nóv','Des'], + dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'], + dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'], + dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'], + weekHeader: 'Vika', + dateFormat: 'dd/mm/yy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['is']); +}); \ No newline at end of file diff --git a/htdocs/langs/it_IT/.cvsignore b/htdocs/langs/it_IT/.cvsignore deleted file mode 100644 index 1fd02e68d65..00000000000 --- a/htdocs/langs/it_IT/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/it_IT/js/jquery.ui.datepicker.js b/htdocs/langs/it_IT/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..ebca1663798 --- /dev/null +++ b/htdocs/langs/it_IT/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Italian initialisation for the jQuery UI date picker plugin. */ +/* Written by Antonello Pasella (antonello.pasella@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['it'] = { + closeText: 'Chiudi', + prevText: '<Prec', + nextText: 'Succ>', + currentText: 'Oggi', + monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno', + 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'], + monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu', + 'Lug','Ago','Set','Ott','Nov','Dic'], + dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'], + dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'], + dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'], + weekHeader: 'Sm', + dateFormat: 'dd/mm/yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['it']); +}); diff --git a/htdocs/langs/ja_JP/js/jquery.ui.datepicker.js b/htdocs/langs/ja_JP/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..afd2983157d --- /dev/null +++ b/htdocs/langs/ja_JP/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Japanese initialisation for the jQuery UI date picker plugin. */ +/* Written by Kentaro SATO (kentaro@ranvis.com). */ +jQuery(function($){ + $.datepicker.regional['ja'] = { + closeText: '閉じる', + prevText: '<前', + nextText: '次>', + currentText: '今日', + monthNames: ['1月','2月','3月','4月','5月','6月', + '7月','8月','9月','10月','11月','12月'], + monthNamesShort: ['1月','2月','3月','4月','5月','6月', + '7月','8月','9月','10月','11月','12月'], + dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'], + dayNamesShort: ['日','月','火','水','木','金','土'], + dayNamesMin: ['日','月','火','水','木','金','土'], + weekHeader: '週', + dateFormat: 'yy/mm/dd', + firstDay: 0, + isRTL: false, + showMonthAfterYear: true, + yearSuffix: '年'}; + $.datepicker.setDefaults($.datepicker.regional['ja']); +}); \ No newline at end of file diff --git a/htdocs/langs/nb_NO/js/jquery.ui.datepicker.js b/htdocs/langs/nb_NO/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..9590592f8e8 --- /dev/null +++ b/htdocs/langs/nb_NO/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Norwegian initialisation for the jQuery UI date picker plugin. */ +/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */ + +jQuery(function($){ + $.datepicker.regional['no'] = { + closeText: 'Lukk', + prevText: '«Forrige', + nextText: 'Neste»', + currentText: 'I dag', + monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'], + monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'], + dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'], + dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'], + dayNamesMin: ['sø','ma','ti','on','to','fr','lø'], + weekHeader: 'Uke', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: '' + }; + $.datepicker.setDefaults($.datepicker.regional['no']); +}); diff --git a/htdocs/langs/nl_BE/.cvsignore b/htdocs/langs/nl_BE/.cvsignore deleted file mode 100644 index 1fd02e68d65..00000000000 --- a/htdocs/langs/nl_BE/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/nl_NL/js/jquery.ui.datepicker.js b/htdocs/langs/nl_NL/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..781fe619176 --- /dev/null +++ b/htdocs/langs/nl_NL/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Mathias Bynens */ +jQuery(function($){ + $.datepicker.regional.nl = { + closeText: 'Sluiten', + prevText: '←', + nextText: '→', + currentText: 'Vandaag', + monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', + 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], + monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', + 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], + dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], + dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'], + dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + weekHeader: 'Wk', + dateFormat: 'dd-mm-yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional.nl); +}); \ No newline at end of file diff --git a/htdocs/langs/pl_PL/.cvsignore b/htdocs/langs/pl_PL/.cvsignore deleted file mode 100644 index 1fd02e68d65..00000000000 --- a/htdocs/langs/pl_PL/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/pl_PL/js/jquery.ui.datepicker.js b/htdocs/langs/pl_PL/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..0ffc515b95b --- /dev/null +++ b/htdocs/langs/pl_PL/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Polish initialisation for the jQuery UI date picker plugin. */ +/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['pl'] = { + closeText: 'Zamknij', + prevText: '<Poprzedni', + nextText: 'Następny>', + currentText: 'Dziś', + monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec', + 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'], + monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze', + 'Lip','Sie','Wrz','Pa','Lis','Gru'], + dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'], + dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'], + dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'], + weekHeader: 'Tydz', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['pl']); +}); diff --git a/htdocs/langs/pt_BR/js/jquery.ui.datepicker.js b/htdocs/langs/pt_BR/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..b2d61f62e76 --- /dev/null +++ b/htdocs/langs/pt_BR/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Brazilian initialisation for the jQuery UI date picker plugin. */ +/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['pt-BR'] = { + closeText: 'Fechar', + prevText: '<Anterior', + nextText: 'Próximo>', + currentText: 'Hoje', + monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', + 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], + monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', + 'Jul','Ago','Set','Out','Nov','Dez'], + dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'], + dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], + dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], + weekHeader: 'Sm', + dateFormat: 'dd/mm/yy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['pt-BR']); +}); \ No newline at end of file diff --git a/htdocs/langs/pt_PT/.cvsignore b/htdocs/langs/pt_PT/.cvsignore deleted file mode 100644 index 1fd02e68d65..00000000000 --- a/htdocs/langs/pt_PT/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -google.lang diff --git a/htdocs/langs/pt_PT/js/jquery.ui.datepicker.js b/htdocs/langs/pt_PT/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..9ec5a6228cb --- /dev/null +++ b/htdocs/langs/pt_PT/js/jquery.ui.datepicker.js @@ -0,0 +1,22 @@ +/* Portuguese initialisation for the jQuery UI date picker plugin. */ +jQuery(function($){ + $.datepicker.regional['pt'] = { + closeText: 'Fechar', + prevText: '<Anterior', + nextText: 'Seguinte', + currentText: 'Hoje', + monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', + 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], + monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', + 'Jul','Ago','Set','Out','Nov','Dez'], + dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'], + dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], + dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], + weekHeader: 'Sem', + dateFormat: 'dd/mm/yy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['pt']); +}); \ No newline at end of file diff --git a/htdocs/langs/ro_RO/js/jquery.ui.datepicker.js b/htdocs/langs/ro_RO/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..a988270d750 --- /dev/null +++ b/htdocs/langs/ro_RO/js/jquery.ui.datepicker.js @@ -0,0 +1,26 @@ +/* Romanian initialisation for the jQuery UI date picker plugin. + * + * Written by Edmond L. (ll_edmond@walla.com) + * and Ionut G. Stan (ionut.g.stan@gmail.com) + */ +jQuery(function($){ + $.datepicker.regional['ro'] = { + closeText: 'Închide', + prevText: '« Luna precedentă', + nextText: 'Luna următoare »', + currentText: 'Azi', + monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie', + 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'], + monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun', + 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'], + dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'], + dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'], + weekHeader: 'Săpt', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['ro']); +}); diff --git a/htdocs/langs/ru_RU/js/jquery.ui.datepicker.js b/htdocs/langs/ru_RU/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..2017e053787 --- /dev/null +++ b/htdocs/langs/ru_RU/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Andrew Stromnov (stromnov@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['ru'] = { + closeText: 'Закрыть', + prevText: '<Пред', + nextText: 'След>', + currentText: 'Сегодня', + monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь', + 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'], + monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн', + 'Июл','Авг','Сен','Окт','Ноя','Дек'], + dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'], + dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'], + dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], + weekHeader: 'Нед', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['ru']); +}); \ No newline at end of file diff --git a/htdocs/langs/sl_SI/js/jquery.ui.datepicker.js b/htdocs/langs/sl_SI/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..e3d7f6d74d1 --- /dev/null +++ b/htdocs/langs/sl_SI/js/jquery.ui.datepicker.js @@ -0,0 +1,24 @@ +/* Slovenian initialisation for the jQuery UI date picker plugin. */ +/* Written by Jaka Jancar (jaka@kubje.org). */ +/* c = č, s = š z = ž C = Č S = Š Z = Ž */ +jQuery(function($){ + $.datepicker.regional['sl'] = { + closeText: 'Zapri', + prevText: '<Prejšnji', + nextText: 'Naslednji>', + currentText: 'Trenutni', + monthNames: ['Januar','Februar','Marec','April','Maj','Junij', + 'Julij','Avgust','September','Oktober','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Avg','Sep','Okt','Nov','Dec'], + dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'], + dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'], + dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'], + weekHeader: 'Teden', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['sl']); +}); diff --git a/htdocs/langs/sv_SE/js/jquery.ui.datepicker.js b/htdocs/langs/sv_SE/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..173689b2a96 --- /dev/null +++ b/htdocs/langs/sv_SE/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Swedish initialisation for the jQuery UI date picker plugin. */ +/* Written by Anders Ekdahl ( anders@nomadiz.se). */ +jQuery(function($){ + $.datepicker.regional['sv'] = { + closeText: 'Stäng', + prevText: '«Förra', + nextText: 'Nästa»', + currentText: 'Idag', + monthNames: ['Januari','Februari','Mars','April','Maj','Juni', + 'Juli','Augusti','September','Oktober','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Aug','Sep','Okt','Nov','Dec'], + dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'], + dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'], + dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'], + weekHeader: 'Ve', + dateFormat: 'yy-mm-dd', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['sv']); +}); diff --git a/htdocs/langs/tr_TR/js/jquery.ui.datepicker.js b/htdocs/langs/tr_TR/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..1b5cafc3954 --- /dev/null +++ b/htdocs/langs/tr_TR/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Turkish initialisation for the jQuery UI date picker plugin. */ +/* Written by Izzet Emre Erkan (kara@karalamalar.net). */ +jQuery(function($){ + $.datepicker.regional['tr'] = { + closeText: 'kapat', + prevText: '<geri', + nextText: 'ileri>', + currentText: 'bugün', + monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran', + 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'], + monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz', + 'Tem','Ağu','Eyl','Eki','Kas','Ara'], + dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'], + dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], + dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], + weekHeader: 'Hf', + dateFormat: 'dd.mm.yy', + firstDay: 1, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + $.datepicker.setDefaults($.datepicker.regional['tr']); +}); \ No newline at end of file diff --git a/htdocs/langs/zh_CN/js/jquery.ui.datepicker.js b/htdocs/langs/zh_CN/js/jquery.ui.datepicker.js new file mode 100644 index 00000000000..fed386f5458 --- /dev/null +++ b/htdocs/langs/zh_CN/js/jquery.ui.datepicker.js @@ -0,0 +1,23 @@ +/* Chinese initialisation for the jQuery UI date picker plugin. */ +/* Written by Cloudream (cloudream@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['zh-CN'] = { + closeText: '关闭', + prevText: '<上月', + nextText: '下月>', + currentText: '今天', + monthNames: ['一月','二月','三月','四月','五月','六月', + '七月','八月','九月','十月','十一月','十二月'], + monthNamesShort: ['一','二','三','四','五','六', + '七','八','九','十','十一','十二'], + dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], + dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], + dayNamesMin: ['日','一','二','三','四','五','六'], + weekHeader: '周', + dateFormat: 'yy-mm-dd', + firstDay: 1, + isRTL: false, + showMonthAfterYear: true, + yearSuffix: '年'}; + $.datepicker.setDefaults($.datepicker.regional['zh-CN']); +}); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index cd81033134d..e316daa44a7 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -922,9 +922,27 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; } // jQuery jnotify - if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY)) print ''."\n"; + if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY)) + { + print ''."\n"; + print ''."\n"; + } // jQuery jeditable - if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) print ''."\n"; + if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) + { + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + } // Flot if (empty($conf->global->MAIN_DISABLE_JQUERY_FLOT)) { @@ -979,7 +997,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs } } - // Define tradMonths javascript array (we define this in datapicker AND in parent page to avoid errors with IE8) + // Define tradMonths javascript array (we define this in datepicker AND in parent page to avoid errors with IE8) print ''."\n"; + + // Add datepicker default options + print ''."\n"; + // Add datepicker i18n for current language + print ''."\n"; if (! empty($head)) print $head."\n"; if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER."\n"; diff --git a/htdocs/paypal/img/.cvsignore b/htdocs/paypal/img/.cvsignore deleted file mode 100644 index 085e8baf0c8..00000000000 --- a/htdocs/paypal/img/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Thumbs.db diff --git a/htdocs/public/donations/.cvsignore b/htdocs/public/donations/.cvsignore deleted file mode 100644 index d162d9e3319..00000000000 --- a/htdocs/public/donations/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -don.php -merci.php -valid.php -erreur.php -navigation.fr.xsl -fsfe-fr.xsl -eucd.css -donateurs.php -graph.php diff --git a/htdocs/support/.cvsignore b/htdocs/support/.cvsignore deleted file mode 100644 index 085e8baf0c8..00000000000 --- a/htdocs/support/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Thumbs.db diff --git a/htdocs/theme/.cvsignore b/htdocs/theme/.cvsignore deleted file mode 100644 index 2a5b5c641fc..00000000000 --- a/htdocs/theme/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -*.db -clear -bureau2crea?-?ancien diff --git a/htdocs/theme/auguria/.cvsignore b/htdocs/theme/auguria/.cvsignore deleted file mode 100644 index a92ea3e3f61..00000000000 --- a/htdocs/theme/auguria/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.db diff --git a/htdocs/theme/auguria/fckeditor/.cvsignore b/htdocs/theme/auguria/fckeditor/.cvsignore deleted file mode 100644 index 085e8baf0c8..00000000000 --- a/htdocs/theme/auguria/fckeditor/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Thumbs.db diff --git a/htdocs/theme/auguria/fckeditor/images/.cvsignore b/htdocs/theme/auguria/fckeditor/images/.cvsignore deleted file mode 100644 index 78d24c23930..00000000000 --- a/htdocs/theme/auguria/fckeditor/images/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.db -*.db diff --git a/htdocs/theme/auguria/img/.cvsignore b/htdocs/theme/auguria/img/.cvsignore deleted file mode 100644 index 98e6ef67fad..00000000000 --- a/htdocs/theme/auguria/img/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.db diff --git a/htdocs/theme/auguria/img/menus/.cvsignore b/htdocs/theme/auguria/img/menus/.cvsignore deleted file mode 100644 index fe283d71a09..00000000000 --- a/htdocs/theme/auguria/img/menus/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -tango-icon-theme* diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index a3e2b3c5d84..ad569b86238 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -1663,11 +1663,16 @@ table.cal_event td { border: 0px; padding-: 0px; padding-) right center no-repeat; cursor: pointer; } +.edit_datepicker:hover { + background: white url() right center no-repeat; + cursor: pointer; +} + /* ============================================================================== */ /* Admin Menu */ diff --git a/htdocs/theme/bureau2crea/.cvsignore b/htdocs/theme/bureau2crea/.cvsignore deleted file mode 100644 index 77883ba2a3e..00000000000 --- a/htdocs/theme/bureau2crea/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.db -style.css?-?Copie.php diff --git a/htdocs/theme/bureau2crea/fckeditor/.cvsignore b/htdocs/theme/bureau2crea/fckeditor/.cvsignore deleted file mode 100644 index 085e8baf0c8..00000000000 --- a/htdocs/theme/bureau2crea/fckeditor/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Thumbs.db diff --git a/htdocs/theme/bureau2crea/fckeditor/images/.cvsignore b/htdocs/theme/bureau2crea/fckeditor/images/.cvsignore deleted file mode 100644 index 78d24c23930..00000000000 --- a/htdocs/theme/bureau2crea/fckeditor/images/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.db -*.db diff --git a/htdocs/theme/bureau2crea/img/.cvsignore b/htdocs/theme/bureau2crea/img/.cvsignore deleted file mode 100644 index 98e6ef67fad..00000000000 --- a/htdocs/theme/bureau2crea/img/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.db diff --git a/htdocs/theme/bureau2crea/img/menus/.cvsignore b/htdocs/theme/bureau2crea/img/menus/.cvsignore deleted file mode 100644 index fe283d71a09..00000000000 --- a/htdocs/theme/bureau2crea/img/menus/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -tango-icon-theme* diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index e2f23269f12..6861d3af98e 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -1863,11 +1863,16 @@ table.cal_event td { border: 0px; padding-: 0px; padding-) right center no-repeat; cursor: pointer; } +.edit_datepicker:hover { + background: white url() right center no-repeat; + cursor: pointer; +} + /* ============================================================================== */ /* Admin Menu */ diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 4162be90a4f..4ffeeb8f2bf 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -1813,11 +1813,16 @@ table.cal_event td { border: 0px; padding-: 0px; padding-) right center no-repeat; cursor: pointer; } +.edit_datepicker:hover { + background: white url() right center no-repeat; + cursor: pointer; +} + /* ============================================================================== */ /* Admin Menu */ diff --git a/htdocs/theme/common/.cvsignore b/htdocs/theme/common/.cvsignore deleted file mode 100644 index a92ea3e3f61..00000000000 --- a/htdocs/theme/common/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.db diff --git a/htdocs/theme/common/flags/.cvsignore b/htdocs/theme/common/flags/.cvsignore deleted file mode 100644 index 085e8baf0c8..00000000000 --- a/htdocs/theme/common/flags/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Thumbs.db diff --git a/htdocs/theme/common/mime/.cvsignore b/htdocs/theme/common/mime/.cvsignore deleted file mode 100644 index a92ea3e3f61..00000000000 --- a/htdocs/theme/common/mime/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.db diff --git a/htdocs/theme/common/treemenu/.cvsignore b/htdocs/theme/common/treemenu/.cvsignore deleted file mode 100644 index 020f3864407..00000000000 --- a/htdocs/theme/common/treemenu/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.db -*.db diff --git a/htdocs/theme/eldy/.cvsignore b/htdocs/theme/eldy/.cvsignore deleted file mode 100644 index 98e6ef67fad..00000000000 --- a/htdocs/theme/eldy/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.db diff --git a/htdocs/theme/eldy/fckeditor/.cvsignore b/htdocs/theme/eldy/fckeditor/.cvsignore deleted file mode 100644 index 085e8baf0c8..00000000000 --- a/htdocs/theme/eldy/fckeditor/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Thumbs.db diff --git a/htdocs/theme/eldy/fckeditor/images/.cvsignore b/htdocs/theme/eldy/fckeditor/images/.cvsignore deleted file mode 100644 index 020f3864407..00000000000 --- a/htdocs/theme/eldy/fckeditor/images/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.db -*.db diff --git a/htdocs/theme/eldy/img/.cvsignore b/htdocs/theme/eldy/img/.cvsignore deleted file mode 100644 index a92ea3e3f61..00000000000 --- a/htdocs/theme/eldy/img/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.db diff --git a/htdocs/theme/eldy/img/menus/.cvsignore b/htdocs/theme/eldy/img/menus/.cvsignore deleted file mode 100644 index fe283d71a09..00000000000 --- a/htdocs/theme/eldy/img/menus/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -tango-icon-theme* diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 1458c5992b0..acdd43d25a6 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1724,11 +1724,16 @@ table.cal_event td { border: 0px; padding-: 0px; padding-) right top no-repeat; cursor: pointer; } +.edit_datepicker:hover { + background: white url() right center no-repeat; + cursor: pointer; +} + /* ============================================================================== */ /* Admin Menu */ diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index c3fc65c1d08..d77f9668aca 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -55,28 +55,28 @@ if(! empty($conf->multicompany->enabled) && $conf->entity > 1 && $conf->global-> accessforbidden(); } +$id = GETPOST("id"); +$action = GETPOST("action"); +$group = GETPOST("group","int",3); +$confirm = GETPOST("confirm"); // Define value to know what current user can do on properties of edited user -if ($_GET["id"]) +if ($id) { // $user est le user qui edite, $_GET["id"] est l'id de l'utilisateur edite - $caneditfield=( (($user->id == $_GET["id"]) && $user->rights->user->self->creer) - || (($user->id != $_GET["id"]) && $user->rights->user->user->creer) ); - $caneditpassword=( (($user->id == $_GET["id"]) && $user->rights->user->self->password) - || (($user->id != $_GET["id"]) && $user->rights->user->user->password) ); + $caneditfield=( (($user->id == $id) && $user->rights->user->self->creer) + || (($user->id != $id) && $user->rights->user->user->creer) ); + $caneditpassword=( (($user->id == $id) && $user->rights->user->self->password) + || (($user->id != $id) && $user->rights->user->user->password) ); } -$action=GETPOST("action"); -$group=GETPOST("group","int",3); -$confirm=GETPOST("confirm"); - // Security check $socid=0; if ($user->societe_id > 0) $socid = $user->societe_id; $feature2='user'; -if ($user->id == $_GET["id"]) { $feature2=''; $canreaduser=1; } // A user can always read its own card -$result = restrictedArea($user, 'user', $_GET["id"], '', $feature2); -if ($user->id <> $_GET["id"] && ! $canreaduser) accessforbidden(); +if ($user->id == $id) { $feature2=''; $canreaduser=1; } // A user can always read its own card +$result = restrictedArea($user, 'user', $id, '', $feature2); +if ($user->id <> $id && ! $canreaduser) accessforbidden(); $langs->load("users"); $langs->load("companies"); @@ -91,36 +91,36 @@ $form = new Form($db); if ($_GET["subaction"] == 'addrights' && $canedituser) { $edituser = new User($db); - $edituser->fetch($_GET["id"]); + $edituser->fetch($id); $edituser->addrights($_GET["rights"]); } if ($_GET["subaction"] == 'delrights' && $canedituser) { $edituser = new User($db); - $edituser->fetch($_GET["id"]); + $edituser->fetch($id); $edituser->delrights($_GET["rights"]); } if ($action == 'confirm_disable' && $confirm == "yes" && $candisableuser) { - if ($_GET["id"] <> $user->id) + if ($id <> $user->id) { $edituser = new User($db); - $edituser->fetch($_GET["id"]); + $edituser->fetch($id); $edituser->setstatus(0); - Header("Location: ".DOL_URL_ROOT.'/user/fiche.php?id='.$_GET["id"]); + Header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } } if ($action == 'confirm_enable' && $confirm == "yes" && $candisableuser) { - if ($_GET["id"] <> $user->id) + if ($id <> $user->id) { $message=''; $edituser = new User($db); - $edituser->fetch($_GET["id"]); + $edituser->fetch($id); if (!empty($conf->file->main_limit_users)) { @@ -134,7 +134,7 @@ if ($action == 'confirm_enable' && $confirm == "yes" && $candisableuser) if (! $message) { $edituser->setstatus(1); - Header("Location: ".DOL_URL_ROOT.'/user/fiche.php?id='.$_GET["id"]); + Header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } } @@ -142,10 +142,10 @@ if ($action == 'confirm_enable' && $confirm == "yes" && $candisableuser) if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) { - if ($_GET["id"] <> $user->id) + if ($id <> $user->id) { $edituser = new User($db); - $edituser->id=$_GET["id"]; + $edituser->id=$id; $result = $edituser->delete(); if ($result < 0) { @@ -161,21 +161,23 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) } // Action ajout user -if ($_POST["action"] == 'add' && $canadduser) +if ($action == 'add' && $canadduser) { $message=""; - if (! $_POST["nom"]) { + if (! $_POST["nom"]) + { $message='
'.$langs->trans("NameNotDefined").'
'; $action="create"; // Go back to create page } - if (! $_POST["login"]) { + if (! $_POST["login"]) + { $message='
'.$langs->trans("LoginNotDefined").'
'; $action="create"; // Go back to create page } $edituser = new User($db); - if (!empty($conf->file->main_limit_users)) // If option to limit users is set + if (! empty($conf->file->main_limit_users)) // If option to limit users is set { $nb = $edituser->getNbOfUsers("active",1); if ($nb >= $conf->file->main_limit_users) @@ -203,14 +205,24 @@ if ($_POST["action"] == 'add' && $canadduser) $edituser->ldap_sid = $_POST["ldap_sid"]; // If multicompany is off, admin users must all be on entity 0. if($conf->multicompany->enabled) - if($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ! empty($_POST["superadmin"])) - $edituser->entity=0; - else - $edituser->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]); + { + if($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ! empty($_POST["superadmin"])) + { + $edituser->entity=0; + } + else + { + $edituser->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]); + } + } else if(! empty($_POST["admin"])) - $edituser->entity=0; + { + $edituser->entity=0; + } else - $edituser->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]); + { + $edituser->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]); + } $db->begin(); @@ -224,7 +236,7 @@ if ($_POST["action"] == 'add' && $canadduser) $db->commit(); - Header("Location: fiche.php?id=$id"); + Header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } else @@ -249,13 +261,13 @@ if (($action == 'addgroup' || $action == 'removegroup') && $caneditfield) $editgroup->oldcopy=dol_clone($editgroup); $edituser = new User($db); - $edituser->fetch($_GET["id"]); + $edituser->fetch($id); if ($action == 'addgroup') $edituser->SetInGroup($group,($conf->global->MULTICOMPANY_TRANSVERSE_MODE?GETPOST("entity"):$editgroup->entity)); if ($action == 'removegroup') $edituser->RemoveFromGroup($group,($conf->global->MULTICOMPANY_TRANSVERSE_MODE?GETPOST("entity"):$editgroup->entity)); if ($result > 0) { - header("Location: fiche.php?id=".$_GET["id"]); + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } else @@ -288,7 +300,7 @@ if ($action == 'update' && ! $_POST["cancel"]) { $db->begin(); $edituser = new User($db); - $edituser->fetch($_GET["id"]); + $edituser->fetch($id); $edituser->oldcopy=dol_clone($edituser); @@ -307,14 +319,24 @@ if ($action == 'update' && ! $_POST["cancel"]) $edituser->phenix_login = $_POST["phenix_login"]; $edituser->phenix_pass = $_POST["phenix_pass"]; if($conf->multicompany->enabled) - if($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ! empty($_POST["superadmin"])) - $edituser->entity=0; - else - $edituser->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]); + { + if($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ! empty($_POST["superadmin"])) + { + $edituser->entity=0; + } + else + { + $edituser->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]); + } + } else if(! empty($_POST["admin"])) - $edituser->entity=0; + { + $edituser->entity=0; + } else - $edituser->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]); + { + $edituser->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]); + } if (GETPOST('deletephoto')) $edituser->photo=''; if (! empty($_FILES['photo']['name'])) $edituser->photo = dol_sanitizeFileName($_FILES['photo']['name']); @@ -386,7 +408,7 @@ if ($action == 'update' && ! $_POST["cancel"]) else if ($caneditpassword) // Case we can edit only password { $edituser = new User($db); - $edituser->fetch($_GET["id"]); + $edituser->fetch($id); $ret=$edituser->setPassword($user,$_POST["password"]); if ($ret < 0) @@ -401,7 +423,7 @@ if ((($action == 'confirm_password' && $confirm == 'yes') || ($action == 'confirm_passwordsend' && $confirm == 'yes')) && $caneditpassword) { $edituser = new User($db); - $edituser->fetch($_GET["id"]); + $edituser->fetch($id); $newpassword=$edituser->setPassword($user,''); if ($newpassword < 0) @@ -433,7 +455,7 @@ if ((($action == 'confirm_password' && $confirm == 'yes') } // Action initialisation donnees depuis record LDAP -if ($_POST["action"] == 'adduserldap') +if ($action == 'adduserldap') { $selecteduser = $_POST['users']; @@ -455,7 +477,7 @@ if ($_POST["action"] == 'adduserldap') if ($result >= 0) { // Remove from required_fields all entries not configured in LDAP (empty) and duplicated - $required_fields=array_unique(array_values(array_filter($required_fields, "dolValidElement"))); + $required_fields=array_unique(array_values(array_filter($required_fields, "dol_validElement"))); $ldapusers = $ldap->getRecords($selecteduser, $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, $required_fields); //print_r($ldapusers); @@ -464,17 +486,17 @@ if ($_POST["action"] == 'adduserldap') { foreach ($ldapusers as $key => $attribute) { - $ldap_nom = $attribute[$conf->global->LDAP_FIELD_NAME]; - $ldap_prenom = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME]; - $ldap_login = $attribute[$conf->global->LDAP_FIELD_LOGIN]; - $ldap_loginsmb = $attribute[$conf->global->LDAP_FIELD_LOGIN_SAMBA]; - $ldap_pass = $attribute[$conf->global->LDAP_FIELD_PASSWORD]; - $ldap_pass_crypted = $attribute[$conf->global->LDAP_FIELD_PASSWORD_CRYPTED]; - $ldap_phone = $attribute[$conf->global->LDAP_FIELD_PHONE]; - $ldap_fax = $attribute[$conf->global->LDAP_FIELD_FAX]; - $ldap_mobile = $attribute[$conf->global->LDAP_FIELD_MOBILE]; - $ldap_mail = $attribute[$conf->global->LDAP_FIELD_MAIL]; - $ldap_sid = $attribute[$conf->global->LDAP_FIELD_SID]; + $ldap_nom = $attribute[$conf->global->LDAP_FIELD_NAME]; + $ldap_prenom = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME]; + $ldap_login = $attribute[$conf->global->LDAP_FIELD_LOGIN]; + $ldap_loginsmb = $attribute[$conf->global->LDAP_FIELD_LOGIN_SAMBA]; + $ldap_pass = $attribute[$conf->global->LDAP_FIELD_PASSWORD]; + $ldap_pass_crypted = $attribute[$conf->global->LDAP_FIELD_PASSWORD_CRYPTED]; + $ldap_phone = $attribute[$conf->global->LDAP_FIELD_PHONE]; + $ldap_fax = $attribute[$conf->global->LDAP_FIELD_FAX]; + $ldap_mobile = $attribute[$conf->global->LDAP_FIELD_MOBILE]; + $ldap_mail = $attribute[$conf->global->LDAP_FIELD_MAIL]; + $ldap_sid = $attribute[$conf->global->LDAP_FIELD_SID]; } } } @@ -527,7 +549,7 @@ if (($action == 'create') || ($action == 'adduserldap')) $conf->global->LDAP_FIELD_LOGIN_SAMBA); // Remove from required_fields all entries not configured in LDAP (empty) and duplicated - $required_fields=array_unique(array_values(array_filter($required_fields, "dolValidElement"))); + $required_fields=array_unique(array_values(array_filter($required_fields, "dol_validElement"))); // Get from LDAP database an array of results $ldapusers = $ldap->getRecords('*', $conf->global->LDAP_USER_DN, $conf->global->LDAP_KEY_USERS, $required_fields, 1); @@ -851,10 +873,10 @@ else /* */ /* ************************************************************************** */ - if ($_GET["id"]) + if ($id) { $fuser = new User($db); - $fuser->fetch($_GET["id"]); + $fuser->fetch($id); // Connexion ldap // pour recuperer passDoNotExpire et userChangePassNextLogon @@ -959,7 +981,7 @@ else /* * Fiche en mode visu */ - if ($_GET["action"] != 'edit') + if ($action != 'edit') { print ''; @@ -1236,13 +1258,13 @@ else // Si on a un gestionnaire de generation de mot de passe actif if ($conf->global->USER_PASSWORD_GENERATED != 'none') { - if (($user->id != $_GET["id"] && $caneditpassword) && $fuser->login && !$fuser->ldap_sid && + if (($user->id != $id && $caneditpassword) && $fuser->login && !$fuser->ldap_sid && (empty($conf->multicompany->enabled) || ($fuser->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { print ''.$langs->trans("ReinitPassword").''; } - if (($user->id != $_GET["id"] && $caneditpassword) && $fuser->login && !$fuser->ldap_sid && + if (($user->id != $id && $caneditpassword) && $fuser->login && !$fuser->ldap_sid && (empty($conf->multicompany->enabled) || ($fuser->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)) ) { if ($fuser->email) print ''.$langs->trans("SendNewPassword").''; @@ -1251,19 +1273,19 @@ else } // Activer - if ($user->id <> $_GET["id"] && $candisableuser && $fuser->statut == 0 && + if ($user->id <> $id && $candisableuser && $fuser->statut == 0 && (empty($conf->multicompany->enabled) || ($fuser->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)) ) { print ''.$langs->trans("Reactivate").''; } // Desactiver - if ($user->id <> $_GET["id"] && $candisableuser && $fuser->statut == 1 && + if ($user->id <> $id && $candisableuser && $fuser->statut == 1 && (empty($conf->multicompany->enabled) || ($fuser->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)) ) { print ''.$langs->trans("DisableUser").''; } // Delete - if ($user->id <> $_GET["id"] && $candisableuser && + if ($user->id <> $id && $candisableuser && (empty($conf->multicompany->enabled) || ($fuser->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)) ) { print ''.$langs->trans("DeleteUser").''; @@ -1302,7 +1324,7 @@ else if ($caneditgroup) { $form = new Form($db); - print ''."\n"; + print ''."\n"; print ''; print ''; print '
'."\n"; @@ -1400,7 +1422,7 @@ else * Fiche en mode edition */ - if ($_GET["action"] == 'edit' && ($canedituser || ($user->id == $fuser->id))) + if ($action == 'edit' && ($canedituser || ($user->id == $fuser->id))) { print ''; @@ -1794,17 +1816,4 @@ $db->close(); llxFooter(); - - -/** - * Return if var element is ok - * - * @param string $element Variable to check - * @return boolean Return true of variable is not empty - */ -function dolValidElement($element) -{ - return (trim($element) != ''); -} - ?> diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index 2588377405c..52a328fb42c 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -133,7 +133,7 @@ if ($id) if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') { $modName = substr($file, 0, dol_strlen($file) - 10); - + if ($modName) { include_once($dir."/".$file); @@ -147,12 +147,10 @@ if ($id) } } // Load all permissions - if ($objMod->rights_class) { - + if ($objMod->rights_class) + { $ret=$objMod->insert_permissions(0); - $modules[$objMod->rights_class]=$objMod; - //print "modules[".$objMod->rights_class."]=$objMod;"; } } } @@ -169,15 +167,21 @@ if ($id) $sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r"; $sql.= ", ".MAIN_DB_PREFIX."usergroup_rights as ugr"; $sql.= " WHERE ugr.fk_id = r.id"; - if(!empty($conf->multicompany->enabled)) + if(! empty($conf->multicompany->enabled)) { if(empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) - $sql.= " AND r.entity = ".$conf->entity; + { + $sql.= " AND r.entity = ".$conf->entity; + } else - $sql.= " AND r.entity in (0,1)"; + { + $sql.= " AND r.entity IN (0,1)"; + } + } + else + { + $sql.= " AND r.entity IN (0,".$conf->entity.")"; } - else - $sql.= " AND r.entity = ".$fgroup->entity; $sql.= " AND ugr.fk_usergroup = ".$fgroup->id; @@ -244,15 +248,21 @@ if ($id) $sql.= " FROM ".MAIN_DB_PREFIX."rights_def as r"; $sql.= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous" //$sql.= " AND r.entity = ".(empty($conf->multicompany->enabled) ? $conf->entity : $fgroup->entity); - if(!empty($conf->multicompany->enabled)) + if(! empty($conf->multicompany->enabled)) { if(empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) - $sql.= " AND r.entity = ".$conf->entity; + { + $sql.= " AND r.entity = ".$conf->entity; + } else - $sql.= " AND r.entity in (0,1)"; + { + $sql.= " AND r.entity IN (0,1)"; + } + } + else + { + $sql.= " AND r.entity = ".$conf->entity; } - else - $sql.= " AND r.entity = ".$fgroup->entity; if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $sql.= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is disable $sql.= " ORDER BY r.module, r.id"; @@ -260,9 +270,12 @@ if ($id) $result=$db->query($sql); if ($result) { - $num = $db->num_rows($result); $i = 0; - $var = True; + $var = true; + $oldmod = ''; + + $num = $db->num_rows($result); + while ($i < $num) { $obj = $db->fetch_object($result); diff --git a/test/.cvsignore b/test/.cvsignore deleted file mode 100644 index 05c31926438..00000000000 --- a/test/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -report diff --git a/test/phpunit/.cvsignore b/test/phpunit/.cvsignore deleted file mode 100644 index 05c31926438..00000000000 --- a/test/phpunit/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -report