Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop
This commit is contained in:
commit
a207877e2d
@ -7,8 +7,12 @@ root = true
|
|||||||
charset = utf-8
|
charset = utf-8
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
|
# PHP PSR-2 Coding Standards
|
||||||
|
# http://www.php-fig.org/psr/psr-2/
|
||||||
[*.php]
|
[*.php]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
[*.js]
|
[*.js]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
|||||||
20
ChangeLog
20
ChangeLog
@ -17,6 +17,26 @@ Following changes may create regressions for some external modules, but were nec
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 9.0.1 compared to 9.0.0 *****
|
||||||
|
FIX: #10381
|
||||||
|
FIX: #10460 compatibility with MariaDB 10.4
|
||||||
|
FIX: #10485
|
||||||
|
FIX: add fk_unit on addline action
|
||||||
|
FIX: better test on fetch
|
||||||
|
FIX: Default language of company is not set
|
||||||
|
FIX: error report not returned
|
||||||
|
FIX: expedition: reset status on rollback + replace hardcoded status with const
|
||||||
|
FIX: line edit template: keep fk_parent_line
|
||||||
|
FIX: Missing province in export of invoice
|
||||||
|
FIX: must fetch member in current entity
|
||||||
|
FIX: Price in combo list of service does not use the correct price level
|
||||||
|
FIX: supplier invoice payment total doesnt care about deposit or credit
|
||||||
|
FIX: supplier invoice product stats total ht is line total not invoice total
|
||||||
|
FIX: Translation not loaded by scheduled jobs
|
||||||
|
FIX: wrong merged conflict
|
||||||
|
FIX: wrong tests on fetch
|
||||||
|
NEW: Add protection to avoid packaging if files non indexed exists into
|
||||||
|
|
||||||
***** ChangeLog for 9.0.0 compared to 8.0.0 *****
|
***** ChangeLog for 9.0.0 compared to 8.0.0 *****
|
||||||
For Users:
|
For Users:
|
||||||
NEW: Stable module: DAV (WebDAV only for the moment)
|
NEW: Stable module: DAV (WebDAV only for the moment)
|
||||||
|
|||||||
@ -387,6 +387,15 @@ if ($nboftargetok) {
|
|||||||
#-----------------------
|
#-----------------------
|
||||||
if ($CHOOSEDTARGET{'-CHKSUM'})
|
if ($CHOOSEDTARGET{'-CHKSUM'})
|
||||||
{
|
{
|
||||||
|
$ret=`git ls-files . --exclude-standard --others`;
|
||||||
|
if ($ret)
|
||||||
|
{
|
||||||
|
print "Some files exists in source directory and are not indexed neither excluded in .gitignore.\n";
|
||||||
|
print $ret;
|
||||||
|
print "Canceled.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
||||||
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
||||||
print $ret."\n";
|
print $ret."\n";
|
||||||
|
|||||||
@ -140,12 +140,10 @@ else { print "err"; }
|
|||||||
$prodids = array();
|
$prodids = array();
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql) {
|
||||||
{
|
|
||||||
$num_prods = $db->num_rows($resql);
|
$num_prods = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num_prods)
|
while ($i < $num_prods) {
|
||||||
{
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
$row = $db->fetch_row($resql);
|
$row = $db->fetch_row($resql);
|
||||||
@ -155,7 +153,6 @@ if ($resql)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print "Build ".GEN_NUMBER_COMMANDE." orders\n";
|
print "Build ".GEN_NUMBER_COMMANDE." orders\n";
|
||||||
for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
|
for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -170,6 +170,8 @@
|
|||||||
<!-- Disabled as this does not support tab -->
|
<!-- Disabled as this does not support tab -->
|
||||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||||
|
|
||||||
|
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
||||||
|
|
||||||
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
|
<!-- There MUST NOT be trailing whitespace at the end of non-blank lines. -->
|
||||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@ -280,7 +280,7 @@ if (! empty($search_credit)) {
|
|||||||
if (! empty($search_lettering_code)) {
|
if (! empty($search_lettering_code)) {
|
||||||
$filter['t.lettering_code'] = $search_lettering_code;
|
$filter['t.lettering_code'] = $search_lettering_code;
|
||||||
$param .= '&search_lettering_code=' . urlencode($search_lettering_code);
|
$param .= '&search_lettering_code=' . urlencode($search_lettering_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'delbookkeeping') {
|
if ($action == 'delbookkeeping') {
|
||||||
|
|||||||
@ -2767,7 +2767,7 @@ class Adherent extends CommonObject
|
|||||||
$outputlangs = new Translate('', $conf);
|
$outputlangs = new Translate('', $conf);
|
||||||
$outputlangs->setDefaultLang(empty($adherent->thirdparty->default_lang) ? $mysoc->default_lang : $adherent->thirdparty->default_lang);
|
$outputlangs->setDefaultLang(empty($adherent->thirdparty->default_lang) ? $mysoc->default_lang : $adherent->thirdparty->default_lang);
|
||||||
$outputlangs->loadLangs(array("main", "members"));
|
$outputlangs->loadLangs(array("main", "members"));
|
||||||
dol_syslog("sendReminderForExpiredSubscription Language set to ".$outputlangs->defaultlang);
|
dol_syslog("sendReminderForExpiredSubscription Language for member id ".$adherent->id." set to ".$outputlangs->defaultlang." mysoc->default_lang=".$mysoc->default_lang);
|
||||||
|
|
||||||
$arraydefaultmessage=null;
|
$arraydefaultmessage=null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION;
|
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION;
|
||||||
|
|||||||
@ -106,13 +106,13 @@ class Subscription extends CommonObject
|
|||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."subscription (fk_adherent, fk_type, datec, dateadh, datef, subscription, note)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."subscription (fk_adherent, fk_type, datec, dateadh, datef, subscription, note)";
|
||||||
|
|
||||||
if ($this->fk_type == null) {
|
if ($this->fk_type == null) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||||
$member=new Adherent($this->db);
|
$member=new Adherent($this->db);
|
||||||
$result=$member->fetch($this->fk_adherent);
|
$result=$member->fetch($this->fk_adherent);
|
||||||
$type=$member->typeid;
|
$type=$member->typeid;
|
||||||
} else {
|
} else {
|
||||||
$type=$this->fk_type;
|
$type=$this->fk_type;
|
||||||
}
|
}
|
||||||
$sql.= " VALUES (".$this->fk_adherent.", '".$type."', '".$this->db->idate($now)."',";
|
$sql.= " VALUES (".$this->fk_adherent.", '".$type."', '".$this->db->idate($now)."',";
|
||||||
$sql.= " '".$this->db->idate($this->dateh)."',";
|
$sql.= " '".$this->db->idate($this->dateh)."',";
|
||||||
$sql.= " '".$this->db->idate($this->datef)."',";
|
$sql.= " '".$this->db->idate($this->datef)."',";
|
||||||
|
|||||||
@ -159,7 +159,8 @@ if ($mode)
|
|||||||
}
|
}
|
||||||
if ($mode == 'memberbyregion') //+
|
if ($mode == 'memberbyregion') //+
|
||||||
{
|
{
|
||||||
$data[]=array('label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
|
$data[]=array(
|
||||||
|
'label'=>(($obj->code && $langs->trans("Country".$obj->code)!="Country".$obj->code)?$langs->trans("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
|
||||||
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code)?$langsen->transnoentitiesnoconv("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
|
'label_en'=>(($obj->code && $langsen->transnoentitiesnoconv("Country".$obj->code)!="Country".$obj->code)?$langsen->transnoentitiesnoconv("Country".$obj->code):($obj->label?$obj->label:$langs->trans("Unknown"))),
|
||||||
'label2'=>($obj->label2?$obj->label2:$langs->trans("Unknown")),
|
'label2'=>($obj->label2?$obj->label2:$langs->trans("Unknown")),
|
||||||
'nb'=>$obj->nb,
|
'nb'=>$obj->nb,
|
||||||
|
|||||||
@ -673,7 +673,7 @@ if ($rowid > 0)
|
|||||||
$sql.= " c.datef,";
|
$sql.= " c.datef,";
|
||||||
$sql.= " c.fk_bank,";
|
$sql.= " c.fk_bank,";
|
||||||
$sql.= " b.rowid as bid,";
|
$sql.= " b.rowid as bid,";
|
||||||
$sql.= " ba.rowid as baid, ba.label, ba.bank, ba.ref, ba.account_number, ba.fk_accountancy_journal, ba.number";
|
$sql.= " ba.rowid as baid, ba.label, ba.bank, ba.ref, ba.account_number, ba.fk_accountancy_journal, ba.number, ba.currency_code";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON c.fk_bank = b.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON c.fk_bank = b.rowid";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid";
|
||||||
@ -726,8 +726,9 @@ if ($rowid > 0)
|
|||||||
$accountstatic->id=$objp->baid;
|
$accountstatic->id=$objp->baid;
|
||||||
$accountstatic->number=$objp->number;
|
$accountstatic->number=$objp->number;
|
||||||
$accountstatic->account_number=$objp->account_number;
|
$accountstatic->account_number=$objp->account_number;
|
||||||
|
$accountstatic->currency_code=$objp->currency_code;
|
||||||
|
|
||||||
if (! empty($conf->accounting->enabled))
|
if (! empty($conf->accounting->enabled) && $objp->fk_accountancy_journal > 0)
|
||||||
{
|
{
|
||||||
$accountingjournal = new AccountingJournal($db);
|
$accountingjournal = new AccountingJournal($db);
|
||||||
$accountingjournal->fetch($objp->fk_accountancy_journal);
|
$accountingjournal->fetch($objp->fk_accountancy_journal);
|
||||||
|
|||||||
@ -313,7 +313,7 @@ if ($rowid && $action != 'edit')
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="titlefield">'.$langs->trans("Type").'</td>';
|
print '<td class="titlefield">'.$langs->trans("Type").'</td>';
|
||||||
print '<td class="valeur">';
|
print '<td class="valeur">';
|
||||||
if ( ! empty($object->fk_type) ) {
|
if (! empty($object->fk_type) ) {
|
||||||
$adht->fetch($object->fk_type);
|
$adht->fetch($object->fk_type);
|
||||||
print $adht->getNomUrl(1);
|
print $adht->getNomUrl(1);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -68,8 +68,7 @@ if (!function_exists('gzdecode')) {
|
|||||||
* Action
|
* Action
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'addprinter' && $user->admin)
|
if ($action == 'addprinter' && $user->admin) {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (empty($printername)) {
|
if (empty($printername)) {
|
||||||
@ -81,8 +80,7 @@ if ($action == 'addprinter' && $user->admin)
|
|||||||
setEventMessages($langs->trans("PrinterParameterEmpty"), null, 'warnings');
|
setEventMessages($langs->trans("PrinterParameterEmpty"), null, 'warnings');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$result= $printer->AddPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter);
|
$result= $printer->AddPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter);
|
||||||
if ($result > 0) $error++;
|
if ($result > 0) $error++;
|
||||||
|
|
||||||
@ -100,8 +98,7 @@ if ($action == 'addprinter' && $user->admin)
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'deleteprinter' && $user->admin)
|
if ($action == 'deleteprinter' && $user->admin) {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (empty($printerid)) {
|
if (empty($printerid)) {
|
||||||
@ -109,8 +106,7 @@ if ($action == 'deleteprinter' && $user->admin)
|
|||||||
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$result= $printer->DeletePrinter($printerid);
|
$result= $printer->DeletePrinter($printerid);
|
||||||
if ($result > 0) $error++;
|
if ($result > 0) $error++;
|
||||||
|
|
||||||
@ -128,8 +124,7 @@ if ($action == 'deleteprinter' && $user->admin)
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'updateprinter' && $user->admin)
|
if ($action == 'updateprinter' && $user->admin) {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (empty($printerid)) {
|
if (empty($printerid)) {
|
||||||
@ -137,18 +132,14 @@ if ($action == 'updateprinter' && $user->admin)
|
|||||||
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$result= $printer->UpdatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid);
|
$result= $printer->UpdatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid);
|
||||||
if ($result > 0) $error++;
|
if ($result > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessages($langs->trans("PrinterUpdated", $printername), null);
|
setEventMessages($langs->trans("PrinterUpdated", $printername), null);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
@ -156,24 +147,19 @@ if ($action == 'updateprinter' && $user->admin)
|
|||||||
$action = '';
|
$action = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'testprinter' && $user->admin)
|
if ($action == 'testprinter' && $user->admin) {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
if (empty($printerid)) {
|
if (empty($printerid)) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
// test
|
// test
|
||||||
$ret = $printer->SendTestToPrinter($printerid);
|
$ret = $printer->SendTestToPrinter($printerid);
|
||||||
if ($ret == 0)
|
if ($ret == 0) {
|
||||||
{
|
|
||||||
setEventMessages($langs->trans("TestSentToPrinter", $printername), null);
|
setEventMessages($langs->trans("TestSentToPrinter", $printername), null);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
setEventMessages($printer->error, $printer->errors, 'errors');
|
setEventMessages($printer->error, $printer->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,8 +167,7 @@ if ($action == 'testprinter' && $user->admin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'updatetemplate' && $user->admin)
|
if ($action == 'updatetemplate' && $user->admin) {
|
||||||
{
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$db->begin();
|
$db->begin();
|
||||||
if (empty($templateid)) {
|
if (empty($templateid)) {
|
||||||
@ -190,18 +175,14 @@ if ($action == 'updatetemplate' && $user->admin)
|
|||||||
setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors');
|
setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$result= $printer->UpdateTemplate($templatename, $template, $templateid);
|
$result= $printer->UpdateTemplate($templatename, $template, $templateid);
|
||||||
if ($result > 0) $error++;
|
if ($result > 0) $error++;
|
||||||
|
|
||||||
if (! $error)
|
if (! $error) {
|
||||||
{
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessages($langs->trans("TemplateUpdated", $templatename), null);
|
setEventMessages($langs->trans("TemplateUpdated", $templatename), null);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
@ -223,8 +204,7 @@ print load_fiche_titre($langs->trans("ReceiptPrinterSetup"), $linkback, 'title_s
|
|||||||
|
|
||||||
$head = receiptprinteradmin_prepare_head($mode);
|
$head = receiptprinteradmin_prepare_head($mode);
|
||||||
|
|
||||||
if ($mode == 'config' && $user->admin)
|
if ($mode == 'config' && $user->admin) {
|
||||||
{
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=config" autocomplete="off">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=config" autocomplete="off">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
if ($action!='editprinter') {
|
if ($action!='editprinter') {
|
||||||
@ -253,11 +233,9 @@ if ($mode == 'config' && $user->admin)
|
|||||||
if ($ret > 0) {
|
if ($ret > 0) {
|
||||||
setEventMessages($printer->error, $printer->errors, 'errors');
|
setEventMessages($printer->error, $printer->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
for ($line=0; $line < $nbofprinters; $line++)
|
for ($line=0; $line < $nbofprinters; $line++) {
|
||||||
{
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid)
|
if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid) {
|
||||||
{
|
|
||||||
print '<input type="hidden" name="printerid" value="'.$printer->listprinters[$line]['rowid'].'">';
|
print '<input type="hidden" name="printerid" value="'.$printer->listprinters[$line]['rowid'].'">';
|
||||||
print '<td><input size="50" type="text" name="printername" value="'.$printer->listprinters[$line]['name'].'"></td>';
|
print '<td><input size="50" type="text" name="printername" value="'.$printer->listprinters[$line]['name'].'"></td>';
|
||||||
$ret = $printer->selectTypePrinter($printer->listprinters[$line]['fk_type']);
|
$ret = $printer->selectTypePrinter($printer->listprinters[$line]['fk_type']);
|
||||||
@ -291,10 +269,8 @@ if ($mode == 'config' && $user->admin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action!='editprinter')
|
if ($action!='editprinter') {
|
||||||
{
|
if ($nbofprinters > 0) {
|
||||||
if ($nbofprinters > 0)
|
|
||||||
{
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th>'.$langs->trans("Name").'</th>';
|
print '<th>'.$langs->trans("Name").'</th>';
|
||||||
print '<th>'.$langs->trans("Type").'</th>';
|
print '<th>'.$langs->trans("Type").'</th>';
|
||||||
@ -357,8 +333,7 @@ if ($mode == 'config' && $user->admin)
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'template' && $user->admin)
|
if ($mode == 'template' && $user->admin) {
|
||||||
{
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=template" autocomplete="off">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?mode=template" autocomplete="off">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
if ($action!='edittemplate') {
|
if ($action!='edittemplate') {
|
||||||
@ -429,8 +404,7 @@ if ($mode == 'template' && $user->admin)
|
|||||||
print '<th>'.$langs->trans("Description").'</th>';
|
print '<th>'.$langs->trans("Description").'</th>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$max = count($printer->tags);
|
$max = count($printer->tags);
|
||||||
for ($tag=0; $tag < $max; $tag++)
|
for ($tag=0; $tag < $max; $tag++) {
|
||||||
{
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td><'.$printer->tags[$tag].'></td><td>'.$langs->trans(strtoupper($printer->tags[$tag])).'</td>';
|
print '<td><'.$printer->tags[$tag].'></td><td>'.$langs->trans(strtoupper($printer->tags[$tag])).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -98,15 +98,14 @@ print '<br>';
|
|||||||
|
|
||||||
$arrayofsocialnetworks=array('jabber'=>'Jabber', 'skype'=>'Skype', 'twitter'=>'Twitter', 'facebook'=>'Facebook');
|
$arrayofsocialnetworks=array('jabber'=>'Jabber', 'skype'=>'Skype', 'twitter'=>'Twitter', 'facebook'=>'Facebook');
|
||||||
|
|
||||||
foreach($arrayofsocialnetworks as $snkey => $snlabel)
|
foreach($arrayofsocialnetworks as $snkey => $snlabel) {
|
||||||
{
|
|
||||||
$consttocheck = 'SOCIALNETWORKS_'.strtoupper($snkey);
|
$consttocheck = 'SOCIALNETWORKS_'.strtoupper($snkey);
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
$link = ajax_constantonoff($consttocheck);
|
$link = ajax_constantonoff($consttocheck);
|
||||||
} else {
|
} else {
|
||||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||||
$link = $form->selectarray($consttocheck, $arrval, $conf->global->$consttocheck);
|
$link = $form->selectarray($consttocheck, $arrval, $conf->global->$consttocheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
print $langs->trans('EnableFeatureFor', $snlabel).' '.$link.'<br><br>';
|
print $langs->trans('EnableFeatureFor', $snlabel).' '.$link.'<br><br>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,14 +35,15 @@ $what=GETPOST('what', 'alpha');
|
|||||||
$export_type=GETPOST('export_type', 'alpha');
|
$export_type=GETPOST('export_type', 'alpha');
|
||||||
$file=GETPOST('filename_template', 'alpha');
|
$file=GETPOST('filename_template', 'alpha');
|
||||||
|
|
||||||
|
// Load variable for pagination
|
||||||
|
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield', 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
$sortorder = GETPOST('sortorder', 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
$page = GETPOST("page", 'int');
|
$page = GETPOST("page", 'int');
|
||||||
|
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
||||||
|
$offset = $limit * $page;
|
||||||
if (! $sortorder) $sortorder="DESC";
|
if (! $sortorder) $sortorder="DESC";
|
||||||
if (! $sortfield) $sortfield="date";
|
if (! $sortfield) $sortfield="date";
|
||||||
if ($page < 0) { $page = 0; }
|
|
||||||
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
|
||||||
$offset = $limit * $page;
|
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -96,8 +96,7 @@ foreach ($modulesdir as $dir)
|
|||||||
|
|
||||||
if (empty($conf->$module->enabled)) $enabled=false;
|
if (empty($conf->$module->enabled)) $enabled=false;
|
||||||
|
|
||||||
if ($enabled)
|
if ($enabled) {
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* If exists, load the API class for enable module
|
* If exists, load the API class for enable module
|
||||||
*
|
*
|
||||||
|
|||||||
@ -72,16 +72,16 @@ class Categories extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
function get($id)
|
function get($id)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->categorie->lire) {
|
if (! DolibarrApiAccess::$user->rights->categorie->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->category->fetch($id);
|
$result = $this->category->fetch($id);
|
||||||
if( ! $result ) {
|
if ( ! $result ) {
|
||||||
throw new RestException(404, 'category not found');
|
throw new RestException(404, 'category not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ class Categories extends DolibarrApi
|
|||||||
throw new RestException(404, 'category not found');
|
throw new RestException(404, 'category not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ class Categories extends DolibarrApi
|
|||||||
throw new RestException(404, 'category not found');
|
throw new RestException(404, 'category not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('category', $this->category->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1291,7 +1291,7 @@ class ActionComm extends CommonObject
|
|||||||
if (! empty($this->location))
|
if (! empty($this->location))
|
||||||
$tooltip .= '<br><b>' . $langs->trans('Location') . ':</b> ' . $this->location;
|
$tooltip .= '<br><b>' . $langs->trans('Location') . ':</b> ' . $this->location;
|
||||||
if (! empty($this->note))
|
if (! empty($this->note))
|
||||||
$tooltip .= '<br><b>' . $langs->trans('Note') . ':</b> ' . (dol_textishtml($this->note) ? str_replace(array("\r","\n"), "", $this->note) : $this->note);
|
$tooltip .= '<br><b>' . $langs->trans('Note') . ':</b> ' . (dol_textishtml($this->note) ? str_replace(array("\r","\n"), "", $this->note) : str_replace(array("\r","\n"), '<br>', $this->note));
|
||||||
$linkclose='';
|
$linkclose='';
|
||||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
|
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
|
||||||
$linkclose = ' style="background-color:#'.$this->type_color.'"';
|
$linkclose = ' style="background-color:#'.$this->type_color.'"';
|
||||||
|
|||||||
@ -876,7 +876,7 @@ if ($object->id > 0)
|
|||||||
print '<td class="right"><b>!!!</b></td>';
|
print '<td class="right"><b>!!!</b></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="right" class="nowrap" width="100" >' . $sendingstatic->LibStatut($objp->statut, 5) . '</td>';
|
print '<td class="nowrap right" width="100" >' . $sendingstatic->LibStatut($objp->statut, 5) . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -942,7 +942,7 @@ if ($object->id > 0)
|
|||||||
print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->dc), 'day')."</td>\n";
|
print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->dc), 'day')."</td>\n";
|
||||||
print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->dcon), 'day')."</td>\n";
|
print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->dcon), 'day')."</td>\n";
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
print '<td align="right" class="nowraponall">';
|
print '<td class="nowraponall right">';
|
||||||
print $contrat->getLibStatut(4);
|
print $contrat->getLibStatut(4);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -1004,7 +1004,7 @@ if ($object->id > 0)
|
|||||||
print '<td class="nowrap"><a href="'.DOL_URL_ROOT.'/fichinter/card.php?id='.$objp->id.'">'.img_object($langs->trans("ShowPropal"), "propal").' '.$objp->ref.'</a></td>'."\n";
|
print '<td class="nowrap"><a href="'.DOL_URL_ROOT.'/fichinter/card.php?id='.$objp->id.'">'.img_object($langs->trans("ShowPropal"), "propal").' '.$objp->ref.'</a></td>'."\n";
|
||||||
//print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->startdate)).'</td>'."\n";
|
//print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->startdate)).'</td>'."\n";
|
||||||
print '<td class="right" style="min-width: 60px">'.convertSecondToTime($objp->duration).'</td>'."\n";
|
print '<td class="right" style="min-width: 60px">'.convertSecondToTime($objp->duration).'</td>'."\n";
|
||||||
print '<td align="right" class="nowrap" style="min-width: 60px">'.$fichinter_static->getLibStatut(5).'</td>'."\n";
|
print '<td class="nowrap right" style="min-width: 60px">'.$fichinter_static->getLibStatut(5).'</td>'."\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
@ -1110,7 +1110,7 @@ if ($object->id > 0)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="right" class="nowrap" style="min-width: 60px">';
|
print '<td class="nowrap right" style="min-width: 60px">';
|
||||||
print $langs->trans('FrequencyPer_'.$invoicetemplate->unit_frequency, $invoicetemplate->frequency).' - ';
|
print $langs->trans('FrequencyPer_'.$invoicetemplate->unit_frequency, $invoicetemplate->frequency).' - ';
|
||||||
print ($invoicetemplate->LibStatut($invoicetemplate->frequency, $invoicetemplate->suspended, 5, 0));
|
print ($invoicetemplate->LibStatut($invoicetemplate->frequency, $invoicetemplate->suspended, 5, 0));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1205,7 +1205,7 @@ if ($object->id > 0)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="right" class="nowrap" style="min-width: 60px">'.($facturestatic->LibStatut($objp->paye, $objp->statut, 5, $objp->am)).'</td>';
|
print '<td class="nowrap right" style="min-width: 60px">'.($facturestatic->LibStatut($objp->paye, $objp->statut, 5, $objp->am)).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -142,7 +142,7 @@ if ($resql)
|
|||||||
print '<td class="liste_titre"><input class="flat" name="search_firstname" size="12" value="'.$search_firstname.'"></td>';
|
print '<td class="liste_titre"><input class="flat" name="search_firstname" size="12" value="'.$search_firstname.'"></td>';
|
||||||
print '<td class="liste_titre"><input class="flat" name="search_company" size="12" value="'.$search_company.'"></td>';
|
print '<td class="liste_titre"><input class="flat" name="search_company" size="12" value="'.$search_company.'"></td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
print '<td class="liste_titre right"><input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|||||||
@ -186,7 +186,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
|||||||
$companystatic->canvas=$obj->canvas;
|
$companystatic->canvas=$obj->canvas;
|
||||||
print $companystatic->getNomUrl(1, 'customer', 16);
|
print $companystatic->getNomUrl(1, 'customer', 16);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right" class="nowrap">'.price($obj->total_ht).'</td></tr>';
|
print '<td class="nowrap right">'.price($obj->total_ht).'</td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ht;
|
$total += $obj->total_ht;
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos
|
|||||||
$companystatic->canvas=$obj->canvas;
|
$companystatic->canvas=$obj->canvas;
|
||||||
print $companystatic->getNomUrl(1, 'supplier', 16);
|
print $companystatic->getNomUrl(1, 'supplier', 16);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right" class="nowrap">'.price($obj->total_ht).'</td></tr>';
|
print '<td class="nowrap right">'.price($obj->total_ht).'</td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ht;
|
$total += $obj->total_ht;
|
||||||
}
|
}
|
||||||
@ -345,10 +345,10 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
print $companystatic->getNomUrl(1, 'customer', 16);
|
print $companystatic->getNomUrl(1, 'customer', 16);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if(! empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) {
|
if(! empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) {
|
||||||
print '<td align="right" class="nowrap">'.price($obj->total_ht).'</td></tr>';
|
print '<td class="nowrap right">'.price($obj->total_ht).'</td></tr>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<td class="right" class="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
print '<td class="nowrap right">'.price($obj->total_ttc).'</td></tr>';
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ttc;
|
$total += $obj->total_ttc;
|
||||||
@ -432,10 +432,10 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande
|
|||||||
print $companystatic->getNomUrl(1, 'supplier', 16);
|
print $companystatic->getNomUrl(1, 'supplier', 16);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if(! empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) {
|
if(! empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT)) {
|
||||||
print '<td align="right" class="nowrap">'.price($obj->total_ht).'</td></tr>';
|
print '<td class="nowrap right">'.price($obj->total_ht).'</td></tr>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<td class="right" class="nowrap">'.price($obj->total_ttc).'</td></tr>';
|
print '<td class="nowrap right">'.price($obj->total_ttc).'</td></tr>';
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ttc;
|
$total += $obj->total_ttc;
|
||||||
|
|||||||
@ -890,11 +890,11 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
if (!empty($arrayquery['options_'.$key.'_end_dt'])){
|
if (!empty($arrayquery['options_'.$key.'_end_dt'])){
|
||||||
$sqlwhere[]= " (tse.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND tse.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')";
|
$sqlwhere[]= " (tse.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND tse.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')";
|
||||||
}
|
}
|
||||||
}elseif ($extrafields->attribute_type[$key] == 'boolean') {
|
} elseif ($extrafields->attribute_type[$key] == 'boolean') {
|
||||||
if ($arrayquery['options_'.$key]!=''){
|
if ($arrayquery['options_'.$key]!=''){
|
||||||
$sqlwhere[]= " (tse.".$key." = ".$arrayquery['options_'.$key].")";
|
$sqlwhere[]= " (tse.".$key." = ".$arrayquery['options_'.$key].")";
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
if (is_array($arrayquery['options_'.$key])) {
|
if (is_array($arrayquery['options_'.$key])) {
|
||||||
$sqlwhere[]= " (tse.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))";
|
$sqlwhere[]= " (tse.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))";
|
||||||
} elseif (!empty($arrayquery['options_'.$key])) {
|
} elseif (!empty($arrayquery['options_'.$key])) {
|
||||||
|
|||||||
@ -109,8 +109,7 @@ if (is_resource($handle))
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -154,8 +153,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."mailing as m";
|
|||||||
$sql.= " ORDER BY m.date_creat DESC";
|
$sql.= " ORDER BY m.date_creat DESC";
|
||||||
$sql.= " LIMIT ".$limit;
|
$sql.= " LIMIT ".$limit;
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result) {
|
||||||
{
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="2">'.$langs->trans("LastMailings", $limit).'</td>';
|
print '<td colspan="2">'.$langs->trans("LastMailings", $limit).'</td>';
|
||||||
@ -207,7 +205,7 @@ if ($langs->file_exists("html/spam.html", 0)) {
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -193,7 +193,7 @@ if ($result)
|
|||||||
if (! $filteremail) print '<td class="liste_titre"> </td>';
|
if (! $filteremail) print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -206,8 +206,8 @@ if ($result)
|
|||||||
if (! $filteremail) print_liste_field_titre("NbOfEMails", $_SERVER["PHP_SELF"], "m.nbemail", $param, "", 'align="center"', $sortfield, $sortorder);
|
if (! $filteremail) print_liste_field_titre("NbOfEMails", $_SERVER["PHP_SELF"], "m.nbemail", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||||
if (! $filteremail) print_liste_field_titre("DateLastSend", $_SERVER["PHP_SELF"], "m.date_envoi", $param, "", 'align="center"', $sortfield, $sortorder);
|
if (! $filteremail) print_liste_field_titre("DateLastSend", $_SERVER["PHP_SELF"], "m.date_envoi", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||||
else print_liste_field_titre("DateSending", $_SERVER["PHP_SELF"], "mc.date_envoi", $param, "", 'align="center"', $sortfield, $sortorder);
|
else print_liste_field_titre("DateSending", $_SERVER["PHP_SELF"], "mc.date_envoi", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], ($filteremail?"mc.statut":"m.statut"), $param, "", 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], ($filteremail?"mc.statut":"m.statut"), $param, "", 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', 'align="right"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', 'class="right"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ if ($result)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<td align="right" class="nowrap">';
|
print '<td class="nowrap right">';
|
||||||
if ($filteremail)
|
if ($filteremail)
|
||||||
{
|
{
|
||||||
print $email::libStatutDest($obj->sendstatut, 2);
|
print $email::libStatutDest($obj->sendstatut, 2);
|
||||||
|
|||||||
@ -297,8 +297,7 @@ class Proposals extends DolibarrApi
|
|||||||
|
|
||||||
if ($updateRes > 0) {
|
if ($updateRes > 0) {
|
||||||
return $updateRes;
|
return $updateRes;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
throw new RestException(400, $this->propal->error);
|
throw new RestException(400, $this->propal->error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -654,15 +653,15 @@ class Proposals extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
function setinvoiced($id)
|
function setinvoiced($id)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->propal->creer) {
|
if (! DolibarrApiAccess::$user->rights->propal->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
$result = $this->propal->fetch($id);
|
$result = $this->propal->fetch($id);
|
||||||
if( ! $result ) {
|
if ( ! $result ) {
|
||||||
throw new RestException(404, 'Commercial Proposal not found');
|
throw new RestException(404, 'Commercial Proposal not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('propal', $this->propal->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -672,7 +671,7 @@ class Proposals extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->propal->fetch($id);
|
$result = $this->propal->fetch($id);
|
||||||
if( ! $result ) {
|
if ( ! $result ) {
|
||||||
throw new RestException(404, 'Proposal not found');
|
throw new RestException(404, 'Proposal not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -430,7 +430,7 @@ if (! empty($conf->propal->enabled))
|
|||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="16" align="right" class="nobordernopadding">';
|
print '<td width="16" class="nobordernopadding right">';
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
@ -503,7 +503,7 @@ if (! empty($conf->propal->enabled))
|
|||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="16" align="right" class="nobordernopadding">';
|
print '<td width="16" class="nobordernopadding right">';
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
@ -514,7 +514,7 @@ if (! empty($conf->propal->enabled))
|
|||||||
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
|
print '<td><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.'</a></td>';
|
||||||
|
|
||||||
print '<td align="right">'.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
print '<td class="right">'.$propalstatic->LibStatut($obj->fk_statut,$obj->facture,5).'</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -619,21 +619,21 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['p.total_ht']['checked']))
|
if (! empty($arrayfields['p.total_ht']['checked']))
|
||||||
{
|
{
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['p.total_vat']['checked']))
|
if (! empty($arrayfields['p.total_vat']['checked']))
|
||||||
{
|
{
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['p.total_ttc']['checked']))
|
if (! empty($arrayfields['p.total_ttc']['checked']))
|
||||||
{
|
{
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -670,7 +670,7 @@ if ($resql)
|
|||||||
// Status
|
// Status
|
||||||
if (! empty($arrayfields['p.fk_statut']['checked']))
|
if (! empty($arrayfields['p.fk_statut']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre maxwidthonsmartphone" align="right">';
|
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||||
$formpropal->selectProposalStatus($viewstatut, 1, 0, 1, 'customer', 'search_statut');
|
$formpropal->selectProposalStatus($viewstatut, 1, 0, 1, 'customer', 'search_statut');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -698,9 +698,9 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['p.fin_validite']['checked'])) print_liste_field_titre($arrayfields['p.fin_validite']['label'], $_SERVER["PHP_SELF"], 'dfv', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.fin_validite']['checked'])) print_liste_field_titre($arrayfields['p.fin_validite']['label'], $_SERVER["PHP_SELF"], 'dfv', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.date_livraison']['checked'])) print_liste_field_titre($arrayfields['p.date_livraison']['label'], $_SERVER["PHP_SELF"], 'ddelivery', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.date_livraison']['checked'])) print_liste_field_titre($arrayfields['p.date_livraison']['label'], $_SERVER["PHP_SELF"], 'ddelivery', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['ava.rowid']['checked'])) print_liste_field_titre($arrayfields['ava.rowid']['label'], $_SERVER["PHP_SELF"], 'availability', '', $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['ava.rowid']['checked'])) print_liste_field_titre($arrayfields['ava.rowid']['label'], $_SERVER["PHP_SELF"], 'availability', '', $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.total_ht']['checked'])) print_liste_field_titre($arrayfields['p.total_ht']['label'], $_SERVER["PHP_SELF"], 'p.total_ht', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.total_ht']['checked'])) print_liste_field_titre($arrayfields['p.total_ht']['label'], $_SERVER["PHP_SELF"], 'p.total_ht', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.total_vat']['checked'])) print_liste_field_titre($arrayfields['p.total_vat']['label'], $_SERVER["PHP_SELF"], 'p.tva', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.total_vat']['checked'])) print_liste_field_titre($arrayfields['p.total_vat']['label'], $_SERVER["PHP_SELF"], 'p.tva', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.total_ttc']['checked'])) print_liste_field_titre($arrayfields['p.total_ttc']['label'], $_SERVER["PHP_SELF"], 'p.total', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.total_ttc']['checked'])) print_liste_field_titre($arrayfields['p.total_ttc']['label'], $_SERVER["PHP_SELF"], 'p.total', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", "$param", '', $sortfield, $sortorder);
|
if (! empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", "$param", '', $sortfield, $sortorder);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
@ -711,7 +711,7 @@ if ($resql)
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
@ -753,7 +753,7 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Other picto tool
|
// Other picto tool
|
||||||
print '<td width="16" align="right" class="nobordernopadding">';
|
print '<td width="16" class="nobordernopadding right">';
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->propal->multidir_output[$obj->entity] . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->propal->multidir_output[$obj->entity] . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
|
|||||||
@ -24,8 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// Protection to avoid direct call of template
|
||||||
if (empty($conf) || ! is_object($conf))
|
if (empty($conf) || ! is_object($conf)) {
|
||||||
{
|
|
||||||
print "Error, template page can't be called as URL";
|
print "Error, template page can't be called as URL";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -54,7 +53,8 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
?>
|
?>
|
||||||
<tr class="<?php echo $trclass; ?>" data-element="<?php echo $objectlink->element; ?>" data-id="<?php echo $objectlink->id; ?>" >
|
<tr class="<?php echo $trclass; ?>" data-element="<?php echo $objectlink->element; ?>" data-id="<?php echo $objectlink->id; ?>" >
|
||||||
<td class="linkedcol-element" ><?php echo $langs->trans("Proposal"); ?>
|
<td class="linkedcol-element" ><?php echo $langs->trans("Proposal"); ?>
|
||||||
<?php if(!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES)
|
<?php
|
||||||
|
if(!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES)
|
||||||
{
|
{
|
||||||
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id;
|
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id;
|
||||||
print '<a class="objectlinked_importbtn" href="'.$url.'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a>';
|
print '<a class="objectlinked_importbtn" href="'.$url.'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a>';
|
||||||
@ -64,13 +64,13 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
<td class="linkedcol-name" ><?php echo $objectlink->getNomUrl(1); ?></td>
|
<td class="linkedcol-name" ><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td class="linkedcol-ref" ><?php echo $objectlink->ref_client; ?></td>
|
<td class="linkedcol-ref" ><?php echo $objectlink->ref_client; ?></td>
|
||||||
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
||||||
<td class="linkedcol-amount" align="right"><?php
|
<td class="linkedcol-amount right"><?php
|
||||||
if ($user->rights->propale->lire) {
|
if ($user->rights->propale->lire) {
|
||||||
$total = $total + $objectlink->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td class="linkedcol-statut" align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
<td class="linkedcol-action" align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
<td class="linkedcol-action right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ if (count($linkedObjectBlock) > 1)
|
|||||||
<td class="right"></td>
|
<td class="right"></td>
|
||||||
<td class="right"></td>
|
<td class="right"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -220,7 +220,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
}
|
}
|
||||||
if ($total>0)
|
if ($total>0)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_total"><td colspan="3" align="right">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td></tr>";
|
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,7 +130,7 @@ if ($resql)
|
|||||||
print_liste_field_titre("Town", $_SERVER["PHP_SELF"], "s.town", "", "", 'valign="center"', $sortfield, $sortorder);
|
print_liste_field_titre("Town", $_SERVER["PHP_SELF"], "s.town", "", "", 'valign="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", "", "", 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", "", "", 'align="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("AccountancyCode", $_SERVER["PHP_SELF"], "s.code_compta", "", "", 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("AccountancyCode", $_SERVER["PHP_SELF"], "s.code_compta", "", "", 'align="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "datec", $addu, "", 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "datec", $addu, "", 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
@ -149,7 +149,7 @@ if ($resql)
|
|||||||
print '<input class="flat" type="text" size="10" name="search_compta" value="'.dol_escape_htmltag(GETPOST("search_compta")).'">';
|
print '<input class="flat" type="text" size="10" name="search_compta" value="'.dol_escape_htmltag(GETPOST("search_compta")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="right" colspan="2" class="liste_titre">';
|
print '<td colspan="2" class="liste_titre right">';
|
||||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -652,21 +652,21 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['c.total_ht']['checked']))
|
if (! empty($arrayfields['c.total_ht']['checked']))
|
||||||
{
|
{
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="4" name="search_total_ht" value="'.$search_total_ht.'">';
|
print '<input class="flat" type="text" size="4" name="search_total_ht" value="'.$search_total_ht.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['c.total_vat']['checked']))
|
if (! empty($arrayfields['c.total_vat']['checked']))
|
||||||
{
|
{
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="4" name="search_total_vat" value="'.$search_total_vat.'">';
|
print '<input class="flat" type="text" size="4" name="search_total_vat" value="'.$search_total_vat.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['c.total_ttc']['checked']))
|
if (! empty($arrayfields['c.total_ttc']['checked']))
|
||||||
{
|
{
|
||||||
// Amount
|
// Amount
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="5" name="search_total_ttc" value="'.$search_total_ttc.'">';
|
print '<input class="flat" type="text" size="5" name="search_total_ttc" value="'.$search_total_ttc.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
@ -691,7 +691,7 @@ if ($resql)
|
|||||||
// Status
|
// Status
|
||||||
if (! empty($arrayfields['c.fk_statut']['checked']))
|
if (! empty($arrayfields['c.fk_statut']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre maxwidthonsmartphone" align="right">';
|
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||||
$liststatus=array(
|
$liststatus=array(
|
||||||
Commande::STATUS_DRAFT=>$langs->trans("StatusOrderDraftShort"),
|
Commande::STATUS_DRAFT=>$langs->trans("StatusOrderDraftShort"),
|
||||||
Commande::STATUS_VALIDATED=>$langs->trans("StatusOrderValidated"),
|
Commande::STATUS_VALIDATED=>$langs->trans("StatusOrderValidated"),
|
||||||
@ -731,9 +731,9 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'], $_SERVER["PHP_SELF"], 'c.date_commande', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.date_commande']['checked'])) print_liste_field_titre($arrayfields['c.date_commande']['label'], $_SERVER["PHP_SELF"], 'c.date_commande', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'], $_SERVER["PHP_SELF"], 'c.date_livraison', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.date_delivery']['checked'])) print_liste_field_titre($arrayfields['c.date_delivery']['label'], $_SERVER["PHP_SELF"], 'c.date_livraison', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'], $_SERVER["PHP_SELF"], 'c.total_ht', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.total_ht']['checked'])) print_liste_field_titre($arrayfields['c.total_ht']['label'], $_SERVER["PHP_SELF"], 'c.total_ht', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'], $_SERVER["PHP_SELF"], 'c.tva', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.total_vat']['checked'])) print_liste_field_titre($arrayfields['c.total_vat']['label'], $_SERVER["PHP_SELF"], 'c.tva', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'], $_SERVER["PHP_SELF"], 'c.total_ttc', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.total_ttc']['checked'])) print_liste_field_titre($arrayfields['c.total_ttc']['label'], $_SERVER["PHP_SELF"], 'c.total_ttc', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
@ -742,7 +742,7 @@ if ($resql)
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.date_creation", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.date_creation", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['c.fk_statut']['checked'])) print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['c.fk_statut']['checked'])) print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['c.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'], $_SERVER["PHP_SELF"], 'c.facture', '', $param, 'align="center"', $sortfield, $sortorder, '');
|
if (! empty($arrayfields['c.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'], $_SERVER["PHP_SELF"], 'c.facture', '', $param, 'align="center"', $sortfield, $sortorder, '');
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
@ -914,7 +914,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
print '<td width="16" class="nobordernopadding hideonsmartphone right">';
|
||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
|
|||||||
@ -610,7 +610,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
|||||||
print_liste_field_titre('RefCustomerOrder', $_SERVER["PHP_SELF"], 'c.ref_client', '', '&socid='.$socid, '', $sortfield, $sortorder);
|
print_liste_field_titre('RefCustomerOrder', $_SERVER["PHP_SELF"], 'c.ref_client', '', '&socid='.$socid, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('OrderDate', $_SERVER["PHP_SELF"], 'c.date_commande', '', '&socid='.$socid, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre('OrderDate', $_SERVER["PHP_SELF"], 'c.date_commande', '', '&socid='.$socid, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('DeliveryDate', $_SERVER["PHP_SELF"], 'c.date_livraison', '', '&socid='.$socid, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre('DeliveryDate', $_SERVER["PHP_SELF"], 'c.date_livraison', '', '&socid='.$socid, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('Status', '', '', '', '', 'align="right"');
|
print_liste_field_titre('Status', '', '', '', '', 'class="right"');
|
||||||
print_liste_field_titre('GenerateBill', '', '', '', '', 'align="center"');
|
print_liste_field_titre('GenerateBill', '', '', '', '', 'align="center"');
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -638,7 +638,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
//SEARCH BUTTON
|
//SEARCH BUTTON
|
||||||
print '<td align="right" class="liste_titre">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -678,7 +678,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
print '<td width="16" class="nobordernopadding hideonsmartphone right">';
|
||||||
$filename=dol_sanitizeFileName($objp->ref);
|
$filename=dol_sanitizeFileName($objp->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
|
||||||
@ -699,7 +699,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<td align="right" class="nowrap">'.$generic_commande->LibStatut($objp->fk_statut, $objp->billed, 5).'</td>';
|
print '<td class="nowrap right">'.$generic_commande->LibStatut($objp->fk_statut, $objp->billed, 5).'</td>';
|
||||||
|
|
||||||
// Checkbox
|
// Checkbox
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
@ -718,7 +718,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
|||||||
* Boutons actions
|
* Boutons actions
|
||||||
*/
|
*/
|
||||||
print '<br><div class="center"><input type="checkbox" '.(empty($conf->global->INVOICE_CLOSE_ORDERS_OFF_BY_DEFAULT_FORMASSINVOICE)?' checked="checked"':'').' name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
|
print '<br><div class="center"><input type="checkbox" '.(empty($conf->global->INVOICE_CLOSE_ORDERS_OFF_BY_DEFAULT_FORMASSINVOICE)?' checked="checked"':'').' name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
|
||||||
print '<div align="right">';
|
print '<div class="right">';
|
||||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||||
print '<input type="hidden" name="action" value="create">';
|
print '<input type="hidden" name="action" value="create">';
|
||||||
print '<input type="hidden" name="origin" value="commande"><br>';
|
print '<input type="hidden" name="origin" value="commande"><br>';
|
||||||
|
|||||||
@ -54,13 +54,13 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
<td class="linkedcol-name" ><?php echo $objectlink->getNomUrl(1); ?></td>
|
<td class="linkedcol-name" ><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td class="linkedcol-ref" align="center"><?php echo $objectlink->ref_client; ?></td>
|
<td class="linkedcol-ref" align="center"><?php echo $objectlink->ref_client; ?></td>
|
||||||
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
||||||
<td class="linkedcol-amount" align="right"><?php
|
<td class="linkedcol-amount right"><?php
|
||||||
if ($user->rights->commande->lire) {
|
if ($user->rights->commande->lire) {
|
||||||
$total = $total + $objectlink->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td class="linkedcol-statut" align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
<td class="linkedcol-action" align="right">
|
<td class="linkedcol-action right">
|
||||||
<?php
|
<?php
|
||||||
// For now, shipments must stay linked to order, so link is not deletable
|
// For now, shipments must stay linked to order, so link is not deletable
|
||||||
if($object->element != 'shipping') {
|
if($object->element != 'shipping') {
|
||||||
|
|||||||
@ -209,7 +209,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
|
|||||||
{
|
{
|
||||||
$case = sprintf("%04s-%02s", $annee, $mois);
|
$case = sprintf("%04s-%02s", $annee, $mois);
|
||||||
|
|
||||||
print '<td align="right" width="10%"> ';
|
print '<td class="right" width="10%"> ';
|
||||||
if ($decaiss[$case]>0)
|
if ($decaiss[$case]>0)
|
||||||
{
|
{
|
||||||
print price($decaiss[$case]);
|
print price($decaiss[$case]);
|
||||||
@ -217,7 +217,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
|
|||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
print '<td align="right" class="borderrightlight" width="10%"> ';
|
print '<td class="right" class="borderrightlight" width="10%"> ';
|
||||||
if ($encaiss[$case]>0)
|
if ($encaiss[$case]>0)
|
||||||
{
|
{
|
||||||
print price($encaiss[$case]);
|
print price($encaiss[$case]);
|
||||||
@ -266,7 +266,7 @@ else {
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_total"><td><b>'.$langs->trans("CurrentBalance")."</b></td>";
|
print '<tr class="liste_total"><td><b>'.$langs->trans("CurrentBalance")."</b></td>";
|
||||||
print '<td colspan="'.($nbcol).'" align="right">'.price($balance).'</td>';
|
print '<td colspan="'.($nbcol).'" class="right">'.price($balance).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|||||||
@ -666,10 +666,10 @@ if ($resql)
|
|||||||
print '<td>'.$langs->trans("Numero").'</td>';
|
print '<td>'.$langs->trans("Numero").'</td>';
|
||||||
//if (! $search_account > 0)
|
//if (! $search_account > 0)
|
||||||
//{
|
//{
|
||||||
print '<td align=right>'.$langs->trans("BankAccount").'</td>';
|
print '<td class=right>'.$langs->trans("BankAccount").'</td>';
|
||||||
//}
|
//}
|
||||||
print '<td align=right>'.$langs->trans("Debit").'</td>';
|
print '<td class=right>'.$langs->trans("Debit").'</td>';
|
||||||
print '<td align=right>'.$langs->trans("Credit").'</td>';
|
print '<td class=right>'.$langs->trans("Credit").'</td>';
|
||||||
/*if (! empty($conf->accounting->enabled))
|
/*if (! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
@ -700,7 +700,7 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
//if (! $search_account > 0)
|
//if (! $search_account > 0)
|
||||||
//{
|
//{
|
||||||
print '<td align=right>';
|
print '<td class=right>';
|
||||||
$form->select_comptes(GETPOST('add_account', 'int')?GETPOST('add_account', 'int'):$search_account, 'add_account', 0, '', 1, ($id > 0 || ! empty($ref)?' disabled="disabled"':''));
|
$form->select_comptes(GETPOST('add_account', 'int')?GETPOST('add_account', 'int'):$search_account, 'add_account', 0, '', 1, ($id > 0 || ! empty($ref)?' disabled="disabled"':''));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
//}
|
//}
|
||||||
@ -955,11 +955,11 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['type']['checked'])) print_liste_field_titre($arrayfields['type']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['type']['checked'])) print_liste_field_titre($arrayfields['type']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['b.num_chq']['checked'])) print_liste_field_titre($arrayfields['b.num_chq']['label'], $_SERVER['PHP_SELF'], 'b.num_chq', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.num_chq']['checked'])) print_liste_field_titre($arrayfields['b.num_chq']['label'], $_SERVER['PHP_SELF'], 'b.num_chq', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['bu.label']['checked'])) print_liste_field_titre($arrayfields['bu.label']['label'], $_SERVER['PHP_SELF'], 'bu.label', '', $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['bu.label']['checked'])) print_liste_field_titre($arrayfields['bu.label']['label'], $_SERVER['PHP_SELF'], 'bu.label', '', $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['ba.ref']['checked'])) print_liste_field_titre($arrayfields['ba.ref']['label'], $_SERVER['PHP_SELF'], 'ba.ref', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['ba.ref']['checked'])) print_liste_field_titre($arrayfields['ba.ref']['label'], $_SERVER['PHP_SELF'], 'ba.ref', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['b.debit']['checked'])) print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.debit']['checked'])) print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['b.credit']['checked'])) print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.credit']['checked'])) print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['balancebefore']['checked'])) print_liste_field_titre($arrayfields['balancebefore']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['balancebefore']['checked'])) print_liste_field_titre($arrayfields['balancebefore']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['b.num_releve']['checked'])) print_liste_field_titre($arrayfields['b.num_releve']['label'], $_SERVER['PHP_SELF'], 'b.num_releve', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.num_releve']['checked'])) print_liste_field_titre($arrayfields['b.num_releve']['label'], $_SERVER['PHP_SELF'], 'b.num_releve', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['b.conciliated']['checked'])) print_liste_field_titre($arrayfields['b.conciliated']['label'], $_SERVER['PHP_SELF'], 'b.rappro', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.conciliated']['checked'])) print_liste_field_titre($arrayfields['b.conciliated']['label'], $_SERVER['PHP_SELF'], 'b.rappro', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
@ -968,7 +968,7 @@ if ($resql)
|
|||||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', 'align="right"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', 'class="right"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -1355,7 +1355,7 @@ if ($resql)
|
|||||||
// Debit
|
// Debit
|
||||||
if (! empty($arrayfields['b.debit']['checked']))
|
if (! empty($arrayfields['b.debit']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($objp->amount < 0)
|
if ($objp->amount < 0)
|
||||||
{
|
{
|
||||||
print price($objp->amount * -1);
|
print price($objp->amount * -1);
|
||||||
@ -1396,7 +1396,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="right">-</td>';
|
print '<td class="right">-</td>';
|
||||||
}
|
}
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
@ -1411,12 +1411,12 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="right" class="error nowrap"> '.price($balance).'</td>';
|
print '<td class="error nowrap right"> '.price($balance).'</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="right">-</td>';
|
print '<td class="right">-</td>';
|
||||||
}
|
}
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -394,7 +394,7 @@ print $hookmanager->resPrint;
|
|||||||
if (! empty($arrayfields['b.datec']['checked'])) print_liste_field_titre($arrayfields['b.datec']['label'], $_SERVER["PHP_SELF"], "b.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.datec']['checked'])) print_liste_field_titre($arrayfields['b.datec']['label'], $_SERVER["PHP_SELF"], "b.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['b.tms']['checked'])) print_liste_field_titre($arrayfields['b.tms']['label'], $_SERVER["PHP_SELF"], "b.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.tms']['checked'])) print_liste_field_titre($arrayfields['b.tms']['label'], $_SERVER["PHP_SELF"], "b.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['b.clos']['checked'])) print_liste_field_titre($arrayfields['b.clos']['label'], $_SERVER["PHP_SELF"], 'b.clos', '', $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['b.clos']['checked'])) print_liste_field_titre($arrayfields['b.clos']['label'], $_SERVER["PHP_SELF"], 'b.clos', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'align="right"', $sortfield, $sortorder);
|
if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'], $_SERVER["PHP_SELF"], '', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -550,7 +550,7 @@ foreach ($accounts as $key=>$type)
|
|||||||
// Balance
|
// Balance
|
||||||
if (! empty($arrayfields['balance']['checked']))
|
if (! empty($arrayfields['balance']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="right" class="nowraponall">';
|
print '<td class="nowraponall right">';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$obj->id.'">'.price($solde, 0, $langs, 0, -1, -1, $obj->currency_code).'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$obj->id.'">'.price($solde, 0, $langs, 0, -1, -1, $obj->currency_code).'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|||||||
@ -766,15 +766,15 @@ else
|
|||||||
if ($objp->amount < 0)
|
if ($objp->amount < 0)
|
||||||
{
|
{
|
||||||
$totald = $totald + abs($objp->amount);
|
$totald = $totald + abs($objp->amount);
|
||||||
print '<td align="right" class="nowrap">'.price($objp->amount * -1)."</td><td> </td>\n";
|
print '<td class="nowrap right">'.price($objp->amount * -1)."</td><td> </td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$totalc = $totalc + abs($objp->amount);
|
$totalc = $totalc + abs($objp->amount);
|
||||||
print '<td> </td><td align="right" class="nowrap">'.price($objp->amount)."</td>\n";
|
print '<td> </td><td class="nowrap right">'.price($objp->amount)."</td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="right" class="nowrap">'.price(price2num($total, 'MT'))."</td>\n";
|
print '<td class="nowrap right">'.price(price2num($total, 'MT'))."</td>\n";
|
||||||
|
|
||||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||||
{
|
{
|
||||||
@ -793,7 +793,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Line Total
|
// Line Total
|
||||||
print "\n".'<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("Total")." :</td><td align=\"right\">".price($totald)."</td><td align=\"right\">".price($totalc)."</td><td> </td><td> </td></tr>";
|
print "\n".'<tr class="liste_total"><td class="right" colspan="4">'.$langs->trans("Total")." :</td><td align=\"right\">".price($totald)."</td><td align=\"right\">".price($totalc)."</td><td> </td><td> </td></tr>";
|
||||||
|
|
||||||
// Line Balance
|
// Line Balance
|
||||||
print "\n<tr>";
|
print "\n<tr>";
|
||||||
|
|||||||
@ -183,13 +183,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
|||||||
|
|
||||||
foreach($sqls as $sql){
|
foreach($sqls as $sql){
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if($resql){
|
if ($resql) {
|
||||||
while($sqlobj = $db->fetch_object($resql)){
|
while ($sqlobj = $db->fetch_object($resql)) {
|
||||||
$tab_sqlobj[] = $sqlobj;
|
$tab_sqlobj[] = $sqlobj;
|
||||||
$tab_sqlobjOrder[]= $db->jdate($sqlobj->dlr);
|
$tab_sqlobjOrder[]= $db->jdate($sqlobj->dlr);
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}else{
|
} else {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -218,12 +218,12 @@ if ($result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Debit
|
// Debit
|
||||||
print '<td class="liste_titre" align="right"><input name="search_amount_deb" class="flat" type="text" size="8" value="'.$search_amount_deb.'"></td>';
|
print '<td class="liste_titre right"><input name="search_amount_deb" class="flat" type="text" size="8" value="'.$search_amount_deb.'"></td>';
|
||||||
|
|
||||||
// Credit
|
// Credit
|
||||||
print '<td class="liste_titre" align="right"><input name="search_amount_cred" class="flat" type="text" size="8" value="'.$search_amount_cred.'"></td>';
|
print '<td class="liste_titre right"><input name="search_amount_cred" class="flat" type="text" size="8" value="'.$search_amount_cred.'"></td>';
|
||||||
|
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -238,8 +238,8 @@ if ($result)
|
|||||||
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'align="left"', $sortfield, $sortorder);
|
||||||
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
if (! empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||||
if (! empty($conf->accounting->enabled)) print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "v.accountancy_code", "", $param, 'align="left"', $sortfield, $sortorder);
|
if (! empty($conf->accounting->enabled)) print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "v.accountancy_code", "", $param, 'align="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "v.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "v.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "v.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "v.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -328,8 +328,8 @@ if ($result)
|
|||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan="'.$colspan.'" class="liste_total">'.$langs->trans("Total").'</td>';
|
print '<td colspan="'.$colspan.'" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||||
print '<td class="liste_total" align="right">'.price($totalarray['totaldeb'])."</td>";
|
print '<td class="liste_total right">'.price($totalarray['totaldeb'])."</td>";
|
||||||
print '<td class="liste_total" align="right">'.price($totalarray['totalcred'])."</td>";
|
print '<td class="liste_total right">'.price($totalarray['totalcred'])."</td>";
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -401,7 +401,7 @@ $parameters=array('arrayfields'=>$arrayfields);
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterButtons();
|
$searchpicto=$form->showFilterButtons();
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -139,10 +139,10 @@ if ($resql)
|
|||||||
// Fields title
|
// Fields title
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($arrayfields['b.rowid']['label'], $_SERVER['PHP_SELF'], 'b.rowid', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['b.rowid']['label'], $_SERVER['PHP_SELF'], 'b.rowid', '', $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($arrayfields['b.dateo']['label'], $_SERVER['PHP_SELF'], 'b.dateo', '', $param, 'align="left"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['b.dateo']['label'], $_SERVER['PHP_SELF'], 'b.dateo', '', $param, 'class="left"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($arrayfields['ba.ref']['label'], $_SERVER['PHP_SELF'], 'ba.ref', '', $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['ba.ref']['label'], $_SERVER['PHP_SELF'], 'ba.ref', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$posconciliatecol = 0;
|
$posconciliatecol = 0;
|
||||||
|
|||||||
@ -123,12 +123,12 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="140px"', $sortfield, $sortorder);
|
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="140px"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pc.rowid", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pc.rowid", "", $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pc.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pc.datep", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($conf->banque->enabled)) print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
if (! empty($conf->banque->enabled)) print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pc.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$sql = "SELECT c.id, c.libelle as lib,";
|
$sql = "SELECT c.id, c.libelle as lib,";
|
||||||
@ -226,12 +226,12 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="3" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||||
print '<td align="right" class="liste_total"></td>'; // A total here has no sense
|
print '<td class="liste_total right"></td>'; // A total here has no sense
|
||||||
print '<td align="center" class="liste_total"> </td>';
|
print '<td align="center" class="liste_total"> </td>';
|
||||||
print '<td align="center" class="liste_total"> </td>';
|
print '<td align="center" class="liste_total"> </td>';
|
||||||
print '<td align="center" class="liste_total"> </td>';
|
print '<td align="center" class="liste_total"> </td>';
|
||||||
if (! empty($conf->banque->enabled)) print '<td></td>';
|
if (! empty($conf->banque->enabled)) print '<td></td>';
|
||||||
print '<td align="right" class="liste_total">'.price($totalpaye)."</td>";
|
print '<td class="liste_total right">'.price($totalpaye)."</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -283,7 +283,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
|||||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($conf->banque->enabled)) print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
if (! empty($conf->banque->enabled)) print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("PayedByThisPayment", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=1;
|
$var=1;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
|
|||||||
@ -483,7 +483,7 @@ elseif ($id)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'classify' && $user->rights->deplacement->creer)
|
if ($action != 'classify' && $user->rights->deplacement->creer)
|
||||||
{
|
{
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&id='.$object->id.'">';
|
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=classify&id='.$object->id.'">';
|
||||||
print img_edit($langs->trans('SetProject'), 1);
|
print img_edit($langs->trans('SetProject'), 1);
|
||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -127,7 +127,7 @@ if ($resql)
|
|||||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.dated", "", "&socid=$socid", 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.dated", "", "&socid=$socid", 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Person", $_SERVER["PHP_SELF"], "u.lastname", "", "&socid=$socid", '', $sortfield, $sortorder);
|
print_liste_field_titre("Person", $_SERVER["PHP_SELF"], "u.lastname", "", "&socid=$socid", '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", "&socid=$socid", '', $sortfield, $sortorder);
|
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", "&socid=$socid", '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("FeesKilometersOrAmout", $_SERVER["PHP_SELF"], "d.km", "", "&socid=$socid", 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("FeesKilometersOrAmout", $_SERVER["PHP_SELF"], "d.km", "", "&socid=$socid", 'class="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -150,10 +150,10 @@ if ($resql)
|
|||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" size="10" type="text" name="search_company" value="'.$search_company.'">';
|
print '<input class="flat" size="10" type="text" name="search_company" value="'.$search_company.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
// print '<input class="flat" size="10" type="text" name="search_amount" value="'.$search_amount.'">';
|
// print '<input class="flat" size="10" type="text" name="search_amount" value="'.$search_amount.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -3735,7 +3735,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('DateInvoice');
|
print $langs->trans('DateInvoice');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $usercancreate && empty($conf->global->FAC_FORCE_DATE_VALIDATION))
|
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $usercancreate && empty($conf->global->FAC_FORCE_DATE_VALIDATION))
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editinvoicedate&facid=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
|
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editinvoicedate&facid=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
|
|
||||||
@ -3759,7 +3759,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('DatePointOfTax');
|
print $langs->trans('DatePointOfTax');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdate_pointoftax&facid=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
|
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdate_pointoftax&facid=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editdate_pointoftax') {
|
if ($action == 'editdate_pointoftax') {
|
||||||
@ -3776,7 +3776,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('PaymentConditionsShort');
|
print $langs->trans('PaymentConditionsShort');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && $usercancreate)
|
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && $usercancreate)
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&facid=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>';
|
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&facid=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($object->type != Facture::TYPE_CREDIT_NOTE)
|
if ($object->type != Facture::TYPE_CREDIT_NOTE)
|
||||||
@ -3797,7 +3797,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('DateMaxPayment');
|
print $langs->trans('DateMaxPayment');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && $usercancreate)
|
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && $usercancreate)
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editpaymentterm&facid=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
|
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editpaymentterm&facid=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($object->type != Facture::TYPE_CREDIT_NOTE)
|
if ($object->type != Facture::TYPE_CREDIT_NOTE)
|
||||||
@ -3821,7 +3821,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('PaymentMode');
|
print $langs->trans('PaymentMode');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editmode' && $usercancreate)
|
if ($action != 'editmode' && $usercancreate)
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&facid=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&facid=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editmode')
|
if ($action == 'editmode')
|
||||||
@ -3844,7 +3844,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
|
print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($usercancreate && $action != 'editmulticurrencycode' && ! empty($object->brouillon))
|
if ($usercancreate && $action != 'editmulticurrencycode' && ! empty($object->brouillon))
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencycode&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencycode&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$htmlname = (($usercancreate && $action == 'editmulticurrencycode')?'multicurrency_code':'none');
|
$htmlname = (($usercancreate && $action == 'editmulticurrencycode')?'multicurrency_code':'none');
|
||||||
@ -3857,7 +3857,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0);
|
print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($usercancreate && $action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
|
if ($usercancreate && $action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') {
|
if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') {
|
||||||
@ -3882,7 +3882,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans('BankAccount');
|
print $langs->trans('BankAccount');
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (($action != 'editbankaccount') && $usercancreate)
|
if (($action != 'editbankaccount') && $usercancreate)
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
|
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editbankaccount')
|
if ($action == 'editbankaccount')
|
||||||
@ -3902,7 +3902,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||||
print $langs->trans('IncotermLabel');
|
print $langs->trans('IncotermLabel');
|
||||||
print '<td><td align="right">';
|
print '<td><td class="right">';
|
||||||
if ($usercancreate) print '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$object->id.'&action=editincoterm">'.img_edit().'</a>';
|
if ($usercancreate) print '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$object->id.'&action=editincoterm">'.img_edit().'</a>';
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
@ -3979,7 +3979,7 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $usercancreate)
|
if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $usercancreate)
|
||||||
{
|
{
|
||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editrevenuestamp&facid=' . $object->id . '">' . img_edit($langs->trans('SetRevenuStamp'), 1) . '</a></td>';
|
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editrevenuestamp&facid=' . $object->id . '">' . img_edit($langs->trans('SetRevenuStamp'), 1) . '</a></td>';
|
||||||
}
|
}
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
@ -4062,9 +4062,9 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<td>' . $langs->trans('ListOfSituationInvoices') . '</td>';
|
print '<td>' . $langs->trans('ListOfSituationInvoices') . '</td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td align="center">' . $langs->trans('Situation') . '</td>';
|
print '<td align="center">' . $langs->trans('Situation') . '</td>';
|
||||||
if (! empty($conf->banque->enabled)) print '<td align="right"></td>';
|
if (! empty($conf->banque->enabled)) print '<td class="right"></td>';
|
||||||
print '<td align="right">' . $langs->trans('AmountHT') . '</td>';
|
print '<td class="right">' . $langs->trans('AmountHT') . '</td>';
|
||||||
print '<td align="right">' . $langs->trans('AmountTTC') . '</td>';
|
print '<td class="right">' . $langs->trans('AmountTTC') . '</td>';
|
||||||
print '<td width="18"> </td>';
|
print '<td width="18"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -4085,10 +4085,10 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<td>' . $prev_invoice->getNomUrl(1) . '</td>';
|
print '<td>' . $prev_invoice->getNomUrl(1) . '</td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td align="center" >'.(($prev_invoice->type == Facture::TYPE_CREDIT_NOTE)?$langs->trans('situationInvoiceShortcode_AS'):$langs->trans('situationInvoiceShortcode_S')) . $prev_invoice->situation_counter.'</td>';
|
print '<td align="center" >'.(($prev_invoice->type == Facture::TYPE_CREDIT_NOTE)?$langs->trans('situationInvoiceShortcode_AS'):$langs->trans('situationInvoiceShortcode_S')) . $prev_invoice->situation_counter.'</td>';
|
||||||
if (! empty($conf->banque->enabled)) print '<td align="right"></td>';
|
if (! empty($conf->banque->enabled)) print '<td class="right"></td>';
|
||||||
print '<td align="right">' . price($prev_invoice->total_ht) . '</td>';
|
print '<td class="right">' . price($prev_invoice->total_ht) . '</td>';
|
||||||
print '<td align="right">' . price($prev_invoice->total_ttc) . '</td>';
|
print '<td class="right">' . price($prev_invoice->total_ttc) . '</td>';
|
||||||
print '<td align="right">' . $prev_invoice->getLibStatut(3, $totalpaye) . '</td>';
|
print '<td class="right">' . $prev_invoice->getLibStatut(3, $totalpaye) . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4103,15 +4103,15 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<td>' . $object->getNomUrl(1) . '</td>';
|
print '<td>' . $object->getNomUrl(1) . '</td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td align="center">'.(($object->type == Facture::TYPE_CREDIT_NOTE)?$langs->trans('situationInvoiceShortcode_AS'):$langs->trans('situationInvoiceShortcode_S')) . $object->situation_counter.'</td>';
|
print '<td align="center">'.(($object->type == Facture::TYPE_CREDIT_NOTE)?$langs->trans('situationInvoiceShortcode_AS'):$langs->trans('situationInvoiceShortcode_S')) . $object->situation_counter.'</td>';
|
||||||
if (! empty($conf->banque->enabled)) print '<td align="right"></td>';
|
if (! empty($conf->banque->enabled)) print '<td class="right"></td>';
|
||||||
print '<td align="right">' . price($object->total_ht) . '</td>';
|
print '<td class="right">' . price($object->total_ht) . '</td>';
|
||||||
print '<td align="right">' . price($object->total_ttc) . '</td>';
|
print '<td class="right">' . price($object->total_ttc) . '</td>';
|
||||||
print '<td align="right">' . $object->getLibStatut(3, $object->getSommePaiement()) . '</td>';
|
print '<td class="right">' . $object->getLibStatut(3, $object->getSommePaiement()) . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td colspan="2" align="left"><b>' . $langs->trans('CurrentSituationTotal') . '</b></td>';
|
print '<td colspan="2" class="left"><b>' . $langs->trans('CurrentSituationTotal') . '</b></td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$i =0;
|
$i =0;
|
||||||
foreach ($current_situation_counter as $sit)
|
foreach ($current_situation_counter as $sit)
|
||||||
@ -4124,8 +4124,8 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! empty($conf->banque->enabled)) print '<td></td>';
|
if (! empty($conf->banque->enabled)) print '<td></td>';
|
||||||
print '<td align="right"><b>' . price($total_global_ht) . '</b></td>';
|
print '<td class="right"><b>' . price($total_global_ht) . '</b></td>';
|
||||||
print '<td align="right"><b>' . price($total_global_ttc) . '</b></td>';
|
print '<td class="right"><b>' . price($total_global_ttc) . '</b></td>';
|
||||||
print '<td width="18"> </td>';
|
print '<td width="18"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -4136,9 +4136,9 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<td>' . $langs->trans('ListOfNextSituationInvoices') . '</td>';
|
print '<td>' . $langs->trans('ListOfNextSituationInvoices') . '</td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
if (! empty($conf->banque->enabled)) print '<td align="right"></td>';
|
if (! empty($conf->banque->enabled)) print '<td class="right"></td>';
|
||||||
print '<td align="right">' . $langs->trans('AmountHT') . '</td>';
|
print '<td class="right">' . $langs->trans('AmountHT') . '</td>';
|
||||||
print '<td align="right">' . $langs->trans('AmountTTC') . '</td>';
|
print '<td class="right">' . $langs->trans('AmountTTC') . '</td>';
|
||||||
print '<td width="18"> </td>';
|
print '<td width="18"> </td>';
|
||||||
print '</tr>';*/
|
print '</tr>';*/
|
||||||
|
|
||||||
@ -4153,10 +4153,10 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<td>' . $next_invoice->getNomUrl(1) . '</td>';
|
print '<td>' . $next_invoice->getNomUrl(1) . '</td>';
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '<td align="center">'.(($next_invoice->type == Facture::TYPE_CREDIT_NOTE)?$langs->trans('situationInvoiceShortcode_AS'):$langs->trans('situationInvoiceShortcode_S')) . $next_invoice->situation_counter.'</td>';
|
print '<td align="center">'.(($next_invoice->type == Facture::TYPE_CREDIT_NOTE)?$langs->trans('situationInvoiceShortcode_AS'):$langs->trans('situationInvoiceShortcode_S')) . $next_invoice->situation_counter.'</td>';
|
||||||
if (! empty($conf->banque->enabled)) print '<td align="right"></td>';
|
if (! empty($conf->banque->enabled)) print '<td class="right"></td>';
|
||||||
print '<td align="right">' . price($next_invoice->total_ht) . '</td>';
|
print '<td class="right">' . price($next_invoice->total_ht) . '</td>';
|
||||||
print '<td align="right">' . price($next_invoice->total_ttc) . '</td>';
|
print '<td class="right">' . price($next_invoice->total_ttc) . '</td>';
|
||||||
print '<td align="right">' . $next_invoice->getLibStatut(3, $totalpaye) . '</td>';
|
print '<td class="right">' . $next_invoice->getLibStatut(3, $totalpaye) . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4164,10 +4164,10 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
$total_global_ttc += $total_next_ttc;
|
$total_global_ttc += $total_next_ttc;
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td colspan="3" align="right"></td>';
|
print '<td colspan="3" class="right"></td>';
|
||||||
if (! empty($conf->banque->enabled)) print '<td align="right"></td>';
|
if (! empty($conf->banque->enabled)) print '<td class="right"></td>';
|
||||||
print '<td align="right"><b>' . price($total_global_ht) . '</b></td>';
|
print '<td class="right"><b>' . price($total_global_ht) . '</b></td>';
|
||||||
print '<td align="right"><b>' . price($total_global_ttc) . '</b></td>';
|
print '<td class="right"><b>' . price($total_global_ttc) . '</b></td>';
|
||||||
print '<td width="18"> </td>';
|
print '<td width="18"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@ -4186,9 +4186,9 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<td class="liste_titre">' . $langs->trans('Date') . '</td>';
|
print '<td class="liste_titre">' . $langs->trans('Date') . '</td>';
|
||||||
print '<td class="liste_titre">' . $langs->trans('Type') . '</td>';
|
print '<td class="liste_titre">' . $langs->trans('Type') . '</td>';
|
||||||
if (! empty($conf->banque->enabled)) {
|
if (! empty($conf->banque->enabled)) {
|
||||||
print '<td class="liste_titre" align="right">' . $langs->trans('BankAccount') . '</td>';
|
print '<td class="liste_titre right">' . $langs->trans('BankAccount') . '</td>';
|
||||||
}
|
}
|
||||||
print '<td class="liste_titre" align="right">' . $langs->trans('Amount') . '</td>';
|
print '<td class="liste_titre right">' . $langs->trans('Amount') . '</td>';
|
||||||
print '<td class="liste_titre" width="18"> </td>';
|
print '<td class="liste_titre" width="18"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -4243,12 +4243,12 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
$bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
$bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
if ($bankaccountstatic->id)
|
if ($bankaccountstatic->id)
|
||||||
print $bankaccountstatic->getNomUrl(1, 'transactions');
|
print $bankaccountstatic->getNomUrl(1, 'transactions');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">' . price($sign * $objp->amount) . '</td>';
|
print '<td class="right">' . price($sign * $objp->amount) . '</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
@ -4272,12 +4272,12 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
if ($object->type != Facture::TYPE_CREDIT_NOTE) {
|
if ($object->type != Facture::TYPE_CREDIT_NOTE) {
|
||||||
// Total already paid
|
// Total already paid
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||||
if ($object->type != Facture::TYPE_DEPOSIT)
|
if ($object->type != Facture::TYPE_DEPOSIT)
|
||||||
print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits');
|
print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits');
|
||||||
else
|
else
|
||||||
print $langs->trans('AlreadyPaid');
|
print $langs->trans('AlreadyPaid');
|
||||||
print ' :</td><td align="right"'.(($totalpaye > 0)?' class="amountalreadypaid"':'').'>' . price($totalpaye) . '</td><td> </td></tr>';
|
print ' :</td><td class="right"'.(($totalpaye > 0)?' class="amountalreadypaid"':'').'>' . price($totalpaye) . '</td><td> </td></tr>';
|
||||||
|
|
||||||
$resteapayeraffiche = $resteapayer;
|
$resteapayeraffiche = $resteapayer;
|
||||||
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
||||||
@ -4297,15 +4297,15 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$invoice->fetch($obj->fk_facture_source);
|
$invoice->fetch($obj->fk_facture_source);
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||||
if ($invoice->type == Facture::TYPE_CREDIT_NOTE)
|
if ($invoice->type == Facture::TYPE_CREDIT_NOTE)
|
||||||
print $langs->trans("CreditNote") . ' ';
|
print $langs->trans("CreditNote") . ' ';
|
||||||
if ($invoice->type == Facture::TYPE_DEPOSIT)
|
if ($invoice->type == Facture::TYPE_DEPOSIT)
|
||||||
print $langs->trans("Deposit") . ' ';
|
print $langs->trans("Deposit") . ' ';
|
||||||
print $invoice->getNomUrl(0);
|
print $invoice->getNomUrl(0);
|
||||||
print ' :</td>';
|
print ' :</td>';
|
||||||
print '<td align="right">' . price($obj->amount_ttc) . '</td>';
|
print '<td class="right">' . price($obj->amount_ttc) . '</td>';
|
||||||
print '<td align="right">';
|
print '<td class="right">';
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&action=unlinkdiscount&discountid=' . $obj->rowid . '">' . img_delete() . '</a>';
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&action=unlinkdiscount&discountid=' . $obj->rowid . '">' . img_delete() . '</a>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
$i ++;
|
$i ++;
|
||||||
@ -4320,51 +4320,51 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Paye partiellement 'escompte'
|
// Paye partiellement 'escompte'
|
||||||
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'discount_vat') {
|
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'discount_vat') {
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
|
print '<tr><td colspan="' . $nbcols . '" class="nowrap right">';
|
||||||
print $form->textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1);
|
print $form->textwithpicto($langs->trans("Discount") . ':', $langs->trans("HelpEscompte"), - 1);
|
||||||
print '</td><td align="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td> </td></tr>';
|
print '</td><td class="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td> </td></tr>';
|
||||||
$resteapayeraffiche = 0;
|
$resteapayeraffiche = 0;
|
||||||
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
||||||
}
|
}
|
||||||
// Paye partiellement ou Abandon 'badcustomer'
|
// Paye partiellement ou Abandon 'badcustomer'
|
||||||
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') {
|
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'badcustomer') {
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
|
print '<tr><td colspan="' . $nbcols . '" class="nowrap right">';
|
||||||
print $form->textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1);
|
print $form->textwithpicto($langs->trans("Abandoned") . ':', $langs->trans("HelpAbandonBadCustomer"), - 1);
|
||||||
print '</td><td align="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td> </td></tr>';
|
print '</td><td class="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td> </td></tr>';
|
||||||
// $resteapayeraffiche=0;
|
// $resteapayeraffiche=0;
|
||||||
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
||||||
}
|
}
|
||||||
// Paye partiellement ou Abandon 'product_returned'
|
// Paye partiellement ou Abandon 'product_returned'
|
||||||
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') {
|
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'product_returned') {
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
|
print '<tr><td colspan="' . $nbcols . '" class="nowrap right">';
|
||||||
print $form->textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1);
|
print $form->textwithpicto($langs->trans("ProductReturned") . ':', $langs->trans("HelpAbandonProductReturned"), - 1);
|
||||||
print '</td><td align="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td> </td></tr>';
|
print '</td><td class="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td> </td></tr>';
|
||||||
$resteapayeraffiche = 0;
|
$resteapayeraffiche = 0;
|
||||||
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
||||||
}
|
}
|
||||||
// Paye partiellement ou Abandon 'abandon'
|
// Paye partiellement ou Abandon 'abandon'
|
||||||
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'abandon') {
|
if (($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED) && $object->close_code == 'abandon') {
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right" class="nowrap">';
|
print '<tr><td colspan="' . $nbcols . '" class="nowrap right">';
|
||||||
$text = $langs->trans("HelpAbandonOther");
|
$text = $langs->trans("HelpAbandonOther");
|
||||||
if ($object->close_note)
|
if ($object->close_note)
|
||||||
$text .= '<br><br><b>' . $langs->trans("Reason") . '</b>:' . $object->close_note;
|
$text .= '<br><br><b>' . $langs->trans("Reason") . '</b>:' . $object->close_note;
|
||||||
print $form->textwithpicto($langs->trans("Abandoned") . ':', $text, - 1);
|
print $form->textwithpicto($langs->trans("Abandoned") . ':', $text, - 1);
|
||||||
print '</td><td align="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td> </td></tr>';
|
print '</td><td class="right">' . price(price2num($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye, 'MT')) . '</td><td> </td></tr>';
|
||||||
$resteapayeraffiche = 0;
|
$resteapayeraffiche = 0;
|
||||||
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
$cssforamountpaymentcomplete = 'amountpaymentneutral';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Billed
|
// Billed
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right">' . $langs->trans("Billed") . ' :</td><td align="right">' . price($object->total_ttc) . '</td><td> </td></tr>';
|
print '<tr><td colspan="' . $nbcols . '" class="right">' . $langs->trans("Billed") . ' :</td><td class="right">' . price($object->total_ttc) . '</td><td> </td></tr>';
|
||||||
|
|
||||||
// Remainder to pay
|
// Remainder to pay
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||||
if ($resteapayeraffiche >= 0)
|
if ($resteapayeraffiche >= 0)
|
||||||
print $langs->trans('RemainderToPay');
|
print $langs->trans('RemainderToPay');
|
||||||
else
|
else
|
||||||
print $langs->trans('ExcessReceived');
|
print $langs->trans('ExcessReceived');
|
||||||
print ' :</td>';
|
print ' :</td>';
|
||||||
print '<td align="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($resteapayeraffiche) . '</td>';
|
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($resteapayeraffiche) . '</td>';
|
||||||
print '<td class="nowrap"> </td></tr>';
|
print '<td class="nowrap"> </td></tr>';
|
||||||
}
|
}
|
||||||
else // Credit note
|
else // Credit note
|
||||||
@ -4372,26 +4372,26 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
$cssforamountpaymentcomplete='amountpaymentneutral';
|
$cssforamountpaymentcomplete='amountpaymentneutral';
|
||||||
|
|
||||||
// Total already paid back
|
// Total already paid back
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||||
print $langs->trans('AlreadyPaidBack');
|
print $langs->trans('AlreadyPaidBack');
|
||||||
print ' :</td><td align="right">' . price($sign * $totalpaye) . '</td><td> </td></tr>';
|
print ' :</td><td class="right">' . price($sign * $totalpaye) . '</td><td> </td></tr>';
|
||||||
|
|
||||||
// Billed
|
// Billed
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right">' . $langs->trans("Billed") . ' :</td><td align="right">' . price($sign * $object->total_ttc) . '</td><td> </td></tr>';
|
print '<tr><td colspan="' . $nbcols . '" class="right">' . $langs->trans("Billed") . ' :</td><td class="right">' . price($sign * $object->total_ttc) . '</td><td> </td></tr>';
|
||||||
|
|
||||||
// Remainder to pay back
|
// Remainder to pay back
|
||||||
print '<tr><td colspan="' . $nbcols . '" align="right">';
|
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||||
if ($resteapayeraffiche <= 0)
|
if ($resteapayeraffiche <= 0)
|
||||||
print $langs->trans('RemainderToPayBack');
|
print $langs->trans('RemainderToPayBack');
|
||||||
else
|
else
|
||||||
print $langs->trans('ExcessPaid');
|
print $langs->trans('ExcessPaid');
|
||||||
print ' :</td>';
|
print ' :</td>';
|
||||||
print '<td align="right"'.($resteapayeraffiche?' class="amountremaintopayback"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($sign * $resteapayeraffiche) . '</td>';
|
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopayback"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($sign * $resteapayeraffiche) . '</td>';
|
||||||
print '<td class="nowrap"> </td></tr>';
|
print '<td class="nowrap"> </td></tr>';
|
||||||
|
|
||||||
// Sold credit note
|
// Sold credit note
|
||||||
// print '<tr><td colspan="'.$nbcols.'" align="right">'.$langs->trans('TotalTTC').' :</td>';
|
// print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans('TotalTTC').' :</td>';
|
||||||
// print '<td align="right" style="border: 1px solid;" bgcolor="#f0f0f0"><b>'.price($sign *
|
// print '<td class="right" style="border: 1px solid;" bgcolor="#f0f0f0"><b>'.price($sign *
|
||||||
// $object->total_ttc).'</b></td><td> </td></tr>';
|
// $object->total_ttc).'</b></td><td> </td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4444,20 +4444,20 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="center" width="5"> </td>';
|
print '<td align="center" width="5"> </td>';
|
||||||
}
|
}
|
||||||
print '<td>' . $langs->trans('ModifyAllLines') . '</td>';
|
print '<td>' . $langs->trans('ModifyAllLines') . '</td>';
|
||||||
print '<td align="right" width="50"> </td>';
|
print '<td class="right" width="50"> </td>';
|
||||||
print '<td align="right" width="80"> </td>';
|
print '<td class="right" width="80"> </td>';
|
||||||
if ($inputalsopricewithtax) print '<td align="right" width="80"> </td>';
|
if ($inputalsopricewithtax) print '<td class="right" width="80"> </td>';
|
||||||
print '<td align="right" width="50"> </td>';
|
print '<td class="right" width="50"> </td>';
|
||||||
print '<td align="right" width="50"> </td>';
|
print '<td class="right" width="50"> </td>';
|
||||||
print '<td align="right" width="50">' . $langs->trans('Progress') . '</td>';
|
print '<td class="right" width="50">' . $langs->trans('Progress') . '</td>';
|
||||||
if (! empty($conf->margin->enabled) && empty($user->societe_id))
|
if (! empty($conf->margin->enabled) && empty($user->societe_id))
|
||||||
{
|
{
|
||||||
print '<td align="right" class="margininfos" width="80"> </td>';
|
print '<td class="margininfos right" width="80"> </td>';
|
||||||
if ((! empty($conf->global->DISPLAY_MARGIN_RATES) || ! empty($conf->global->DISPLAY_MARK_RATES)) && $usercanreadallmargin) {
|
if ((! empty($conf->global->DISPLAY_MARGIN_RATES) || ! empty($conf->global->DISPLAY_MARK_RATES)) && $usercanreadallmargin) {
|
||||||
print '<td align="right" class="margininfos" width="50"> </td>';
|
print '<td class="margininfos right" width="50"> </td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '<td align="right" width="50"> </td>';
|
print '<td class="right" width="50"> </td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td width="10"> </td>';
|
print '<td width="10"> </td>';
|
||||||
print '<td width="10"> </td>';
|
print '<td width="10"> </td>';
|
||||||
@ -4473,8 +4473,8 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
print '<td width="80"> </td>';
|
print '<td width="80"> </td>';
|
||||||
print '<td width="50"> </td>';
|
print '<td width="50"> </td>';
|
||||||
print '<td width="50"> </td>';
|
print '<td width="50"> </td>';
|
||||||
print '<td align="right" class="nowrap"><input type="text" size="1" value="" name="all_progress">%</td>';
|
print '<td class="nowrap right"><input type="text" size="1" value="" name="all_progress">%</td>';
|
||||||
print '<td colspan="4" align="right"><input class="button" type="submit" name="all_percent" value="Modifier" /></td>';
|
print '<td colspan="4" class="right"><input class="button" type="submit" name="all_percent" value="Modifier" /></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -284,12 +284,12 @@ print '<div class="div-table-responsive-no-min">';
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre" height="24">';
|
print '<tr class="liste_titre" height="24">';
|
||||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("NumberOfBills").'</td>';
|
print '<td class="right">'.$langs->trans("NumberOfBills").'</td>';
|
||||||
print '<td align="right">%</td>';
|
print '<td class="right">%</td>';
|
||||||
print '<td align="right">'.$langs->trans("AmountTotal").'</td>';
|
print '<td class="right">'.$langs->trans("AmountTotal").'</td>';
|
||||||
print '<td align="right">%</td>';
|
print '<td class="right">%</td>';
|
||||||
print '<td align="right">'.$langs->trans("AmountAverage").'</td>';
|
print '<td class="right">'.$langs->trans("AmountAverage").'</td>';
|
||||||
print '<td align="right">%</td>';
|
print '<td class="right">%</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$oldyear=0;
|
$oldyear=0;
|
||||||
@ -302,23 +302,23 @@ foreach ($data as $val)
|
|||||||
|
|
||||||
print '<tr class="oddeven" height="24">';
|
print '<tr class="oddeven" height="24">';
|
||||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
|
||||||
print '<td align="right">0</td>';
|
print '<td class="right">0</td>';
|
||||||
print '<td align="right"></td>';
|
print '<td class="right"></td>';
|
||||||
print '<td align="right">0</td>';
|
print '<td class="right">0</td>';
|
||||||
print '<td align="right"></td>';
|
print '<td class="right"></td>';
|
||||||
print '<td align="right">0</td>';
|
print '<td class="right">0</td>';
|
||||||
print '<td align="right"></td>';
|
print '<td class="right"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven" height="24">';
|
print '<tr class="oddeven" height="24">';
|
||||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||||
print '<td align="right">'.$val['nb'].'</td>';
|
print '<td class="right">'.$val['nb'].'</td>';
|
||||||
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
print '<td class="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
|
||||||
print '<td align="right" style="'.(($val['total_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['total_diff']).'</td>';
|
print '<td class="right" style="'.(($val['total_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['total_diff']).'</td>';
|
||||||
print '<td align="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
|
||||||
print '<td align="right" style="'.(($val['avg_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['avg_diff']).'</td>';
|
print '<td class="right" style="'.(($val['avg_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['avg_diff']).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$oldyear=$year;
|
$oldyear=$year;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
<td class="linkedcol-name"><?php echo $objectlink->getNomUrl(1); ?></td>
|
<td class="linkedcol-name"><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td class="linkedcol-ref" align="center"><?php echo $objectlink->ref_client; ?></td>
|
<td class="linkedcol-ref" align="center"><?php echo $objectlink->ref_client; ?></td>
|
||||||
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
||||||
<td class="linkedcol-amount" align="right"><?php
|
<td class="linkedcol-amount right"><?php
|
||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
$sign = 1;
|
$sign = 1;
|
||||||
if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = -1;
|
if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = -1;
|
||||||
@ -65,8 +65,8 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
echo '<strike>'.price($objectlink->total_ht).'</strike>';
|
echo '<strike>'.price($objectlink->total_ht).'</strike>';
|
||||||
}
|
}
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td class="linkedcol-statut" align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
<td class="linkedcol-action" align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
<td class="linkedcol-action right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -78,9 +78,9 @@ if (count($linkedObjectBlock) > 1)
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td align="center"></td>
|
<td align="center"></td>
|
||||||
<td align="center"></td>
|
<td align="center"></td>
|
||||||
<td align="right"><?php echo price($total); ?></td>
|
<td class="right"><?php echo price($total); ?></td>
|
||||||
<td align="right"></td>
|
<td class="right"></td>
|
||||||
<td align="right"></td>
|
<td class="right"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,13 +51,13 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
<td class="linkedcol-name"><?php echo $objectlink->getNomUrl(1); ?></td>
|
<td class="linkedcol-name"><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td class="linkedcol-ref" align="center"></td>
|
<td class="linkedcol-ref" align="center"></td>
|
||||||
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date_when, 'day'); ?></td>
|
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date_when, 'day'); ?></td>
|
||||||
<td class="linkedcol-amount" align="right"><?php
|
<td class="linkedcol-amount right"><?php
|
||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
$total = $total + $objectlink->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td class="linkedcol-statut" align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
<td class="linkedcol-action" align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
<td class="linkedcol-action right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -69,9 +69,9 @@ if (count($linkedObjectBlock) > 1)
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td align="center"></td>
|
<td align="center"></td>
|
||||||
<td align="center"></td>
|
<td align="center"></td>
|
||||||
<td align="right"><?php echo price($total); ?></td>
|
<td class="right"><?php echo price($total); ?></td>
|
||||||
<td align="right"></td>
|
<td class="right"></td>
|
||||||
<td align="right"></td>
|
<td class="right"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,10 +66,8 @@ print '<tr class="liste_titre">';
|
|||||||
print '<th colspan="2">'.$langs->trans("BankChecks")."</th>\n";
|
print '<th colspan="2">'.$langs->trans("BankChecks")."</th>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($resql)
|
if ($resql) {
|
||||||
{
|
if ($row = $db->fetch_row($resql) ) {
|
||||||
if ($row = $db->fetch_row($resql) )
|
|
||||||
{
|
|
||||||
$num = $row[0];
|
$num = $row[0];
|
||||||
}
|
}
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|||||||
@ -302,7 +302,7 @@ print_liste_field_titre(
|
|||||||
"",
|
"",
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
if ($modecompta == 'CREANCES-DETTES') {
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
print_liste_field_titre(
|
print_liste_field_titre(
|
||||||
$langs->trans('AmountHT'),
|
$langs->trans('AmountHT'),
|
||||||
@ -314,7 +314,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
}
|
}
|
||||||
print_liste_field_titre(
|
print_liste_field_titre(
|
||||||
@ -326,7 +326,7 @@ print_liste_field_titre(
|
|||||||
'align="right"',
|
'align="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
print_liste_field_titre(
|
print_liste_field_titre(
|
||||||
$langs->trans("Percentage"),
|
$langs->trans("Percentage"),
|
||||||
$_SERVER["PHP_SELF"], "amount_ttc",
|
$_SERVER["PHP_SELF"], "amount_ttc",
|
||||||
@ -335,7 +335,7 @@ print_liste_field_titre(
|
|||||||
'align="right"',
|
'align="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
print_liste_field_titre(
|
print_liste_field_titre(
|
||||||
$langs->trans("OtherStatistics"),
|
$langs->trans("OtherStatistics"),
|
||||||
$_SERVER["PHP_SELF"],
|
$_SERVER["PHP_SELF"],
|
||||||
@ -343,7 +343,7 @@ print_liste_field_titre(
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
'align="center" width="20%"'
|
'align="center" width="20%"'
|
||||||
);
|
);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if (count($amount)) {
|
if (count($amount)) {
|
||||||
|
|||||||
@ -452,7 +452,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
}
|
}
|
||||||
print_liste_field_titre(
|
print_liste_field_titre(
|
||||||
@ -464,7 +464,7 @@ print_liste_field_titre(
|
|||||||
'align="right"',
|
'align="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
print_liste_field_titre(
|
print_liste_field_titre(
|
||||||
$langs->trans("Percentage"),
|
$langs->trans("Percentage"),
|
||||||
$_SERVER["PHP_SELF"],
|
$_SERVER["PHP_SELF"],
|
||||||
@ -474,7 +474,7 @@ print_liste_field_titre(
|
|||||||
'align="right"',
|
'align="right"',
|
||||||
$sortfield,
|
$sortfield,
|
||||||
$sortorder
|
$sortorder
|
||||||
);
|
);
|
||||||
print_liste_field_titre(
|
print_liste_field_titre(
|
||||||
$langs->trans("OtherStatistics"),
|
$langs->trans("OtherStatistics"),
|
||||||
$_SERVER["PHP_SELF"],
|
$_SERVER["PHP_SELF"],
|
||||||
@ -482,7 +482,7 @@ print_liste_field_titre(
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
'align="center" width="20%"'
|
'align="center" width="20%"'
|
||||||
);
|
);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1010,7 +1010,8 @@ class Contact extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Removed extrafields
|
// Removed extrafields
|
||||||
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) { // For avoid conflicts if trigger used
|
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) {
|
||||||
|
// For avoid conflicts if trigger used
|
||||||
$result=$this->deleteExtraFields($this);
|
$result=$this->deleteExtraFields($this);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -220,7 +220,7 @@ class Contracts extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
function getLines($id)
|
function getLines($id)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->contrat->lire) {
|
if (! DolibarrApiAccess::$user->rights->contrat->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -367,6 +367,8 @@ abstract class CommonDocGenerator
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sumpayed=$sumdeposit=$sumcreditnote='';
|
$sumpayed=$sumdeposit=$sumcreditnote='';
|
||||||
|
$already_payed_all=0;
|
||||||
|
$remain_to_pay=0;
|
||||||
if ($object->element == 'facture')
|
if ($object->element == 'facture')
|
||||||
{
|
{
|
||||||
$invoice_source=new Facture($this->db);
|
$invoice_source=new Facture($this->db);
|
||||||
@ -377,6 +379,8 @@ abstract class CommonDocGenerator
|
|||||||
$sumpayed = $object->getSommePaiement();
|
$sumpayed = $object->getSommePaiement();
|
||||||
$sumdeposit = $object->getSumDepositsUsed();
|
$sumdeposit = $object->getSumDepositsUsed();
|
||||||
$sumcreditnote = $object->getSumCreditNotesUsed();
|
$sumcreditnote = $object->getSumCreditNotesUsed();
|
||||||
|
$already_payed_all=$sumpayed + $sumdeposit + $sumcreditnote;
|
||||||
|
$remain_to_pay=$sumpayed - $sumdeposit - $sumcreditnote;
|
||||||
}
|
}
|
||||||
|
|
||||||
$date = ($object->element == 'contrat' ? $object->date_contrat : $object->date);
|
$date = ($object->element == 'contrat' ? $object->date_contrat : $object->date);
|
||||||
@ -438,12 +442,12 @@ abstract class CommonDocGenerator
|
|||||||
$array_key.'_already_creditnote_locale'=>price($sumcreditnote, 0, $outputlangs),
|
$array_key.'_already_creditnote_locale'=>price($sumcreditnote, 0, $outputlangs),
|
||||||
$array_key.'_already_creditnote'=>price2num($sumcreditnote),
|
$array_key.'_already_creditnote'=>price2num($sumcreditnote),
|
||||||
|
|
||||||
$array_key.'_already_payed_all_locale'=>price(price2num($sumpayed + $sumdeposit + $sumcreditnote, 'MT'), 0, $outputlangs),
|
$array_key.'_already_payed_all_locale'=>price(price2num($already_payed_all, 'MT'), 0, $outputlangs),
|
||||||
$array_key.'_already_payed_all'=> price2num(($sumpayed + $sumdeposit + $sumcreditnote), 'MT'),
|
$array_key.'_already_payed_all'=> price2num($already_payed_all, 'MT'),
|
||||||
|
|
||||||
// Remain to pay with all know infrmation (except open direct debit requests)
|
// Remain to pay with all know infrmation (except open direct debit requests)
|
||||||
$array_key.'_remain_to_pay_locale'=>price(price2num($object->total_ttc - $sumpayed - $sumdeposit - $sumcreditnote, 'MT'), 0, $outputlangs),
|
$array_key.'_remain_to_pay_locale'=>price(price2num($object->total_ttc - $remain_to_pay, 'MT'), 0, $outputlangs),
|
||||||
$array_key.'_remain_to_pay'=>price2num($object->total_ttc - $sumpayed - $sumdeposit - $sumcreditnote, 'MT')
|
$array_key.'_remain_to_pay'=>price2num($object->total_ttc - $remain_to_pay, 'MT')
|
||||||
);
|
);
|
||||||
|
|
||||||
if (method_exists($object, 'getTotalDiscount')) {
|
if (method_exists($object, 'getTotalDiscount')) {
|
||||||
|
|||||||
@ -5434,8 +5434,7 @@ abstract class CommonObject
|
|||||||
elseif (in_array($type, array('int','integer','price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type))
|
elseif (in_array($type, array('int','integer','price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type))
|
||||||
{
|
{
|
||||||
$morecss = 'maxwidth75';
|
$morecss = 'maxwidth75';
|
||||||
}elseif ($type == 'url')
|
} elseif ($type == 'url') {
|
||||||
{
|
|
||||||
$morecss='minwidth400';
|
$morecss='minwidth400';
|
||||||
}
|
}
|
||||||
elseif ($type == 'boolean')
|
elseif ($type == 'boolean')
|
||||||
|
|||||||
@ -1470,7 +1470,7 @@ class Form
|
|||||||
$contactstatic->id=$obj->rowid;
|
$contactstatic->id=$obj->rowid;
|
||||||
$contactstatic->lastname=$obj->lastname;
|
$contactstatic->lastname=$obj->lastname;
|
||||||
$contactstatic->firstname=$obj->firstname;
|
$contactstatic->firstname=$obj->firstname;
|
||||||
if ($obj->statut == 1){
|
if ($obj->statut == 1) {
|
||||||
if ($htmlname != 'none')
|
if ($htmlname != 'none')
|
||||||
{
|
{
|
||||||
$disabled=0;
|
$disabled=0;
|
||||||
|
|||||||
@ -888,4 +888,55 @@ class FormCompany
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a HTML select for thirdparty type
|
||||||
|
*
|
||||||
|
* @param int $selected selected value
|
||||||
|
* @param string $htmlname HTML select name
|
||||||
|
* @param string $htmlidname HTML select id
|
||||||
|
* @param string $typeinput HTML output
|
||||||
|
* @param string $morecss More css
|
||||||
|
* @return string HTML string
|
||||||
|
*/
|
||||||
|
function selectProspectCustomerType($selected, $htmlname = 'client', $htmlidname = 'customerprospect', $typeinput = 'form', $morecss = '')
|
||||||
|
{
|
||||||
|
|
||||||
|
global $conf,$langs;
|
||||||
|
|
||||||
|
$out = '<select class="flat '.$morecss.'" name="'.$htmlname.'" id="'.$htmlidname.'">';
|
||||||
|
if ($typeinput=='form') {
|
||||||
|
if ($selected == '') $out .= '<option value="-1"> </option>';
|
||||||
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
|
||||||
|
$out .= '<option value="2"'.($selected==2?' selected':'').'>'.$langs->trans('Prospect').'</option>';
|
||||||
|
}
|
||||||
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) {
|
||||||
|
$out .= '<option value="3"'.($selected==3?' selected':'').'>'.$langs->trans('ProspectCustomer').'</option>';
|
||||||
|
}
|
||||||
|
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
|
||||||
|
$out .= '<option value="1"'.($selected==1?' selected':'').'>'.$langs->trans('Customer').'</option>';
|
||||||
|
}
|
||||||
|
$out .= '<option value="0"'.((string) $selected == '0'?' selected':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
|
||||||
|
} elseif ($typeinput=='list') {
|
||||||
|
$out .= '<option value="-1"'.($selected==''?' selected':'').'> </option>';
|
||||||
|
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
|
||||||
|
$out .= '<option value="1,3"'.($selected=='1,3'?' selected':'').'>'.$langs->trans('Customer').'</option>';
|
||||||
|
}
|
||||||
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
|
||||||
|
$out .= '<option value="2,3"'.($selected=='2,3'?' selected':'').'>'.$langs->trans('Prospect').'</option>';
|
||||||
|
}
|
||||||
|
$out .= '<option value="4"'.($selected=='4'?' selected':'').'>'.$langs->trans('Supplier').'</option>';
|
||||||
|
$out .= '<option value="0"'.($selected=='0'?' selected':'').'>'.$langs->trans('Others').'</option>';
|
||||||
|
} elseif ($typeinput=='admin') {
|
||||||
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) {
|
||||||
|
$out .= '<option value="3"'.($selected==3?' selected':'').'>'.$langs->trans('ProspectCustomer').'</option>';
|
||||||
|
}
|
||||||
|
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
|
||||||
|
$out .= '<option value="1"'.($selected==1?' selected':'').'>'.$langs->trans('Customer').'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$out .= '</select>';
|
||||||
|
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -152,6 +152,8 @@ class DoliDBPgsql extends DoliDB
|
|||||||
*/
|
*/
|
||||||
static function convertSQLFromMysql($line, $type = 'auto', $unescapeslashquot = false)
|
static function convertSQLFromMysql($line, $type = 'auto', $unescapeslashquot = false)
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
// Removed empty line if this is a comment line for SVN tagging
|
// Removed empty line if this is a comment line for SVN tagging
|
||||||
if (preg_match('/^--\s\$Id/i', $line)) {
|
if (preg_match('/^--\s\$Id/i', $line)) {
|
||||||
return '';
|
return '';
|
||||||
@ -311,7 +313,14 @@ class DoliDBPgsql extends DoliDB
|
|||||||
}
|
}
|
||||||
|
|
||||||
// To have postgresql case sensitive
|
// To have postgresql case sensitive
|
||||||
$line=str_replace(' LIKE \'', ' ILIKE \'', $line);
|
$count_like=0;
|
||||||
|
$line=str_replace(' LIKE \'', ' ILIKE \'', $line, $count_like);
|
||||||
|
if (!empty($conf->global->PSQL_USE_UNACCENT) && $count_like > 0)
|
||||||
|
{
|
||||||
|
// @see https://docs.postgresql.fr/11/unaccent.html : 'unaccent()' function must be installed before
|
||||||
|
$line=preg_replace('/\s+(\(+\s*)([a-zA-Z0-9\-\_\.]+) ILIKE /', ' \1unaccent(\2) ILIKE ', $line);
|
||||||
|
}
|
||||||
|
|
||||||
$line=str_replace(' LIKE BINARY \'', ' LIKE \'', $line);
|
$line=str_replace(' LIKE BINARY \'', ' LIKE \'', $line);
|
||||||
|
|
||||||
// Replace INSERT IGNORE into INSERT
|
// Replace INSERT IGNORE into INSERT
|
||||||
|
|||||||
@ -1403,8 +1403,7 @@ class DoliDBSqlite3 extends DoliDB
|
|||||||
$weekday=self::calc_weekday($first_daynr, !$monday_first);
|
$weekday=self::calc_weekday($first_daynr, !$monday_first);
|
||||||
$calc_year=$year;
|
$calc_year=$year;
|
||||||
|
|
||||||
if ($month == 1 && $day <= 7-$weekday)
|
if ($month == 1 && $day <= 7-$weekday) {
|
||||||
{
|
|
||||||
if (!$week_year && (($first_weekday && $weekday != 0) || (!$first_weekday && $weekday >= 4)))
|
if (!$week_year && (($first_weekday && $weekday != 0) || (!$first_weekday && $weekday >= 4)))
|
||||||
return 0;
|
return 0;
|
||||||
$week_year= 1;
|
$week_year= 1;
|
||||||
@ -1415,16 +1414,13 @@ class DoliDBSqlite3 extends DoliDB
|
|||||||
|
|
||||||
if (($first_weekday && $weekday != 0) || (!$first_weekday && $weekday >= 4)) {
|
if (($first_weekday && $weekday != 0) || (!$first_weekday && $weekday >= 4)) {
|
||||||
$days= $daynr - ($first_daynr+ (7-$weekday));
|
$days= $daynr - ($first_daynr+ (7-$weekday));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$days= $daynr - ($first_daynr - $weekday);
|
$days= $daynr - ($first_daynr - $weekday);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($week_year && $days >= 52*7)
|
if ($week_year && $days >= 52*7) {
|
||||||
{
|
|
||||||
$weekday= ($weekday + self::calc_days_in_year($calc_year)) % 7;
|
$weekday= ($weekday + self::calc_days_in_year($calc_year)) % 7;
|
||||||
if ((!$first_weekday && $weekday < 4) || ($first_weekday && $weekday == 0))
|
if ((!$first_weekday && $weekday < 4) || ($first_weekday && $weekday == 0)) {
|
||||||
{
|
|
||||||
$calc_year++;
|
$calc_year++;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1469,7 +1469,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing.
|
// Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing.
|
||||||
if (! empty($conf->mailing->enabled) && ! empty($objcon->email) && (empty($actioncode) || $actioncode == 'AC_OTH_AUTO' || $actioncode == 'AC_EMAILING'))
|
if (! empty($conf->mailing->enabled) && ! empty($objcon->email))
|
||||||
{
|
{
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
|
|
||||||
|
|||||||
@ -2367,7 +2367,8 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif (strtoupper($countrycode) == "MU")
|
elseif (strtoupper($countrycode) == "MU")
|
||||||
{//Maurice
|
{
|
||||||
|
//Maurice
|
||||||
if(dol_strlen($phone) == 11)
|
if(dol_strlen($phone) == 11)
|
||||||
{//ex: +230_ABC_DE_FG
|
{//ex: +230_ABC_DE_FG
|
||||||
$newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2);
|
$newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2);
|
||||||
@ -2514,9 +2515,11 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif(strtoupper($countrycode) == "AU")
|
elseif(strtoupper($countrycode) == "AU")
|
||||||
{//Australie
|
{
|
||||||
|
//Australie
|
||||||
if(dol_strlen($phone) == 12)
|
if(dol_strlen($phone) == 12)
|
||||||
{//ex: +61_A_BCDE_FGHI
|
{
|
||||||
|
//ex: +61_A_BCDE_FGHI
|
||||||
$newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 1).$separ.substr($newphone, 4, 4).$separ.substr($newphone, 8, 4);
|
$newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 1).$separ.substr($newphone, 4, 4).$separ.substr($newphone, 8, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5887,10 +5890,10 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
$substitutionarray['__REF__'] = $object->ref;
|
$substitutionarray['__REF__'] = $object->ref;
|
||||||
$substitutionarray['__REF_CLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null));
|
$substitutionarray['__REF_CLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null));
|
||||||
$substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
|
$substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
|
||||||
|
$substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs): '');
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
$substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null));
|
$substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null));
|
||||||
$substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
|
$substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
|
||||||
$substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs): '');
|
|
||||||
|
|
||||||
// TODO Remove this
|
// TODO Remove this
|
||||||
$msgishtml = 0;
|
$msgishtml = 0;
|
||||||
@ -7085,7 +7088,7 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type,
|
|||||||
}
|
}
|
||||||
elseif (count($values) == 5) // deprecated
|
elseif (count($values) == 5) // deprecated
|
||||||
{
|
{
|
||||||
dol_syslog('Passing 5 values in tabs module_parts is deprecated. Please update to 6 with permissions.', LOG_WARNING);
|
dol_syslog('Passing 5 values in tabs module_parts is deprecated. Please update to 6 with permissions.', LOG_WARNING);
|
||||||
|
|
||||||
if ($values[0] != $type) continue;
|
if ($values[0] != $type) continue;
|
||||||
if ($values[3]) $langs->load($values[3]);
|
if ($values[3]) $langs->load($values[3]);
|
||||||
|
|||||||
@ -667,6 +667,10 @@ function dolSavePageContent($filetpl, $object, $objectpage)
|
|||||||
$tplcontent.= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n";
|
$tplcontent.= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n";
|
||||||
$tplcontent.= "ob_start();\n";
|
$tplcontent.= "ob_start();\n";
|
||||||
$tplcontent.= "// END PHP ?>\n";
|
$tplcontent.= "// END PHP ?>\n";
|
||||||
|
if (! empty($conf->global->WEBSITE_FORCE_DOCTYPE_HTML5))
|
||||||
|
{
|
||||||
|
$tplcontent.= "<!DOCTYPE html>\n";
|
||||||
|
}
|
||||||
$tplcontent.= '<html'.($shortlangcode ? ' lang="'.$shortlangcode.'"':'').'>'."\n";
|
$tplcontent.= '<html'.($shortlangcode ? ' lang="'.$shortlangcode.'"':'').'>'."\n";
|
||||||
$tplcontent.= '<head>'."\n";
|
$tplcontent.= '<head>'."\n";
|
||||||
$tplcontent.= '<title>'.dol_string_nohtmltag($objectpage->title, 0, 'UTF-8').'</title>'."\n";
|
$tplcontent.= '<title>'.dol_string_nohtmltag($objectpage->title, 0, 'UTF-8').'</title>'."\n";
|
||||||
|
|||||||
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classe permettant de generer les projets au modele SEPAMandate
|
* Class to generate SEPA mandate
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class pdf_sepamandate extends ModeleBankAccountDoc
|
class pdf_sepamandate extends ModeleBankAccountDoc
|
||||||
|
|||||||
@ -771,8 +771,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
// Show payment mode
|
// Show payment mode
|
||||||
if ($object->mode_reglement_code
|
if ($object->mode_reglement_code
|
||||||
&& $object->mode_reglement_code != 'CHQ'
|
&& $object->mode_reglement_code != 'CHQ'
|
||||||
&& $object->mode_reglement_code != 'VIR')
|
&& $object->mode_reglement_code != 'VIR') {
|
||||||
{
|
|
||||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
||||||
|
|||||||
@ -831,8 +831,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
// Show payment mode
|
// Show payment mode
|
||||||
if ($object->mode_reglement_code
|
if ($object->mode_reglement_code
|
||||||
&& $object->mode_reglement_code != 'CHQ'
|
&& $object->mode_reglement_code != 'CHQ'
|
||||||
&& $object->mode_reglement_code != 'VIR')
|
&& $object->mode_reglement_code != 'VIR') {
|
||||||
{
|
|
||||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
||||||
|
|||||||
@ -294,8 +294,9 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||||||
if (! empty($usecontact))
|
if (! empty($usecontact))
|
||||||
{
|
{
|
||||||
// On peut utiliser le nom de la societe du contact
|
// On peut utiliser le nom de la societe du contact
|
||||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
|
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) {
|
||||||
else {
|
$socobject = $object->contact;
|
||||||
|
} else {
|
||||||
$socobject = $object->thirdparty;
|
$socobject = $object->thirdparty;
|
||||||
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
||||||
$contactobject = $object->contact;
|
$contactobject = $object->contact;
|
||||||
|
|||||||
@ -739,7 +739,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
// Affiche zone versements
|
// Affiche zone versements
|
||||||
if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS))
|
if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS))
|
||||||
{
|
{
|
||||||
$posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs);
|
$posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs, $heightforfooter);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pied de page
|
// Pied de page
|
||||||
@ -785,9 +785,10 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
* @param Object $object Object invoice
|
* @param Object $object Object invoice
|
||||||
* @param int $posy Position y in PDF
|
* @param int $posy Position y in PDF
|
||||||
* @param Translate $outputlangs Object langs for output
|
* @param Translate $outputlangs Object langs for output
|
||||||
|
* @param int $heightforfooter height for footer
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
function _tableau_versements(&$pdf, $object, $posy, $outputlangs, $heightforfooter = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
@ -795,6 +796,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$sign=1;
|
$sign=1;
|
||||||
if ($object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1;
|
if ($object->type == 2 && ! empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) $sign=-1;
|
||||||
|
|
||||||
|
$current_page = $pdf->getPage();
|
||||||
$tab3_posx = 120;
|
$tab3_posx = 120;
|
||||||
$tab3_top = $posy + 8;
|
$tab3_top = $posy + 8;
|
||||||
$tab3_width = 80;
|
$tab3_width = 80;
|
||||||
@ -806,26 +808,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
$title=$outputlangs->transnoentities("PaymentsAlreadyDone");
|
$this->_tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top, $tab3_width, $tab3_height);
|
||||||
if ($object->type == 2) $title=$outputlangs->transnoentities("PaymentsBackAlreadyDone");
|
|
||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 3);
|
|
||||||
$pdf->SetXY($tab3_posx, $tab3_top - 4);
|
|
||||||
$pdf->MultiCell(60, 3, $title, 0, 'L', 0);
|
|
||||||
|
|
||||||
$pdf->line($tab3_posx, $tab3_top, $tab3_posx+$tab3_width, $tab3_top);
|
|
||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 4);
|
|
||||||
$pdf->SetXY($tab3_posx, $tab3_top);
|
|
||||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Payment"), 0, 'L', 0);
|
|
||||||
$pdf->SetXY($tab3_posx+21, $tab3_top);
|
|
||||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Amount"), 0, 'L', 0);
|
|
||||||
$pdf->SetXY($tab3_posx+40, $tab3_top);
|
|
||||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Type"), 0, 'L', 0);
|
|
||||||
$pdf->SetXY($tab3_posx+58, $tab3_top);
|
|
||||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Num"), 0, 'L', 0);
|
|
||||||
|
|
||||||
$pdf->line($tab3_posx, $tab3_top-1+$tab3_height, $tab3_posx+$tab3_width, $tab3_top-1+$tab3_height);
|
|
||||||
|
|
||||||
$y=0;
|
$y=0;
|
||||||
|
|
||||||
@ -847,6 +830,17 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$y+=3;
|
$y+=3;
|
||||||
|
if ($tab3_top+$y >= ($this->page_hauteur - $heightforfooter))
|
||||||
|
{
|
||||||
|
$y=0;
|
||||||
|
$current_page++;
|
||||||
|
$pdf->AddPage('', '', true);
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
|
$pdf->setPage($current_page);
|
||||||
|
$this->_tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top+$y-3, $tab3_width, $tab3_height);
|
||||||
|
}
|
||||||
|
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
if ($obj->type == 2) $text=$outputlangs->transnoentities("CreditNote");
|
if ($obj->type == 2) $text=$outputlangs->transnoentities("CreditNote");
|
||||||
@ -893,6 +887,17 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$y+=3;
|
$y+=3;
|
||||||
|
if ($tab3_top+$y >= ($this->page_hauteur - $heightforfooter))
|
||||||
|
{
|
||||||
|
$y=0;
|
||||||
|
$current_page++;
|
||||||
|
$pdf->AddPage('', '', true);
|
||||||
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
|
$pdf->setPage($current_page);
|
||||||
|
$this->_tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top+$y-3, $tab3_width, $tab3_height);
|
||||||
|
}
|
||||||
|
|
||||||
$row = $this->db->fetch_object($resql);
|
$row = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
$pdf->SetXY($tab3_posx, $tab3_top+$y);
|
$pdf->SetXY($tab3_posx, $tab3_top+$y);
|
||||||
@ -918,6 +923,44 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
|
/**
|
||||||
|
* Function _tableau_versements_header
|
||||||
|
*
|
||||||
|
* @param TCPDF $pdf Object PDF
|
||||||
|
* @param Facture $object Object invoice
|
||||||
|
* @param Translate $outputlangs Object langs for output
|
||||||
|
* @param int $default_font_size Font size
|
||||||
|
* @param int $tab3_posx pos x
|
||||||
|
* @param int $tab3_top pos y
|
||||||
|
* @param int $tab3_width width
|
||||||
|
* @param int $tab3_height height
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function _tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top, $tab3_width, $tab3_height)
|
||||||
|
{
|
||||||
|
// phpcs:enable
|
||||||
|
$title=$outputlangs->transnoentities("PaymentsAlreadyDone");
|
||||||
|
if ($object->type == 2) $title=$outputlangs->transnoentities("PaymentsBackAlreadyDone");
|
||||||
|
|
||||||
|
$pdf->SetFont('', '', $default_font_size - 3);
|
||||||
|
$pdf->SetXY($tab3_posx, $tab3_top - 4);
|
||||||
|
$pdf->MultiCell(60, 3, $title, 0, 'L', 0);
|
||||||
|
|
||||||
|
$pdf->line($tab3_posx, $tab3_top, $tab3_posx+$tab3_width, $tab3_top);
|
||||||
|
|
||||||
|
$pdf->SetFont('', '', $default_font_size - 4);
|
||||||
|
$pdf->SetXY($tab3_posx, $tab3_top);
|
||||||
|
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Payment"), 0, 'L', 0);
|
||||||
|
$pdf->SetXY($tab3_posx+21, $tab3_top);
|
||||||
|
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Amount"), 0, 'L', 0);
|
||||||
|
$pdf->SetXY($tab3_posx+40, $tab3_top);
|
||||||
|
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Type"), 0, 'L', 0);
|
||||||
|
$pdf->SetXY($tab3_posx+58, $tab3_top);
|
||||||
|
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Num"), 0, 'L', 0);
|
||||||
|
|
||||||
|
$pdf->line($tab3_posx, $tab3_top-1+$tab3_height, $tab3_posx+$tab3_width, $tab3_top-1+$tab3_height);
|
||||||
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
@ -1291,9 +1334,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach($localtax_rate as $tvakey => $tvaval)
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
{
|
|
||||||
// retrieve global local tax
|
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
|
||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
@ -1316,7 +1356,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
// Revenue stamp
|
// Revenue stamp
|
||||||
if (price2num($object->revenuestamp) != 0)
|
if (price2num($object->revenuestamp) != 0)
|
||||||
|
|||||||
@ -1377,8 +1377,8 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
|
|
||||||
// Revenue stamp
|
// Revenue stamp
|
||||||
if (price2num($object->revenuestamp) != 0)
|
if (price2num($object->revenuestamp) != 0)
|
||||||
|
|||||||
@ -130,7 +130,7 @@ class mod_arctic extends ModeleNumRefFicheinter
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// On d<EFBFBD>fini critere recherche compteur
|
// On défini critere recherche compteur
|
||||||
$mask=$conf->global->FICHINTER_ARTIC_MASK;
|
$mask=$conf->global->FICHINTER_ARTIC_MASK;
|
||||||
|
|
||||||
if (! $mask)
|
if (! $mask)
|
||||||
|
|||||||
@ -321,8 +321,9 @@ class doc_generic_product_odt extends ModelePDFProduct
|
|||||||
if (! empty($usecontact))
|
if (! empty($usecontact))
|
||||||
{
|
{
|
||||||
// On peut utiliser le nom de la societe du contact
|
// On peut utiliser le nom de la societe du contact
|
||||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
|
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) {
|
||||||
else {
|
$socobject = $object->contact;
|
||||||
|
} else {
|
||||||
$socobject = $object->thirdparty;
|
$socobject = $object->thirdparty;
|
||||||
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
||||||
$contactobject = $object->contact;
|
$contactobject = $object->contact;
|
||||||
|
|||||||
@ -321,8 +321,9 @@ class doc_generic_stock_odt extends ModelePDFStock
|
|||||||
if (! empty($usecontact))
|
if (! empty($usecontact))
|
||||||
{
|
{
|
||||||
// On peut utiliser le nom de la societe du contact
|
// On peut utiliser le nom de la societe du contact
|
||||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
|
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) {
|
||||||
else {
|
$socobject = $object->contact;
|
||||||
|
} else {
|
||||||
$socobject = $object->thirdparty;
|
$socobject = $object->thirdparty;
|
||||||
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
||||||
$contactobject = $object->contact;
|
$contactobject = $object->contact;
|
||||||
|
|||||||
@ -235,7 +235,10 @@ if ($permission) {
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php $i++; ?>
|
<?php $i++; ?>
|
||||||
<?php } } ?>
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -21,8 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// Protection to avoid direct call of template
|
||||||
if (empty($conf) || ! is_object($conf))
|
if (empty($conf) || ! is_object($conf)) {
|
||||||
{
|
|
||||||
print "Error, template page can't be called as URL";
|
print "Error, template page can't be called as URL";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -61,19 +60,24 @@ print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 0, $disable
|
|||||||
|
|
||||||
$colorbackhmenu1='60,70,100'; // topmenu
|
$colorbackhmenu1='60,70,100'; // topmenu
|
||||||
if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1=$colorbackhmenu1;
|
if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_TOPMENU_BACK1=$colorbackhmenu1;
|
||||||
$colorbackhmenu1 =empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1):(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1);
|
$colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1):(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1);
|
||||||
$colorbackhmenu1=join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
|
$colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
||||||
|
|
||||||
<?php if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
<?php
|
||||||
|
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
||||||
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
|
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
|
||||||
?>
|
?>
|
||||||
<body class="body bodylogin" style="background-image: url('<?php echo $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND; ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
|
<body class="body bodylogin" style="background-image: url('<?php echo $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND; ?>'); background-repeat: no-repeat; background-position: center center; background-attachment: fixed; background-size: cover; background-color: #ffffff;">
|
||||||
<?php } else { ?>
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file=logos/'.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
|
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file=logos/'.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@ -73,9 +73,13 @@ $coldisplay=-1; // We remove first td
|
|||||||
<input type="hidden" id="product_type" name="type" value="<?php echo $line->product_type; ?>">
|
<input type="hidden" id="product_type" name="type" value="<?php echo $line->product_type; ?>">
|
||||||
<input type="hidden" id="product_id" name="productid" value="<?php echo (! empty($line->fk_product)?$line->fk_product:0); ?>" />
|
<input type="hidden" id="product_id" name="productid" value="<?php echo (! empty($line->fk_product)?$line->fk_product:0); ?>" />
|
||||||
<input type="hidden" id="special_code" name="special_code" value="<?php echo $line->special_code; ?>">
|
<input type="hidden" id="special_code" name="special_code" value="<?php echo $line->special_code; ?>">
|
||||||
|
<input type="hidden" id="fk_parent_line" name="fk_parent_line" value="<?php echo $line->fk_parent_line; ?>">
|
||||||
|
|
||||||
<?php if ($line->fk_product > 0) { ?>
|
<?php if ($line->fk_product > 0) { ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($line->fk_parent_line > 0) echo img_picto('', 'rightarrow');
|
||||||
|
?>
|
||||||
<a href="<?php echo DOL_URL_ROOT.'/product/card.php?id='.$line->fk_product; ?>">
|
<a href="<?php echo DOL_URL_ROOT.'/product/card.php?id='.$line->fk_product; ?>">
|
||||||
<?php
|
<?php
|
||||||
if ($line->product_type==1) echo img_object($langs->trans('ShowService'), 'service');
|
if ($line->product_type==1) echo img_object($langs->trans('ShowService'), 'service');
|
||||||
@ -193,16 +197,19 @@ $coldisplay=-1; // We remove first td
|
|||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
if ($this->situation_cycle_ref) {
|
if ($this->situation_cycle_ref) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
print '<td class="nowrap right"><input class="right" type="text" size="1" value="' . $line->situation_percent . '" name="progress">%</td>';
|
print '<td class="nowrap right"><input class="right" type="text" size="1" value="' . $line->situation_percent . '" name="progress">%</td>';
|
||||||
}
|
}
|
||||||
if (! empty($usemargins))
|
if (! empty($usemargins))
|
||||||
{
|
{
|
||||||
?>
|
if (!empty($user->rights->margins->creer)) {
|
||||||
<?php if (!empty($user->rights->margins->creer)) { ?>
|
?>
|
||||||
<td class="margininfos right"><?php $coldisplay++; ?>
|
<td class="margininfos right">
|
||||||
|
<?php
|
||||||
|
$coldisplay++;
|
||||||
|
?>
|
||||||
<!-- For predef product -->
|
<!-- For predef product -->
|
||||||
<?php if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { ?>
|
<?php if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { ?>
|
||||||
<select id="fournprice_predef" name="fournprice_predef" class="flat right" style="display: none;"></select>
|
<select id="fournprice_predef" name="fournprice_predef" class="flat right" style="display: none;"></select>
|
||||||
@ -211,7 +218,8 @@ $coldisplay=-1; // We remove first td
|
|||||||
<input class="flat right" type="text" size="5" id="buying_price" name="buying_price" class="hideobject" value="<?php echo price($line->pa_ht, 0, '', 0); ?>">
|
<input class="flat right" type="text" size="5" id="buying_price" name="buying_price" class="hideobject" value="<?php echo price($line->pa_ht, 0, '', 0); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($user->rights->margins->creer) {
|
<?php
|
||||||
|
if ($user->rights->margins->creer) {
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||||
{
|
{
|
||||||
$margin_rate = (isset($_POST["np_marginRate"])?GETPOST("np_marginRate", "alpha", 2):(($line->pa_ht == 0)?'':price($line->marge_tx)));
|
$margin_rate = (isset($_POST["np_marginRate"])?GETPOST("np_marginRate", "alpha", 2):(($line->pa_ht == 0)?'':price($line->marge_tx)));
|
||||||
@ -234,7 +242,7 @@ $coldisplay=-1; // We remove first td
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- colspan=4 for this td because it replace total_ht+3 td for buttons -->
|
<!-- colspan=4 for this td because it replace total_ht+3 td for buttons -->
|
||||||
<td class="center valignmiddle" colspan="<?php echo $colspan; ?>"><?php $coldisplay+=4; ?>
|
<td class="center valignmiddle" colspan="<?php echo $colspan; ?>"><?php $coldisplay+=4; ?>
|
||||||
|
|||||||
@ -204,13 +204,15 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<td class="linecolqty nowrap right"><?php $coldisplay++; ?>
|
<td class="linecolqty nowrap right"><?php $coldisplay++; ?>
|
||||||
<?php if ((($line->info_bits & 2) != 2) && $line->special_code != 3) {
|
<?php
|
||||||
|
if ((($line->info_bits & 2) != 2) && $line->special_code != 3) {
|
||||||
// I comment this because it shows info even when not required
|
// I comment this because it shows info even when not required
|
||||||
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
||||||
// must also not be output for most entities (proposal, intervention, ...)
|
// must also not be output for most entities (proposal, intervention, ...)
|
||||||
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
|
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
|
||||||
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
|
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
|
||||||
} else echo ' '; ?>
|
} else echo ' ';
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -308,9 +310,13 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<td <?php echo (($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"'); ?>><?php $coldisplay++; ?></td>
|
<td <?php echo (($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"'); ?>><?php $coldisplay++; ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } else { ?>
|
<?php
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
<td colspan="3"><?php $coldisplay=$coldisplay+3; ?></td>
|
<td colspan="3"><?php $coldisplay=$coldisplay+3; ?></td>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<?php if($action == 'selectlines'){ ?>
|
<?php if($action == 'selectlines'){ ?>
|
||||||
<td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php echo $i+1; ?>]" value="<?php echo $line->id; ?>" ></td>
|
<td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php echo $i+1; ?>]" value="<?php echo $line->id; ?>" ></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -446,7 +446,7 @@ if ($num > 0)
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowraponall">';
|
||||||
print $object->getNomUrl(1);
|
print $object->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -206,8 +206,7 @@ class ActionsDatapolicy
|
|||||||
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
|
||||||
DataPolicy::sendMailDataPolicyContact($object);
|
DataPolicy::sendMailDataPolicyContact($object);
|
||||||
}
|
} elseif ($parameters['currentcontext'] == 'membercard' && $action == 'send_datapolicy') {
|
||||||
elseif ($parameters['currentcontext'] == 'membercard' && $action == 'send_datapolicy') {
|
|
||||||
$object->fetch(GETPOST('id'));
|
$object->fetch(GETPOST('id'));
|
||||||
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
|
||||||
|
|||||||
@ -48,7 +48,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
<td align="right"><?php
|
<td align="right"><?php
|
||||||
$total = $total + $objectlink->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?>
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -184,7 +184,7 @@ class Shipments extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
function post($request_data = null)
|
function post($request_data = null)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->expedition->creer) {
|
if (! DolibarrApiAccess::$user->rights->expedition->creer) {
|
||||||
throw new RestException(401, "Insuffisant rights");
|
throw new RestException(401, "Insuffisant rights");
|
||||||
}
|
}
|
||||||
// Check mandatory fields
|
// Check mandatory fields
|
||||||
@ -259,7 +259,7 @@ class Shipments extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->shipment->fetch($id);
|
$result = $this->shipment->fetch($id);
|
||||||
if( ! $result ) {
|
if ( ! $result ) {
|
||||||
throw new RestException(404, 'Shipment not found');
|
throw new RestException(404, 'Shipment not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,12 +317,12 @@ class Shipments extends DolibarrApi
|
|||||||
/*
|
/*
|
||||||
function putLine($id, $lineid, $request_data = null)
|
function putLine($id, $lineid, $request_data = null)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->expedition->creer) {
|
if (! DolibarrApiAccess::$user->rights->expedition->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->shipment->fetch($id);
|
$result = $this->shipment->fetch($id);
|
||||||
if( ! $result ) {
|
if ( ! $result ) {
|
||||||
throw new RestException(404, 'Shipment not found');
|
throw new RestException(404, 'Shipment not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,15 +495,15 @@ class Shipments extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
function validate($id, $notrigger = 0)
|
function validate($id, $notrigger = 0)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->expedition->creer) {
|
if (! DolibarrApiAccess::$user->rights->expedition->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
$result = $this->shipment->fetch($id);
|
$result = $this->shipment->fetch($id);
|
||||||
if( ! $result ) {
|
if ( ! $result ) {
|
||||||
throw new RestException(404, 'Shipment not found');
|
throw new RestException(404, 'Shipment not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('expedition', $this->shipment->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('expedition', $this->shipment->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -515,11 +515,11 @@ class Shipments extends DolibarrApi
|
|||||||
throw new RestException(500, 'Error when validating Shipment: '.$this->shipment->error);
|
throw new RestException(500, 'Error when validating Shipment: '.$this->shipment->error);
|
||||||
}
|
}
|
||||||
$result = $this->shipment->fetch($id);
|
$result = $this->shipment->fetch($id);
|
||||||
if( ! $result ) {
|
if ( ! $result ) {
|
||||||
throw new RestException(404, 'Shipment not found');
|
throw new RestException(404, 'Shipment not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('expedition', $this->shipment->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('expedition', $this->shipment->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -601,7 +601,7 @@ class Expedition extends CommonObject
|
|||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
|
||||||
if ($this->statut == 0) $this->brouillon = 1;
|
if ($this->statut == self::STATUS_DRAFT) $this->brouillon = 1;
|
||||||
|
|
||||||
// Tracking url
|
// Tracking url
|
||||||
$this->getUrlTrackingStatus($obj->tracking_number);
|
$this->getUrlTrackingStatus($obj->tracking_number);
|
||||||
@ -841,7 +841,7 @@ class Expedition extends CommonObject
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->ref = $numref;
|
$this->ref = $numref;
|
||||||
$this->statut = 1;
|
$this->statut = self::STATUS_VALIDATED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -876,7 +876,7 @@ class Expedition extends CommonObject
|
|||||||
|
|
||||||
if ($conf->livraison_bon->enabled)
|
if ($conf->livraison_bon->enabled)
|
||||||
{
|
{
|
||||||
if ($this->statut == 1 || $this->statut == 2)
|
if ($this->statut == self::STATUS_VALIDATED || $this->statut == self::STATUS_CLOSED)
|
||||||
{
|
{
|
||||||
// Expedition validee
|
// Expedition validee
|
||||||
include_once DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php';
|
||||||
@ -1184,7 +1184,7 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Stock control
|
// Stock control
|
||||||
if (! $error && $conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > 0)
|
if (! $error && $conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT)
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php";
|
require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php";
|
||||||
|
|
||||||
@ -1734,7 +1734,7 @@ class Expedition extends CommonObject
|
|||||||
$this->id=0;
|
$this->id=0;
|
||||||
$this->ref = 'SPECIMEN';
|
$this->ref = 'SPECIMEN';
|
||||||
$this->specimen=1;
|
$this->specimen=1;
|
||||||
$this->statut = 1;
|
$this->statut = self::STATUS_VALIDATED;
|
||||||
$this->livraison_id = 0;
|
$this->livraison_id = 0;
|
||||||
$this->date = $now;
|
$this->date = $now;
|
||||||
$this->date_creation = $now;
|
$this->date_creation = $now;
|
||||||
@ -2117,6 +2117,7 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->statut = self::STATUS_VALIDATED;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2142,7 +2143,7 @@ class Expedition extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$this->statut=2;
|
$this->statut=self::STATUS_CLOSED;
|
||||||
$this->billed=1;
|
$this->billed=1;
|
||||||
|
|
||||||
// Call trigger
|
// Call trigger
|
||||||
@ -2161,6 +2162,8 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->statut=self::STATUS_VALIDATED;
|
||||||
|
$this->billed=0;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2185,13 +2188,15 @@ class Expedition extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
$oldbilled=$this->billed;
|
||||||
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut=1';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'expedition SET fk_statut=1';
|
||||||
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0';
|
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0';
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$this->statut=1;
|
$this->statut=self::STATUS_VALIDATED;
|
||||||
$this->billed=0;
|
$this->billed=0;
|
||||||
|
|
||||||
// If stock increment is done on closing
|
// If stock increment is done on closing
|
||||||
@ -2288,6 +2293,8 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->statut=self::STATUS_CLOSED;
|
||||||
|
$this->billed=$oldbilled;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -396,7 +396,7 @@ class ExpenseReports extends DolibarrApi
|
|||||||
throw new RestException(404, 'expensereport not found');
|
throw new RestException(404, 'expensereport not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('expensereport', $this->expensereport->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('expensereport', $this->expensereport->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
foreach($request_data as $field => $value) {
|
foreach($request_data as $field => $value) {
|
||||||
|
|||||||
@ -188,8 +188,7 @@ if ($action == 'create' || empty($action))
|
|||||||
$total = $expensereport->total_ttc;
|
$total = $expensereport->total_ttc;
|
||||||
|
|
||||||
// autofill remainder amount
|
// autofill remainder amount
|
||||||
if (! empty($conf->use_javascript_ajax))
|
if (! empty($conf->use_javascript_ajax)) {
|
||||||
{
|
|
||||||
print "\n".'<script type="text/javascript" language="javascript">';
|
print "\n".'<script type="text/javascript" language="javascript">';
|
||||||
//Add js for AutoFill
|
//Add js for AutoFill
|
||||||
print ' $(document).ready(function () {';
|
print ' $(document).ready(function () {';
|
||||||
@ -197,8 +196,8 @@ if ($action == 'create' || empty($action))
|
|||||||
var amount = $(this).data("value");
|
var amount = $(this).data("value");
|
||||||
document.getElementById($(this).data(\'rowid\')).value = amount ;
|
document.getElementById($(this).data(\'rowid\')).value = amount ;
|
||||||
});';
|
});';
|
||||||
print ' });'."\n";
|
print "\t});\n";
|
||||||
print ' </script>'."\n";
|
print "</script>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("DoPayment"));
|
print load_fiche_titre($langs->trans("DoPayment"));
|
||||||
|
|||||||
@ -263,11 +263,11 @@ class Interventions extends DolibarrApi
|
|||||||
$this->fichinter->$field = $value;
|
$this->fichinter->$field = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! $result ) {
|
if ( ! $result ) {
|
||||||
throw new RestException(404, 'Intervention not found');
|
throw new RestException(404, 'Intervention not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('fichinter', $this->fichinter->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('fichinter', $this->fichinter->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,8 +281,7 @@ class Interventions extends DolibarrApi
|
|||||||
|
|
||||||
if ($updateRes > 0) {
|
if ($updateRes > 0) {
|
||||||
return $updateRes;
|
return $updateRes;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
throw new RestException(400, $this->fichinter->error);
|
throw new RestException(400, $this->fichinter->error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3082,17 +3082,19 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
}
|
}
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
}elseif(! empty($conf->global->SUPPLIER_ORDER_MORE_THAN_WISHED) )
|
} elseif (! empty($conf->global->SUPPLIER_ORDER_MORE_THAN_WISHED) ) {
|
||||||
{//set livraison to 'tot' if more products received than wished. (and if $closeopenorder is set to 1 of course...)
|
//set livraison to 'tot' if more products received than wished. (and if $closeopenorder is set to 1 of course...)
|
||||||
|
|
||||||
$close=0;
|
$close=0;
|
||||||
|
|
||||||
if( count($diff_array) > 0 )
|
if( count($diff_array) > 0 )
|
||||||
{//there are some difference between the two arrays
|
{
|
||||||
|
//there are some difference between the two arrays
|
||||||
|
|
||||||
//scan the array of results
|
//scan the array of results
|
||||||
foreach($diff_array as $key => $value)
|
foreach($diff_array as $key => $value)
|
||||||
{//if the quantity delivered is greater or equal to wish quantity
|
{
|
||||||
|
//if the quantity delivered is greater or equal to wish quantity
|
||||||
if($qtydelivered[$key] >= $qtywished[$key] )
|
if($qtydelivered[$key] >= $qtywished[$key] )
|
||||||
{
|
{
|
||||||
$close++;
|
$close++;
|
||||||
@ -3101,10 +3103,9 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($close == count($diff_array))
|
if($close == count($diff_array)) {
|
||||||
{//all the products are received equal or more than the wished quantity
|
//all the products are received equal or more than the wished quantity
|
||||||
if ($closeopenorder)
|
if ($closeopenorder) {
|
||||||
{
|
|
||||||
$ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can'
|
$ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can'
|
||||||
if ($ret<0) {
|
if ($ret<0) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -3122,7 +3123,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{//all the products are not received
|
{
|
||||||
|
//all the products are not received
|
||||||
$ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can'
|
$ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can'
|
||||||
if ($ret<0) {
|
if ($ret<0) {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -3218,4 +3218,4 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -726,7 +726,7 @@ if ($id > 0 || ! empty($ref)) {
|
|||||||
// modified by hook
|
// modified by hook
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
if(empty($conf->reception->enabled)){
|
if (empty($conf->reception->enabled)){
|
||||||
print $langs->trans("Comment").' : ';
|
print $langs->trans("Comment").' : ';
|
||||||
print '<input type="text" class="minwidth400" maxlength="128" name="comment" value="';
|
print '<input type="text" class="minwidth400" maxlength="128" name="comment" value="';
|
||||||
print $_POST["comment"] ? GETPOST("comment") : $langs->trans("DispatchSupplierOrder", $object->ref);
|
print $_POST["comment"] ? GETPOST("comment") : $langs->trans("DispatchSupplierOrder", $object->ref);
|
||||||
|
|||||||
@ -622,7 +622,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
|
|
||||||
print '<td align="right">'.price($objp->total_ttc).'</td>';
|
print '<td align="right">'.price($objp->total_ttc).'</td>';
|
||||||
|
|
||||||
print '<td align="right">'.price($objp->am).'</td>';
|
print '<td align="right">'.price($objp->am);
|
||||||
|
if ($creditnotes) print '+'.price($creditnotes);
|
||||||
|
if ($deposits) print '+'.price($deposits);
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="right">'.price($remaintopay).'</td>';
|
print '<td align="right">'.price($remaintopay).'</td>';
|
||||||
|
|
||||||
@ -677,6 +680,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
$total+=$objp->total_ht;
|
$total+=$objp->total_ht;
|
||||||
$total_ttc+=$objp->total_ttc;
|
$total_ttc+=$objp->total_ttc;
|
||||||
$totalrecu+=$objp->am;
|
$totalrecu+=$objp->am;
|
||||||
|
$totalrecucreditnote+=$creditnotes;
|
||||||
|
$totalrecudeposits+=$deposits;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
if ($i > 1)
|
if ($i > 1)
|
||||||
@ -689,8 +694,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td> </td>';
|
||||||
print '<td align="right"><b>'.price($total_ttc).'</b></td>';
|
print '<td align="right"><b>'.price($total_ttc).'</b></td>';
|
||||||
print '<td align="right"><b>'.price($totalrecu).'</b></td>';
|
print '<td align="right"><b>'.price($totalrecu);
|
||||||
print '<td align="right"><b>'.price($total_ttc - $totalrecu).'</b></td>';
|
if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
|
||||||
|
if ($totalrecudeposits) print '+'.price($totalrecudeposits);
|
||||||
|
print '</b></td>';
|
||||||
|
print '<td align="right"><b>'.price(price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits,'MT')).'</b></td>';
|
||||||
print '<td align="center" id="result" style="font-weight: bold;"></td>'; // Autofilled
|
print '<td align="center" id="result" style="font-weight: bold;"></td>'; // Autofilled
|
||||||
if (!empty($conf->multicurrency->enabled)) print '<td align="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
if (!empty($conf->multicurrency->enabled)) print '<td align="right" id="multicurrency_result" style="font-weight: bold;"></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -28,12 +28,17 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
// Protection if external user
|
$action = GETPOST('action', 'aZ09')?GETPOST('action', 'aZ09'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||||
|
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
|
||||||
// Si l'utilisateur n'a pas le droit de lire cette page
|
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
||||||
if(!$user->rights->holiday->read_all) accessforbidden();
|
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
||||||
|
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||||
|
$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'myobjectlist'; // To manage different context of search
|
||||||
|
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||||
|
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||||
|
|
||||||
|
$search_id = GETPOST('search_id', 'alpha');
|
||||||
$year=GETPOST('year');
|
$year=GETPOST('year');
|
||||||
if (empty($year))
|
if (empty($year))
|
||||||
{
|
{
|
||||||
@ -41,33 +46,125 @@ if (empty($year))
|
|||||||
$year=$tmpdate['year'];
|
$year=$tmpdate['year'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load variable for pagination
|
||||||
|
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||||
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
|
$page = GETPOST('page', 'int');
|
||||||
|
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
||||||
|
$offset = $limit * $page;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
|
//if (! $sortfield) $sortfield="p.date_fin";
|
||||||
|
//if (! $sortorder) $sortorder="DESC";
|
||||||
|
|
||||||
|
|
||||||
|
// Protection if external user
|
||||||
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|
||||||
|
// Si l'utilisateur n'a pas le droit de lire cette page
|
||||||
|
if(!$user->rights->holiday->read_all) accessforbidden();
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->load('users');
|
$langs->load('users');
|
||||||
|
|
||||||
|
// Initialize technical objects
|
||||||
|
$object = new Holiday($db);
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
//$diroutputmassaction = $conf->mymodule->dir_output . '/temp/massgeneration/'.$user->id;
|
||||||
|
$hookmanager->initHooks(array('leavemovementlist')); // Note that conf->hooks_modules contains array
|
||||||
|
|
||||||
|
$arrayfields=array();
|
||||||
|
$arrayofmassactions=array();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('cancel', 'alpha')) { $action='list'; $massaction=''; }
|
||||||
|
if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||||
|
|
||||||
|
$parameters=array();
|
||||||
|
$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
if (empty($reshook))
|
||||||
|
{
|
||||||
|
// Selection of new fields
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
|
|
||||||
|
// Purge search criteria
|
||||||
|
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') ||GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
|
||||||
|
{
|
||||||
|
$search_id='';
|
||||||
|
$toselect='';
|
||||||
|
$search_array_options=array();
|
||||||
|
}
|
||||||
|
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')
|
||||||
|
|| GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha'))
|
||||||
|
{
|
||||||
|
$massaction=''; // Protection to avoid mass action if we force a new search during a mass action confirmation
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mass actions
|
||||||
|
/*$objectclass='MyObject';
|
||||||
|
$objectlabel='MyObject';
|
||||||
|
$permtoread = $user->rights->mymodule->read;
|
||||||
|
$permtodelete = $user->rights->mymodule->delete;
|
||||||
|
$uploaddir = $conf->mymodule->dir_output;
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$cp = new Holiday($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$alltypeleaves=$cp->getTypes(1, -1); // To have labels
|
$alltypeleaves=$object->getTypes(1, -1); // To have labels
|
||||||
|
|
||||||
llxHeader('', $langs->trans('CPTitreMenu').' ('.$langs->trans("Year").' '.$year.')');
|
llxHeader('', $langs->trans('CPTitreMenu').' ('.$langs->trans("Year").' '.$year.')');
|
||||||
|
|
||||||
// Recent changes are more important than old changes
|
|
||||||
$log_holiday = $cp->fetchLog('ORDER BY cpl.rowid DESC', " AND date_action BETWEEN '".$db->idate(dol_get_first_day($year, 1, 1))."' AND '".$db->idate(dol_get_last_day($year, 12, 1))."'"); // Load $cp->logs
|
|
||||||
|
|
||||||
$pagination='<div class="pagination"><ul><li class="pagination"><a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'"><i class="fa fa-chevron-left" title="Previous"></i></a><li class="pagination"><span class="active">'.$langs->trans("Year").' '.$year.'</span></li><li class="pagination"><a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'"><i class="fa fa-chevron-right" title="Next"></i></a></li></lu></div>';
|
|
||||||
|
$sqlwhere = '';
|
||||||
|
$sqlwhere.= " AND date_action BETWEEN '".$db->idate(dol_get_first_day($year, 1, 1))."' AND '".$db->idate(dol_get_last_day($year, 12, 1))."'";
|
||||||
|
if ($search_id != '') $sqlwhere.= natural_search('rowid', $search_id, 1);
|
||||||
|
|
||||||
|
$sqlorder = 'ORDER BY cpl.rowid DESC';
|
||||||
|
|
||||||
|
// Recent changes are more important than old changes
|
||||||
|
$log_holiday = $object->fetchLog($sqlorder, $sqlwhere); // Load $object->logs
|
||||||
|
|
||||||
|
$param='';
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
|
||||||
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
|
||||||
|
if ($search_id) $param='&search_id='.urlencode($search_id);
|
||||||
|
|
||||||
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
|
print '<input type="hidden" name="action" value="list">';
|
||||||
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
|
$pagination='<div class="pagination"><ul><li class="pagination"><a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).$param.'"><i class="fa fa-chevron-left" title="Previous"></i></a><li class="pagination"><span class="active">'.$langs->trans("Year").' '.$year.'</span></li><li class="pagination"><a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).$param.'"><i class="fa fa-chevron-right" title="Next"></i></a></li></lu></div>';
|
||||||
print load_fiche_titre($langs->trans('LogCP'), $pagination, 'title_hrm.png');
|
print load_fiche_titre($langs->trans('LogCP'), $pagination, 'title_hrm.png');
|
||||||
|
|
||||||
print '<div class="info">'.$langs->trans('LastUpdateCP').': '."\n";
|
print '<div class="info">'.$langs->trans('LastUpdateCP').': '."\n";
|
||||||
$lastUpdate = $cp->getConfCP('lastUpdate');
|
$lastUpdate = $object->getConfCP('lastUpdate');
|
||||||
if ($lastUpdate)
|
if ($lastUpdate)
|
||||||
{
|
{
|
||||||
$monthLastUpdate = $lastUpdate[4].$lastUpdate[5];
|
$monthLastUpdate = $lastUpdate[4].$lastUpdate[5];
|
||||||
$yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3];
|
$yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3];
|
||||||
print '<strong>'.dol_print_date($db->jdate($cp->getConfCP('lastUpdate')), 'dayhour', 'tzuser').'</strong>';
|
print '<strong>'.dol_print_date($db->jdate($object->getConfCP('lastUpdate')), 'dayhour', 'tzuser').'</strong>';
|
||||||
print '<br>'.$langs->trans("MonthOfLastMonthlyUpdate").': <strong>'.$yearLastUpdate.'-'.$monthLastUpdate.'</strong>'."\n";
|
print '<br>'.$langs->trans("MonthOfLastMonthlyUpdate").': <strong>'.$yearLastUpdate.'-'.$monthLastUpdate.'</strong>'."\n";
|
||||||
}
|
}
|
||||||
else print $langs->trans('None');
|
else print $langs->trans('None');
|
||||||
@ -75,12 +172,18 @@ print "</div><br>\n";
|
|||||||
|
|
||||||
$moreforfilter='';
|
$moreforfilter='';
|
||||||
|
|
||||||
|
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||||
|
//$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||||
|
//$selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||||
|
$selectedfields='';
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">'."\n";
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">'."\n";
|
||||||
|
|
||||||
print '<tbody>';
|
print '<tbody>';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td class="liste_titre"><input type="text" class="maxwidth50" name="search_id" value="'.$search_id.'"></td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
@ -89,6 +192,11 @@ print '<td class="liste_titre"></td>';
|
|||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
|
// Action column
|
||||||
|
print '<td class="liste_titre" align="right">';
|
||||||
|
$searchpicto=$form->showFilterButtons();
|
||||||
|
print $searchpicto;
|
||||||
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -99,11 +207,13 @@ print_liste_field_titre('UserUpdateCP');
|
|||||||
print_liste_field_titre('Description');
|
print_liste_field_titre('Description');
|
||||||
print_liste_field_titre('Type');
|
print_liste_field_titre('Type');
|
||||||
print_liste_field_titre('PrevSoldeCP', $_SERVER["PHP_SELF"], '', '', '', 'align="right"');
|
print_liste_field_titre('PrevSoldeCP', $_SERVER["PHP_SELF"], '', '', '', 'align="right"');
|
||||||
|
print_liste_field_titre('Variation', $_SERVER["PHP_SELF"], '', '', '', 'align="right"');
|
||||||
print_liste_field_titre('NewSoldeCP', $_SERVER["PHP_SELF"], '', '', '', 'align="right"');
|
print_liste_field_titre('NewSoldeCP', $_SERVER["PHP_SELF"], '', '', '', 'align="right"');
|
||||||
|
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
foreach($cp->logs as $logs_CP)
|
foreach($object->logs as $logs_CP)
|
||||||
{
|
{
|
||||||
$user_action = new User($db);
|
$user_action = new User($db);
|
||||||
$user_action->fetch($logs_CP['fk_user_action']);
|
$user_action->fetch($logs_CP['fk_user_action']);
|
||||||
@ -111,6 +221,9 @@ foreach($cp->logs as $logs_CP)
|
|||||||
$user_update = new User($db);
|
$user_update = new User($db);
|
||||||
$user_update->fetch($logs_CP['fk_user_update']);
|
$user_update->fetch($logs_CP['fk_user_update']);
|
||||||
|
|
||||||
|
$delta = price2num($logs_CP['new_solde'] - $logs_CP['prev_solde'], 5);
|
||||||
|
$detasign = ($delta > 0 ? '+' : '-');
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$logs_CP['rowid'].'</td>';
|
print '<td>'.$logs_CP['rowid'].'</td>';
|
||||||
print '<td style="text-align: center;">'.$logs_CP['date_action'].'</td>';
|
print '<td style="text-align: center;">'.$logs_CP['date_action'].'</td>';
|
||||||
@ -122,14 +235,16 @@ foreach($cp->logs as $logs_CP)
|
|||||||
print $label?$label:$logs_CP['fk_type'];
|
print $label?$label:$logs_CP['fk_type'];
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td style="text-align: right;">'.price2num($logs_CP['prev_solde'], 5).' '.$langs->trans('days').'</td>';
|
print '<td style="text-align: right;">'.price2num($logs_CP['prev_solde'], 5).' '.$langs->trans('days').'</td>';
|
||||||
|
print '<td style="text-align: right;">'.$detasign.$delta.'</td>';
|
||||||
print '<td style="text-align: right;">'.price2num($logs_CP['new_solde'], 5).' '.$langs->trans('days').'</td>';
|
print '<td style="text-align: right;">'.price2num($logs_CP['new_solde'], 5).' '.$langs->trans('days').'</td>';
|
||||||
|
print '<td></td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($log_holiday == '2')
|
if ($log_holiday == '2')
|
||||||
{
|
{
|
||||||
print '<tr '.$bc[false].'>';
|
print '<tr class="opacitymedium">';
|
||||||
print '<td colspan="8" class="opacitymedium">'.$langs->trans('NoRecordFound').'</td>';
|
print '<td colspan="10" class="opacitymedium">'.$langs->trans('NoRecordFound').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,6 +252,8 @@ print '</tbody>'."\n";
|
|||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1328,8 +1328,8 @@ if ($step == 5 && $datatoimport)
|
|||||||
}
|
}
|
||||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?step=5'.$param.'">'.$langs->trans("Modify").'</a>';
|
print ' <a href="'.$_SERVER["PHP_SELF"].'?step=5'.$param.'">'.$langs->trans("Modify").'</a>';
|
||||||
} else {
|
} else {
|
||||||
if ($objimport->array_import_updatekeys[0] && count($objimport->array_import_updatekeys[0]))
|
if (is_array($objimport->array_import_updatekeys[0]) && count($objimport->array_import_updatekeys[0]))
|
||||||
{//TODO dropdown UL is created inside nested SPANS
|
{ //TODO dropdown UL is created inside nested SPANS
|
||||||
print $form->multiselectarray('updatekeys', $objimport->array_import_updatekeys[0], $updatekeys, 0, 0, '', 1, '80%');
|
print $form->multiselectarray('updatekeys', $objimport->array_import_updatekeys[0], $updatekeys, 0, 0, '', 1, '80%');
|
||||||
print $form->textwithpicto("", $langs->trans("SelectPrimaryColumnsForUpdateAttempt"));
|
print $form->textwithpicto("", $langs->trans("SelectPrimaryColumnsForUpdateAttempt"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1855,3 +1855,4 @@ DisableProspectCustomerType=Disable the "Prospect + Customer" third party type (
|
|||||||
MAIN_OPTIMIZEFORTEXTBROWSER=Simplify interface for blind person
|
MAIN_OPTIMIZEFORTEXTBROWSER=Simplify interface for blind person
|
||||||
MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or Links.
|
MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or Links.
|
||||||
ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s'
|
ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s'
|
||||||
|
DefaultCustomerType=Default thirdparty type for "New customer" creation form
|
||||||
@ -187,7 +187,7 @@ MembersStatisticsByProperties=Members statistics by nature
|
|||||||
MembersByNature=This screen show you statistics on members by nature.
|
MembersByNature=This screen show you statistics on members by nature.
|
||||||
MembersByRegion=This screen show you statistics on members by region.
|
MembersByRegion=This screen show you statistics on members by region.
|
||||||
VATToUseForSubscriptions=VAT rate to use for subscriptions
|
VATToUseForSubscriptions=VAT rate to use for subscriptions
|
||||||
NoVatOnSubscription=No TVA for subscriptions
|
NoVatOnSubscription=No VAT for subscriptions
|
||||||
ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Product used for subscription line into invoice: %s
|
ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Product used for subscription line into invoice: %s
|
||||||
NameOrCompany=Name or company
|
NameOrCompany=Name or company
|
||||||
SubscriptionRecorded=Subscription recorded
|
SubscriptionRecorded=Subscription recorded
|
||||||
@ -196,3 +196,4 @@ EmailSentToMember=Email sent to member at %s
|
|||||||
SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired subscription
|
SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired subscription
|
||||||
SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5')
|
SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5')
|
||||||
MembershipPaid=Membership paid for current period (until %s)
|
MembershipPaid=Membership paid for current period (until %s)
|
||||||
|
YouMayFindYourInvoiceInThisEmail=You may find your invoice attached to this email
|
||||||
@ -147,7 +147,7 @@ CloneProduct=Clone product or service
|
|||||||
ConfirmCloneProduct=Are you sure you want to clone product or service <b>%s</b>?
|
ConfirmCloneProduct=Are you sure you want to clone product or service <b>%s</b>?
|
||||||
CloneContentProduct=Clone all main information of product/service
|
CloneContentProduct=Clone all main information of product/service
|
||||||
ClonePricesProduct=Clone prices
|
ClonePricesProduct=Clone prices
|
||||||
CloneCompositionProduct=Clone packaged product/service
|
CloneCompositionProduct=Clone virtual product/service
|
||||||
CloneCombinationsProduct=Clone product variants
|
CloneCombinationsProduct=Clone product variants
|
||||||
ProductIsUsed=This product is used
|
ProductIsUsed=This product is used
|
||||||
NewRefForClone=Ref. of new product/service
|
NewRefForClone=Ref. of new product/service
|
||||||
|
|||||||
@ -195,3 +195,4 @@ NoEmailSentToMember=Aucun e-mail envoyé à l'adhérent
|
|||||||
EmailSentToMember=Email envoyé à l'adhérent à %s
|
EmailSentToMember=Email envoyé à l'adhérent à %s
|
||||||
SendReminderForExpiredSubscriptionTitle=Envoyer une relance par mail pour les cotisations expirées
|
SendReminderForExpiredSubscriptionTitle=Envoyer une relance par mail pour les cotisations expirées
|
||||||
SendReminderForExpiredSubscription=Envoyer un rappel par e-mail aux membres lorsque l'adhésion est sur le point d'expirer (le paramètre est le nombre de jours avant la fin de l'adhésion pour envoyer le rappel. Il peut s'agir d'une liste de jours séparé par un point-virgule, par exemple '10;5;0;-5')
|
SendReminderForExpiredSubscription=Envoyer un rappel par e-mail aux membres lorsque l'adhésion est sur le point d'expirer (le paramètre est le nombre de jours avant la fin de l'adhésion pour envoyer le rappel. Il peut s'agir d'une liste de jours séparé par un point-virgule, par exemple '10;5;0;-5')
|
||||||
|
YouMayFindYourInvoiceInThisEmail=You pourrez trouver votre facture en pièce jointe à cet email
|
||||||
@ -126,7 +126,8 @@ dol_fiche_end();
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
if ($agentid > 0) $sql.= " s.rowid as socid, s.nom as name, s.code_client, s.client,";
|
$sql.= " s.rowid as socid,";
|
||||||
|
if ($agentid > 0) $sql.= " s.nom as name, s.code_client, s.client,";
|
||||||
$sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,";
|
$sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,";
|
||||||
$sql.= " sum(d.total_ht) as selling_price,";
|
$sql.= " sum(d.total_ht) as selling_price,";
|
||||||
// Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this)
|
// Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this)
|
||||||
@ -213,20 +214,31 @@ if ($result)
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$pa = $objp->buying_price;
|
$seller_nb = 1;
|
||||||
$pv = $objp->selling_price;
|
if ($objp->socid > 0) {
|
||||||
$marge = $objp->marge;
|
// sql nb sellers
|
||||||
|
$sql_seller = "SELECT COUNT(sc.rowid) as nb";
|
||||||
|
$sql_seller .= " FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
|
||||||
|
$sql_seller .= " WHERE sc.fk_soc = " . $objp->socid;
|
||||||
|
|
||||||
if ($marge < 0)
|
$resql_seller = $db->query($sql_seller);
|
||||||
{
|
if (!$resql_seller) {
|
||||||
$marginRate = ($pa != 0)?-1*(100 * $marge / $pa):'' ;
|
dol_print_error($db);
|
||||||
$markRate = ($pv != 0)?-1*(100 * $marge / $pv):'' ;
|
} else {
|
||||||
|
if ($obj_seller = $db->fetch_object($resql_seller)) {
|
||||||
|
if ($obj_seller->nb > 0) {
|
||||||
|
$seller_nb = $obj_seller->nb;
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$pa = $objp->buying_price / $seller_nb;
|
||||||
|
$pv = $objp->selling_price / $seller_nb;
|
||||||
|
$marge = $objp->marge / $seller_nb;
|
||||||
|
|
||||||
$marginRate = ($pa != 0)?(100 * $marge / $pa):'' ;
|
$marginRate = ($pa != 0)?(100 * $marge / $pa):'' ;
|
||||||
$markRate = ($pv != 0)?(100 * $marge / $pv):'' ;
|
$markRate = ($pv != 0)?(100 * $marge / $pv):'' ;
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
if ($agentid > 0) {
|
if ($agentid > 0) {
|
||||||
|
|||||||
@ -35,10 +35,9 @@ $backtopage = GETPOST('backtopage', 'alpha');
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
if($action=="update"){
|
if ($action=="update"){
|
||||||
$res1=dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_README', GETPOST('MODULEBUILDER_SPECIFIC_README'), 'chaine', 0, '', $conf->entity);
|
$res1=dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_README', GETPOST('MODULEBUILDER_SPECIFIC_README'), 'chaine', 0, '', $conf->entity);
|
||||||
if ($res1 < 0)
|
if ($res1 < 0) {
|
||||||
{
|
|
||||||
setEventMessages('ErrorFailedToSaveDate', null, 'errors');
|
setEventMessages('ErrorFailedToSaveDate', null, 'errors');
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -639,8 +639,7 @@ class MultiCurrency extends CommonObject
|
|||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
$response = json_decode($response);
|
$response = json_decode($response);
|
||||||
|
|
||||||
if ($response->success)
|
if ($response->success) {
|
||||||
{
|
|
||||||
|
|
||||||
$TRate = $response->quotes;
|
$TRate = $response->quotes;
|
||||||
$timestamp = $response->timestamp;
|
$timestamp = $response->timestamp;
|
||||||
|
|||||||
@ -277,19 +277,19 @@ class PriceExpression
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||||
|
|
||||||
if (! $error)
|
// if (! $error)
|
||||||
{
|
// {
|
||||||
if (! $notrigger)
|
// if (! $notrigger)
|
||||||
{
|
// {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// // Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// // want this action calls a trigger.
|
||||||
|
|
||||||
//// Call triggers
|
// //// Call triggers
|
||||||
//$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
// //$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
//// End call triggers
|
// //// End call triggers
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error)
|
if ($error)
|
||||||
|
|||||||
@ -201,19 +201,19 @@ class PriceGlobalVariable
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||||
|
|
||||||
if (! $error)
|
// if (! $error)
|
||||||
{
|
// {
|
||||||
if (! $notrigger)
|
// if (! $notrigger)
|
||||||
{
|
// {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// // Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// // want this action calls a trigger.
|
||||||
|
|
||||||
//// Call triggers
|
// //// Call triggers
|
||||||
//$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
// //$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
//// End call triggers
|
// //// End call triggers
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error)
|
if ($error)
|
||||||
|
|||||||
@ -225,19 +225,19 @@ class PriceGlobalVariableUpdater
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||||
|
|
||||||
if (! $error)
|
// if (! $error)
|
||||||
{
|
// {
|
||||||
if (! $notrigger)
|
// if (! $notrigger)
|
||||||
{
|
// {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// // Uncomment this and change MYOBJECT to your own tag if you
|
||||||
// want this action calls a trigger.
|
// // want this action calls a trigger.
|
||||||
|
|
||||||
//// Call triggers
|
// //// Call triggers
|
||||||
//$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
// //$result=$this->call_trigger('MYOBJECT_MODIFY',$user);
|
||||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
// //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||||
//// End call triggers
|
// //// End call triggers
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Commit or rollback
|
// Commit or rollback
|
||||||
if ($error)
|
if ($error)
|
||||||
|
|||||||
@ -126,7 +126,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
if ($user->rights->fournisseur->facture->lire)
|
if ($user->rights->fournisseur->facture->lire)
|
||||||
{
|
{
|
||||||
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, d.rowid, d.total_ht as total_ht,";
|
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, d.rowid, d.total_ht as line_total_ht,";
|
||||||
$sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.libelle, f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut as statut, d.qty";
|
$sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.libelle, f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut as statut, d.qty";
|
||||||
if (! $user->rights->societe->client->voir && ! $socid)
|
if (! $user->rights->societe->client->voir && ! $socid)
|
||||||
$sql .= ", sc.fk_soc, sc.fk_user ";
|
$sql .= ", sc.fk_soc, sc.fk_user ";
|
||||||
@ -205,7 +205,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print_liste_field_titre("SupplierCode", $_SERVER["PHP_SELF"], "s.code_client", "", $option, '', $sortfield, $sortorder);
|
print_liste_field_titre("SupplierCode", $_SERVER["PHP_SELF"], "s.code_client", "", $option, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", $option, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "f.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$total_ht+=$objp->total_ht;
|
$total_ht+=$objp->line_total_ht;
|
||||||
$total_qty+=$objp->qty;
|
$total_qty+=$objp->qty;
|
||||||
|
|
||||||
$supplierinvoicestatic->id = $objp->facid;
|
$supplierinvoicestatic->id = $objp->facid;
|
||||||
@ -237,7 +237,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print dol_print_date($db->jdate($objp->datef), 'dayhour') . "</td>";
|
print dol_print_date($db->jdate($objp->datef), 'dayhour') . "</td>";
|
||||||
print '<td align="center">' . $objp->qty . "</td>\n";
|
print '<td align="center">' . $objp->qty . "</td>\n";
|
||||||
print '<td align="right">' . price($objp->total_ht) . "</td>\n";
|
print '<td align="right">' . price($objp->line_total_ht) . "</td>\n";
|
||||||
print '<td align="right">' . $supplierinvoicestatic->LibStatut($objp->paye, $objp->statut, 5) . '</td>';
|
print '<td align="right">' . $supplierinvoicestatic->LibStatut($objp->paye, $objp->statut, 5) . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -62,16 +62,16 @@ class Warehouses extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
function get($id)
|
function get($id)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->stock->lire) {
|
if (! DolibarrApiAccess::$user->rights->stock->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->warehouse->fetch($id);
|
$result = $this->warehouse->fetch($id);
|
||||||
if( ! $result ) {
|
if ( ! $result ) {
|
||||||
throw new RestException(404, 'warehouse not found');
|
throw new RestException(404, 'warehouse not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('warehouse', $this->warehouse->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('warehouse', $this->warehouse->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,11 +191,11 @@ class Warehouses extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->warehouse->fetch($id);
|
$result = $this->warehouse->fetch($id);
|
||||||
if( ! $result ) {
|
if ( ! $result ) {
|
||||||
throw new RestException(404, 'warehouse not found');
|
throw new RestException(404, 'warehouse not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('stock', $this->warehouse->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('stock', $this->warehouse->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ class Warehouses extends DolibarrApi
|
|||||||
throw new RestException(404, 'warehouse not found');
|
throw new RestException(404, 'warehouse not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ! DolibarrApi::_checkAccessToResource('stock', $this->warehouse->id)) {
|
if ( ! DolibarrApi::_checkAccessToResource('stock', $this->warehouse->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user