Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into oop-pdf
This commit is contained in:
commit
ca9e33e809
@ -2,6 +2,12 @@
|
|||||||
host = https://www.transifex.com
|
host = https://www.transifex.com
|
||||||
lang_map = uz: uz_UZ
|
lang_map = uz: uz_UZ
|
||||||
|
|
||||||
|
[dolibarr.accountancy]
|
||||||
|
file_filter = htdocs/langs/<lang>/accountancy.lang
|
||||||
|
source_file = htdocs/langs/en_US/accountancy.lang
|
||||||
|
source_lang = en_US
|
||||||
|
type = MOZILLAPROPERTIES
|
||||||
|
|
||||||
[dolibarr.admin]
|
[dolibarr.admin]
|
||||||
file_filter = htdocs/langs/<lang>/admin.lang
|
file_filter = htdocs/langs/<lang>/admin.lang
|
||||||
source_file = htdocs/langs/en_US/admin.lang
|
source_file = htdocs/langs/en_US/admin.lang
|
||||||
|
|||||||
38
ChangeLog
38
ChangeLog
@ -31,7 +31,7 @@ For users:
|
|||||||
shown on main product card.
|
shown on main product card.
|
||||||
- New: Add event FICHINTER_CLASSIFY_BILLED into list of possible events to
|
- New: Add event FICHINTER_CLASSIFY_BILLED into list of possible events to
|
||||||
create an automatic event into agenda.
|
create an automatic event into agenda.
|
||||||
- New: Add new type of event (when type of events are used, not by default)
|
- New: Add new type of event (when type of events are used, not by default).
|
||||||
- New: Add country into table of thirdparties type. This will allow to provide
|
- New: Add country into table of thirdparties type. This will allow to provide
|
||||||
a list of thirdparty types specific to a country (like argentina that
|
a list of thirdparty types specific to a country (like argentina that
|
||||||
need type A or B).
|
need type A or B).
|
||||||
@ -42,16 +42,20 @@ For users:
|
|||||||
Differentiate text and img.
|
Differentiate text and img.
|
||||||
Use label into quick search form.
|
Use label into quick search form.
|
||||||
Use accesskey on form search.
|
Use accesskey on form search.
|
||||||
- New: Intervention documents are now available in ECM module
|
- New: Intervention documents are now available in ECM module.
|
||||||
- New: Add attachments on user card + in ECM module
|
- New: Add attachments on user card + in ECM module.
|
||||||
- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template.
|
- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template.
|
||||||
- New: [ task #1204 ] add Numering contrat module free (like leopard in product module)
|
- New: [ task #1204 ] add Numering contrat module free (like leopard in product module).
|
||||||
- New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice
|
- New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice.
|
||||||
- New: Enable supplier price log table
|
- New: Enable supplier price log table.
|
||||||
- New: [ task #1204 ] add a External reference to contract
|
- New: [ task #1204 ] add a External reference to contract.
|
||||||
- New: [ task #1218 ] Can drag and drop an event from calendar to change its day.
|
- New: [ task #1218 ] Can drag and drop an event from calendar to change its day.
|
||||||
- New: Optimize size of image static resources.
|
- New: Optimize size of image static resources.
|
||||||
- New: Add hourly and daily amount on user card. Add weekly working hours and salary on user card.
|
- New: Add hourly and daily amount on user card. Add weekly working hours and salary on user card.
|
||||||
|
- New: Content of predefined email come firstly from table llx_c_email_template, then translation key.
|
||||||
|
- New: Add option MAIN_GENERATE_INVOICES_WITH_PICTURE to show picture
|
||||||
|
onto PDF like MAIN_GENERATE_PROPOSALS_WITH_PICTURE dir for proposals.
|
||||||
|
- New: Add more search field in list of cheque deposits.
|
||||||
- Upgrade phpexcel lib to 1.7.8
|
- Upgrade phpexcel lib to 1.7.8
|
||||||
- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
|
- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
|
||||||
- Fix: [ bug #1470, #1472, #1473] User trigger problem
|
- Fix: [ bug #1470, #1472, #1473] User trigger problem
|
||||||
@ -70,6 +74,7 @@ For users:
|
|||||||
- Fix: [ bug #1506, #1507 ] ECM trigger error problem
|
- Fix: [ bug #1506, #1507 ] ECM trigger error problem
|
||||||
- Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message
|
- Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message
|
||||||
- Fix: [ bug #1537 ] Difference between societe.nom and adherent.societe.
|
- Fix: [ bug #1537 ] Difference between societe.nom and adherent.societe.
|
||||||
|
- New: Add dunning into accountancy report
|
||||||
|
|
||||||
New experimental module:
|
New experimental module:
|
||||||
- New: Module Accounting Expert to manage accountancy
|
- New: Module Accounting Expert to manage accountancy
|
||||||
@ -79,7 +84,6 @@ New experimental module:
|
|||||||
Ari Elbaz
|
Ari Elbaz
|
||||||
Florian Henry
|
Florian Henry
|
||||||
Juanjo Menent
|
Juanjo Menent
|
||||||
|
|
||||||
And to the contributors :
|
And to the contributors :
|
||||||
Jeff Info 2000 euros
|
Jeff Info 2000 euros
|
||||||
Nord Anim 120 euros
|
Nord Anim 120 euros
|
||||||
@ -95,25 +99,25 @@ For developers:
|
|||||||
- New: Add a css style "cursorpointer".
|
- New: Add a css style "cursorpointer".
|
||||||
- New: Select list of users can return user into hierarchy.
|
- New: Select list of users can return user into hierarchy.
|
||||||
- New: getBrowserInfo can return type of layout of browser (classic/phone/tablet)
|
- New: getBrowserInfo can return type of layout of browser (classic/phone/tablet)
|
||||||
- New: Add hook "searchAgendaFrom".
|
- New: Add hook "searchAgendaFrom" and "beforePDFCreation".
|
||||||
- New: Add trigger DON_UPDATE, DON_DELETE
|
- New: Add trigger DON_UPDATE, DON_DELETE
|
||||||
- New: Add country iso code on 3 chars into table of countries.
|
- New: Add country iso code on 3 chars into table of countries.
|
||||||
- Qual: Removed hard coded rowid into data init of table llx_c_action_trigger.
|
- Qual: Removed hard coded rowid into data init of table llx_c_action_trigger.
|
||||||
- LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE, RESOURCE_DELETE trigger called before SQL delete
|
- LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE, RESOURCE_DELETE trigger called before SQL delete
|
||||||
- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE.
|
- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE.
|
||||||
- New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE.
|
- New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE.
|
||||||
- New: Added hook "formConfirm" and "doActions" for supplier invoice card
|
- New: Added hook "formConfirm" and "doActions" for supplier invoice card.
|
||||||
- New: [ task #1511, #1426 ] Added hook "doActions" for supplier card and supplier order card
|
- New: [ task #1511, #1426 ] Added hook "doActions" for supplier card and supplier order card.
|
||||||
- New: renamed table llx_c_pays to llx_c_country & libelle field to label
|
- New: renamed table llx_c_pays to llx_c_country & libelle field to label.
|
||||||
- Qual: Renamed table llx_c_civilite into llx_c_civility
|
- Qual: Renamed table llx_c_civilite into llx_c_civility,
|
||||||
field civilite into label in the same table
|
field civilite into label in the same table,
|
||||||
and field civilite into civility in other table
|
and field civilite into civility in other table
|
||||||
|
|
||||||
WARNING: Following change may create regression for some external modules, but was necessary to make
|
WARNING: Following changes may create regression for some external modules, but was necessary to make
|
||||||
Dolibarr better:
|
Dolibarr better:
|
||||||
|
|
||||||
- Changed the way parameters are provided to scripts sync_xxx_ldap2dolibarr.php
|
- Changed the way parameters are provided to scripts sync_xxx_ldap2dolibarr.php
|
||||||
- Some field into database wwere renamed from "libelle" to "label".
|
- Some field into database were renamed from "libelle" to "label".
|
||||||
- Table llx_c_pays were renamed into llx_c_country.
|
- Table llx_c_pays were renamed into llx_c_country.
|
||||||
- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after
|
- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after
|
||||||
creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
|
creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
|
||||||
@ -136,6 +140,8 @@ For users:
|
|||||||
- Fix: Must unaccent strings into SEPA file.
|
- Fix: Must unaccent strings into SEPA file.
|
||||||
- Fix: Extrafield feature select from table should try to translate multiple column when not needed
|
- Fix: Extrafield feature select from table should try to translate multiple column when not needed
|
||||||
- Fix: cents for indian ruppes are calle paisa and paise.
|
- Fix: cents for indian ruppes are calle paisa and paise.
|
||||||
|
- Fix: Invoices payments may be older than invoices.
|
||||||
|
- Fix: [ bug #1593 ] Spanish Localtax IRPF not being calculated since 3.6.0 in supplier invoices when adding a line
|
||||||
|
|
||||||
***** ChangeLog for 3.6 compared to 3.5.* *****
|
***** ChangeLog for 3.6 compared to 3.5.* *****
|
||||||
For users:
|
For users:
|
||||||
|
|||||||
@ -68,4 +68,4 @@ Description: Web based software to manage a company or foundation
|
|||||||
PDF exports,
|
PDF exports,
|
||||||
And a lot more modules...
|
And a lot more modules...
|
||||||
.
|
.
|
||||||
You can also add third parties external modules or develop yours.
|
You can also add external modules from third parties or develop yours.
|
||||||
|
|||||||
@ -269,5 +269,4 @@ function createSkeleton($authentication,$skeleton)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return the results.
|
// Return the results.
|
||||||
$server->service($HTTP_RAW_POST_DATA);
|
$server->service(file_get_contents("php://input"));
|
||||||
|
|
||||||
|
|||||||
3
htdocs/.gitignore
vendored
3
htdocs/.gitignore
vendored
@ -2,7 +2,8 @@
|
|||||||
/custom*
|
/custom*
|
||||||
/extensions*
|
/extensions*
|
||||||
/nltechno*
|
/nltechno*
|
||||||
/anco*
|
/ancot*
|
||||||
|
/teclib*
|
||||||
/bootstrap*
|
/bootstrap*
|
||||||
/google*
|
/google*
|
||||||
/multicompany*
|
/multicompany*
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -130,9 +131,6 @@ print "<br>\n";
|
|||||||
* Params
|
* Params
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
$list = array (
|
|
||||||
'ACCOUNTING_SEPARATORCSV'
|
|
||||||
);
|
|
||||||
|
|
||||||
$num = count($list);
|
$num = count($list);
|
||||||
if ($num) {
|
if ($num) {
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -137,11 +137,11 @@ else {
|
|||||||
|
|
||||||
print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey'));
|
print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey'));
|
||||||
|
|
||||||
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
|
print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" />';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print '<a href="./card.php?action=create" class="butAction">' . $langs->trans("NewAccountingMvt") . '</a>';
|
print '<a href="./card.php?action=create" class="butAction">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||||
|
|
||||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/accountancy/class/Accountingaccount.class.php
|
* \file htdocs/accountancy/class/accountingaccount.class.php
|
||||||
* \ingroup Accounting Expert
|
* \ingroup Accounting Expert
|
||||||
* \brief Fichier de la classe des comptes comptable
|
* \brief Fichier de la classe des comptes comptable
|
||||||
*/
|
*/
|
||||||
@ -29,8 +29,11 @@
|
|||||||
class AccountingAccount
|
class AccountingAccount
|
||||||
{
|
{
|
||||||
var $db;
|
var $db;
|
||||||
|
var $error;
|
||||||
|
|
||||||
var $id;
|
var $id;
|
||||||
var $rowid;
|
var $rowid;
|
||||||
|
|
||||||
var $datec; // Creation date
|
var $datec; // Creation date
|
||||||
var $fk_pcg_version;
|
var $fk_pcg_version;
|
||||||
var $pcg_type;
|
var $pcg_type;
|
||||||
@ -62,8 +65,10 @@ class AccountingAccount
|
|||||||
*/
|
*/
|
||||||
function fetch($rowid = null, $account_number = null)
|
function fetch($rowid = null, $account_number = null)
|
||||||
{
|
{
|
||||||
if ($rowid || $account_number) {
|
if ($rowid || $account_number)
|
||||||
$sql = "SELECT * FROM " . MAIN_DB_PREFIX . "accountingaccount WHERE ";
|
{
|
||||||
|
$sql = "SELECT rowid, datec, tms, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, labe, fk_user_author, fk_user_modifn active";
|
||||||
|
$sql.= " FROM " . MAIN_DB_PREFIX . "accountingaccount WHERE";
|
||||||
if ($rowid) {
|
if ($rowid) {
|
||||||
$sql .= " rowid = '" . $rowid . "'";
|
$sql .= " rowid = '" . $rowid . "'";
|
||||||
} elseif ($account_number) {
|
} elseif ($account_number) {
|
||||||
@ -72,28 +77,40 @@ class AccountingAccount
|
|||||||
|
|
||||||
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
|
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result) {
|
if ($result)
|
||||||
|
{
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
} else {
|
|
||||||
return null;
|
if ($obj)
|
||||||
|
{
|
||||||
|
$this->id = $obj->rowid;
|
||||||
|
$this->rowid = $obj->rowid;
|
||||||
|
$this->datec = $obj->datec;
|
||||||
|
$this->tms = $obj->tms;
|
||||||
|
$this->fk_pcg_version = $obj->fk_pcg_version;
|
||||||
|
$this->pcg_type = $obj->pcg_type;
|
||||||
|
$this->pcg_subtype = $obj->pcg_subtype;
|
||||||
|
$this->account_number = $obj->account_number;
|
||||||
|
$this->account_parent = $obj->account_parent;
|
||||||
|
$this->label = $obj->label;
|
||||||
|
$this->fk_user_author = $obj->fk_user_author;
|
||||||
|
$this->fk_user_modif = $obj->fk_user_modif;
|
||||||
|
$this->active = $obj->active;
|
||||||
|
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->id = $obj->rowid;
|
return -1;
|
||||||
$this->rowid = $obj->rowid;
|
|
||||||
$this->datec = $obj->datec;
|
|
||||||
$this->tms = $obj->tms;
|
|
||||||
$this->fk_pcg_version = $obj->fk_pcg_version;
|
|
||||||
$this->pcg_type = $obj->pcg_type;
|
|
||||||
$this->pcg_subtype = $obj->pcg_subtype;
|
|
||||||
$this->account_number = $obj->account_number;
|
|
||||||
$this->account_parent = $obj->account_parent;
|
|
||||||
$this->label = $obj->label;
|
|
||||||
$this->fk_user_author = $obj->fk_user_author;
|
|
||||||
$this->fk_user_modif = $obj->fk_user_modif;
|
|
||||||
$this->active = $obj->active;
|
|
||||||
|
|
||||||
return $obj->rowid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -40,7 +41,7 @@ $langs->load("accountancy");
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->access)
|
if (! $user->rights->accounting->ventilation->read)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
|
|||||||
@ -2,7 +2,8 @@
|
|||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -43,7 +44,7 @@ $account_parent = GETPOST('account_parent');
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->access)
|
if (! $user->rights->accounting->ventilation->dispatch)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -44,7 +45,7 @@ $mesCasesCochees = GETPOST('mesCasesCochees', 'array');
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->access)
|
if (! $user->rights->accounting->ventilation->dispatch)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
|
|||||||
@ -132,7 +132,7 @@ if ($result) {
|
|||||||
$cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
|
$cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"));
|
||||||
$cptcli = (! empty($conf->global->COMPTA_ACCOUNT_CUSTOMER) ? $conf->global->COMPTA_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
$cptcli = (! empty($conf->global->COMPTA_ACCOUNT_CUSTOMER) ? $conf->global->COMPTA_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
||||||
$cpttva = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
|
$cpttva = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
|
||||||
$cptsociale = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) ? $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE : $langs->trans("CodeNotDef"));
|
$accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef"));
|
||||||
|
|
||||||
$tabpay = array ();
|
$tabpay = array ();
|
||||||
$tabbq = array ();
|
$tabbq = array ();
|
||||||
@ -173,21 +173,26 @@ if ($result) {
|
|||||||
|
|
||||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||||
|
|
||||||
if ($links[$key]['type'] == 'payment') {
|
if ($links[$key]['type'] == 'payment')
|
||||||
|
{
|
||||||
$paymentstatic->id = $links[$key]['url_id'];
|
$paymentstatic->id = $links[$key]['url_id'];
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
||||||
} else if ($links[$key]['type'] == 'payment_supplier') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'payment_supplier')
|
||||||
|
{
|
||||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||||
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
||||||
} else if ($links[$key]['type'] == 'company') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'company')
|
||||||
|
{
|
||||||
$societestatic->id = $links[$key]['url_id'];
|
$societestatic->id = $links[$key]['url_id'];
|
||||||
$societestatic->nom = $links[$key]['label'];
|
$societestatic->nom = $links[$key]['label'];
|
||||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'sc') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'sc')
|
||||||
|
{
|
||||||
$chargestatic->id = $links[$key]['url_id'];
|
$chargestatic->id = $links[$key]['url_id'];
|
||||||
$chargestatic->ref = $links[$key]['url_id'];
|
$chargestatic->ref = $links[$key]['url_id'];
|
||||||
|
|
||||||
@ -196,7 +201,9 @@ if ($result) {
|
|||||||
if ($reg[1] == 'socialcontribution')
|
if ($reg[1] == 'socialcontribution')
|
||||||
$reg[1] = 'SocialContribution';
|
$reg[1] = 'SocialContribution';
|
||||||
$chargestatic->lib = $langs->trans($reg[1]);
|
$chargestatic->lib = $langs->trans($reg[1]);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$chargestatic->lib = $links[$key]['label'];
|
$chargestatic->lib = $links[$key]['label'];
|
||||||
}
|
}
|
||||||
$chargestatic->ref = $chargestatic->lib;
|
$chargestatic->ref = $chargestatic->lib;
|
||||||
@ -211,29 +218,33 @@ if ($result) {
|
|||||||
|
|
||||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||||
$resultmid = $db->query($sqlmid);
|
$resultmid = $db->query($sqlmid);
|
||||||
if ($resultmid) {
|
if ($resultmid)
|
||||||
|
{
|
||||||
$objmid = $db->fetch_object($resultmid);
|
$objmid = $db->fetch_object($resultmid);
|
||||||
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
||||||
}
|
}
|
||||||
} else if ($links[$key]['type'] == 'payment_vat') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'payment_vat')
|
||||||
|
{
|
||||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'payment_salary') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'payment_salary')
|
||||||
|
{
|
||||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||||
$tabtp[$obj->rowid][$cptsociale] += $obj->amount;
|
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'banktransfert') {
|
}
|
||||||
|
else if ($links[$key]['type'] == 'banktransfert')
|
||||||
|
{
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||||
}
|
}
|
||||||
/*else {
|
/*else {
|
||||||
$tabtp [$obj->rowid] [$cptsociale] += $obj->amount;
|
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
||||||
@ -477,14 +488,14 @@ if ($action == 'export_csv') {
|
|||||||
|
|
||||||
llxHeader('', $langs->trans("BankJournal"));
|
llxHeader('', $langs->trans("BankJournal"));
|
||||||
|
|
||||||
$nom = $langs->trans("BankJournal");
|
$namereport = $langs->trans("BankJournal");
|
||||||
$nomlink = '';
|
$namelink = '';
|
||||||
$periodlink = '';
|
$periodlink = '';
|
||||||
$exportlink = '';
|
$exportlink = '';
|
||||||
$builddate = time();
|
$builddate = time();
|
||||||
$description = $langs->trans("DescBankJournal") . '<br>';
|
$description = $langs->trans("DescBankJournal") . '<br>';
|
||||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||||
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
report_header($namereport, $namelink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||||
|
|
||||||
print '<input type="button" class="button" style="float: right;" value="Export CSV" onclick="launch_export();" />';
|
print '<input type="button" class="button" style="float: right;" value="Export CSV" onclick="launch_export();" />';
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
// Class
|
// Class
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
@ -88,12 +88,12 @@ $sql = "SELECT f.rowid, f.ref, f.type, f.datef as df, f.libelle,";
|
|||||||
$sql .= " fd.rowid as fdid, fd.description, fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_type,";
|
$sql .= " fd.rowid as fdid, fd.description, fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_type,";
|
||||||
$sql .= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur, s.fournisseur,";
|
$sql .= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur, s.fournisseur,";
|
||||||
$sql .= " s.code_compta_fournisseur, p.accountancy_code_buy , ct.accountancy_code_buy as account_tva, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
|
$sql .= " s.code_compta_fournisseur, p.accountancy_code_buy , ct.accountancy_code_buy as account_tva, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det fd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product p ON p.rowid = fd.fk_product";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = fd.fk_product";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount aa ON aa.rowid = fd.fk_code_ventilation";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "facture_fourn f ON f.rowid = fd.fk_facture_fourn";
|
$sql .= " JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = fd.fk_facture_fourn";
|
||||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe s ON s.rowid = f.fk_soc";
|
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
|
||||||
$sql .= " WHERE f.fk_statut > 0 ";
|
$sql .= " WHERE f.fk_statut > 0 ";
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
if (! empty($conf->multicompany->enabled)) {
|
||||||
$sql .= " AND f.entity = " . $conf->entity;
|
$sql .= " AND f.entity = " . $conf->entity;
|
||||||
@ -113,13 +113,13 @@ if ($result) {
|
|||||||
// les variables
|
// les variables
|
||||||
$cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER)) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef");
|
$cptfour = (! empty($conf->global->COMPTA_ACCOUNT_SUPPLIER)) ? $conf->global->COMPTA_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef");
|
||||||
$cpttva = (! empty($conf->global->COMPTA_VAT_ACCOUNT)) ? $conf->global->COMPTA_VAT_ACCOUNT : $langs->trans("CodeNotDef");
|
$cpttva = (! empty($conf->global->COMPTA_VAT_ACCOUNT)) ? $conf->global->COMPTA_VAT_ACCOUNT : $langs->trans("CodeNotDef");
|
||||||
|
|
||||||
$tabfac = array ();
|
$tabfac = array ();
|
||||||
$tabht = array ();
|
$tabht = array ();
|
||||||
$tabtva = array ();
|
$tabtva = array ();
|
||||||
$tabttc = array ();
|
$tabttc = array ();
|
||||||
$tabcompany = array ();
|
$tabcompany = array ();
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ( $i < $num ) {
|
while ( $i < $num ) {
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
@ -133,7 +133,7 @@ if ($result) {
|
|||||||
$compta_prod = (! empty($conf->global->COMPTA_SERVICE_BUY_ACCOUNT)) ? $conf->global->COMPTA_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef");
|
$compta_prod = (! empty($conf->global->COMPTA_SERVICE_BUY_ACCOUNT)) ? $conf->global->COMPTA_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef");
|
||||||
}
|
}
|
||||||
$compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva);
|
$compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva);
|
||||||
|
|
||||||
$tabfac[$obj->rowid]["date"] = $obj->df;
|
$tabfac[$obj->rowid]["date"] = $obj->df;
|
||||||
$tabfac[$obj->rowid]["ref"] = $obj->ref;
|
$tabfac[$obj->rowid]["ref"] = $obj->ref;
|
||||||
$tabfac[$obj->rowid]["type"] = $obj->type;
|
$tabfac[$obj->rowid]["type"] = $obj->type;
|
||||||
@ -145,9 +145,9 @@ if ($result) {
|
|||||||
$tabcompany[$obj->rowid] = array (
|
$tabcompany[$obj->rowid] = array (
|
||||||
'id' => $obj->socid,
|
'id' => $obj->socid,
|
||||||
'name' => $obj->name,
|
'name' => $obj->name,
|
||||||
'code_fournisseur' => $obj->code_compta_fournisseur
|
'code_fournisseur' => $obj->code_compta_fournisseur
|
||||||
);
|
);
|
||||||
|
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -160,11 +160,11 @@ if ($result) {
|
|||||||
// Bookkeeping Write
|
// Bookkeeping Write
|
||||||
if ($action == 'writebookkeeping') {
|
if ($action == 'writebookkeeping') {
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
foreach ( $tabfac as $key => $val ) {
|
foreach ( $tabfac as $key => $val ) {
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
|
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
$bookkeeping->doc_ref = $val["ref"];
|
$bookkeeping->doc_ref = $val["ref"];
|
||||||
@ -180,10 +180,10 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->debit = ($mt <= 0) ? $mt : 0;
|
$bookkeeping->debit = ($mt <= 0) ? $mt : 0;
|
||||||
$bookkeeping->credit = ($mt > 0) ? $mt : 0;
|
$bookkeeping->credit = ($mt > 0) ? $mt : 0;
|
||||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||||
|
|
||||||
$bookkeeping->create();
|
$bookkeeping->create();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
@ -205,18 +205,18 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
|
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
|
||||||
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
|
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
|
||||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||||
|
|
||||||
$bookkeeping->create();
|
$bookkeeping->create();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
// var_dump($tabtva);
|
// var_dump($tabtva);
|
||||||
foreach ( $tabtva[$key] as $k => $mt ) {
|
foreach ( $tabtva[$key] as $k => $mt ) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
|
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
$bookkeeping->doc_ref = $val["ref"];
|
$bookkeeping->doc_ref = $val["ref"];
|
||||||
@ -232,7 +232,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
|
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
|
||||||
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
|
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
|
||||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||||
|
|
||||||
$bookkeeping->create();
|
$bookkeeping->create();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -243,21 +243,21 @@ if ($action == 'writebookkeeping') {
|
|||||||
|
|
||||||
if ($action == 'export_csv') {
|
if ($action == 'export_csv') {
|
||||||
$sep = $conf->global->ACCOUNTING_SEPARATORCSV;
|
$sep = $conf->global->ACCOUNTING_SEPARATORCSV;
|
||||||
|
|
||||||
header('Content-Type: text/csv');
|
header('Content-Type: text/csv');
|
||||||
header('Content-Disposition: attachment;filename=journal_achats.csv');
|
header('Content-Disposition: attachment;filename=journal_achats.csv');
|
||||||
|
|
||||||
if ($conf->global->ACCOUNTING_MODELCSV == 1) // Modèle Export Cegid Expert
|
if ($conf->global->ACCOUNTING_MODELCSV == 1) // Modèle Export Cegid Expert
|
||||||
{
|
{
|
||||||
foreach ( $tabfac as $key => $val ) {
|
foreach ( $tabfac as $key => $val ) {
|
||||||
$date = dol_print_date($db->jdate($val["date"]), '%d%m%Y');
|
$date = dol_print_date($db->jdate($val["date"]), '%d%m%Y');
|
||||||
|
|
||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
$companystatic->client = $tabcompany[$key]['code_client'];
|
$companystatic->client = $tabcompany[$key]['code_client'];
|
||||||
|
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
print $date . $sep;
|
print $date . $sep;
|
||||||
print $conf->global->ACCOUNTING_PURCHASE_JOURNAL . $sep;
|
print $conf->global->ACCOUNTING_PURCHASE_JOURNAL . $sep;
|
||||||
@ -270,7 +270,7 @@ if ($action == 'export_csv') {
|
|||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
// var_dump($tabtva);
|
// var_dump($tabtva);
|
||||||
foreach ( $tabtva[$key] as $k => $mt ) {
|
foreach ( $tabtva[$key] as $k => $mt ) {
|
||||||
@ -289,7 +289,7 @@ if ($action == 'export_csv') {
|
|||||||
print $date . $sep;
|
print $date . $sep;
|
||||||
print $conf->global->ACCOUNTING_PURCHASE_JOURNAL . $sep;
|
print $conf->global->ACCOUNTING_PURCHASE_JOURNAL . $sep;
|
||||||
print length_accountg($conf->global->COMPTA_ACCOUNT_SUPPLIER) . $sep;
|
print length_accountg($conf->global->COMPTA_ACCOUNT_SUPPLIER) . $sep;
|
||||||
|
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||||
print length_accounta(html_entity_decode($k)) . $sep;
|
print length_accounta(html_entity_decode($k)) . $sep;
|
||||||
print ($mt < 0 ? 'D' : 'C') . $sep;
|
print ($mt < 0 ? 'D' : 'C') . $sep;
|
||||||
@ -303,11 +303,11 @@ if ($action == 'export_csv') {
|
|||||||
{
|
{
|
||||||
foreach ( $tabfac as $key => $val ) {
|
foreach ( $tabfac as $key => $val ) {
|
||||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||||
|
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
$companystatic->client = $tabcompany[$key]['code_client'];
|
$companystatic->client = $tabcompany[$key]['code_client'];
|
||||||
|
|
||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
@ -333,7 +333,7 @@ if ($action == 'export_csv') {
|
|||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Third party
|
// Third party
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
print '"' . $val["ref"] . '"' . $sep;
|
print '"' . $val["ref"] . '"' . $sep;
|
||||||
@ -347,11 +347,11 @@ if ($action == 'export_csv') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
llxHeader('', '', '');
|
llxHeader('', '', '');
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$nom = $langs->trans("PurchasesJournal");
|
$nom = $langs->trans("PurchasesJournal");
|
||||||
$nomlink = '';
|
$nomlink = '';
|
||||||
$periodlink = '';
|
$periodlink = '';
|
||||||
@ -364,11 +364,11 @@ if ($action == 'export_csv') {
|
|||||||
$description .= $langs->trans("DepositsAreIncluded");
|
$description .= $langs->trans("DepositsAreIncluded");
|
||||||
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1);
|
||||||
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
|
||||||
|
|
||||||
print '<input type="button" class="button" style="float: right;" value="Export CSV" onclick="launch_export();" />';
|
print '<input type="button" class="button" style="float: right;" value="Export CSV" onclick="launch_export();" />';
|
||||||
|
|
||||||
print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
|
print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
|
||||||
|
|
||||||
print '
|
print '
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function launch_export() {
|
function launch_export() {
|
||||||
@ -382,12 +382,12 @@ if ($action == 'export_csv') {
|
|||||||
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
|
||||||
}
|
}
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show result array
|
* Show result array
|
||||||
*/
|
*/
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
@ -397,21 +397,21 @@ if ($action == 'export_csv') {
|
|||||||
print "<td>" . $langs->trans("Account") . "</td>";
|
print "<td>" . $langs->trans("Account") . "</td>";
|
||||||
print "<t><td>" . $langs->trans("Type") . "</td><td align='right'>" . $langs->trans("Debit") . "</td><td align='right'>" . $langs->trans("Credit") . "</td>";
|
print "<t><td>" . $langs->trans("Type") . "</td><td align='right'>" . $langs->trans("Debit") . "</td><td align='right'>" . $langs->trans("Credit") . "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var = true;
|
$var = true;
|
||||||
$r = '';
|
$r = '';
|
||||||
|
|
||||||
$invoicestatic = new FactureFournisseur($db);
|
$invoicestatic = new FactureFournisseur($db);
|
||||||
$companystatic = new Fournisseur($db);
|
$companystatic = new Fournisseur($db);
|
||||||
|
|
||||||
foreach ( $tabfac as $key => $val ) {
|
foreach ( $tabfac as $key => $val ) {
|
||||||
$invoicestatic->id = $key;
|
$invoicestatic->id = $key;
|
||||||
$invoicestatic->ref = $val["ref"];
|
$invoicestatic->ref = $val["ref"];
|
||||||
$invoicestatic->type = $val["type"];
|
$invoicestatic->type = $val["type"];
|
||||||
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
|
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
|
||||||
|
|
||||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||||
|
|
||||||
// Product / Service
|
// Product / Service
|
||||||
foreach ( $tabht[$key] as $k => $mt ) {
|
foreach ( $tabht[$key] as $k => $mt ) {
|
||||||
if ($mt) {
|
if ($mt) {
|
||||||
@ -441,16 +441,16 @@ if ($action == 'export_csv') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "<tr " . $bc[$var] . ">";
|
print "<tr " . $bc[$var] . ">";
|
||||||
|
|
||||||
// Third party
|
// Third party
|
||||||
// print "<td>".$conf->global->COMPTA_JOURNAL_BUY."</td>";
|
// print "<td>".$conf->global->COMPTA_JOURNAL_BUY."</td>";
|
||||||
print "<td>" . $date . "</td>";
|
print "<td>" . $date . "</td>";
|
||||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||||
|
|
||||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||||
$companystatic->id = $tabcompany[$key]['id'];
|
$companystatic->id = $tabcompany[$key]['id'];
|
||||||
$companystatic->name = $tabcompany[$key]['name'];
|
$companystatic->name = $tabcompany[$key]['name'];
|
||||||
|
|
||||||
print "<td>" . length_accounta($k);
|
print "<td>" . length_accounta($k);
|
||||||
print "</td><td>" . $langs->trans("ThirdParty");
|
print "</td><td>" . $langs->trans("ThirdParty");
|
||||||
print ' (' . $companystatic->getNomUrl(0, 'supplier', 16) . ')';
|
print ' (' . $companystatic->getNomUrl(0, 'supplier', 16) . ')';
|
||||||
@ -459,12 +459,12 @@ if ($action == 'export_csv') {
|
|||||||
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||||
}
|
}
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,11 +90,11 @@ $sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tot
|
|||||||
$sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,";
|
$sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,";
|
||||||
$sql .= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte, ";
|
$sql .= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte, ";
|
||||||
$sql .= " ct.accountancy_code_sell as account_tva";
|
$sql .= " ct.accountancy_code_sell as account_tva";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet fd";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product p ON p.rowid = fd.fk_product";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = fd.fk_product";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount aa ON aa.rowid = fd.fk_code_ventilation";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON aa.rowid = fd.fk_code_ventilation";
|
||||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "facture f ON f.rowid = fd.fk_facture";
|
$sql .= " JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||||
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe s ON s.rowid = f.fk_soc";
|
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
|
||||||
$sql .= " WHERE fd.fk_code_ventilation > 0 ";
|
$sql .= " WHERE fd.fk_code_ventilation > 0 ";
|
||||||
if (! empty($conf->multicompany->enabled)) {
|
if (! empty($conf->multicompany->enabled)) {
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent s<jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -45,7 +46,7 @@ $codeventil = GETPOST('codeventil');
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->access)
|
if (! $user->rights->accounting->ventilation->dispatch)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
if ($action == 'ventil' && $user->rights->accounting->access) {
|
if ($action == 'ventil' && $user->rights->accounting->access) {
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -39,7 +40,7 @@ $langs->load("accountancy");
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->access)
|
if (! $user->rights->accounting->ventilation->read)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
|
|||||||
@ -4,7 +4,8 @@
|
|||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>a
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -44,7 +45,7 @@ $langs->load("accountancy");
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->access)
|
if (! $user->rights->accounting->ventilation->dispatch)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -45,7 +46,7 @@ $mesCasesCochees = GETPOST('mesCasesCochees', 'array');
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->access)
|
if (! $user->rights->accounting->ventilation->dispatch)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
|
|||||||
@ -130,7 +130,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->errors=$nuser->error;
|
$this->errors[]=$nuser->error;
|
||||||
|
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -276,7 +276,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
// Create subscription
|
// Create subscription
|
||||||
$crowid=$object->cotisation($datecotisation, $cotisation, $accountid, $operation, $label, $num_chq, $emetteur_nom, $emetteur_banque, $datesubend, $option);
|
$crowid=$object->cotisation($datecotisation, $cotisation, $accountid, $operation, $label, $num_chq, $emetteur_nom, $emetteur_banque, $datesubend);
|
||||||
if ($crowid <= 0)
|
if ($crowid <= 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
@ -324,8 +324,8 @@ if ($conf->use_javascript_ajax)
|
|||||||
'<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.$titre.'</a></strong>'.
|
'<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.$titre.'</a></strong>'.
|
||||||
'</td><td align="right">'.
|
'</td><td align="right">'.
|
||||||
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default',0,'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
|
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default',0,'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
|
||||||
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default',0,'class="menuNew" id="new'.$menu['rowid'].'"').'</a> '.
|
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
|
||||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default',0,'class="menuDel" id="del'.$menu['rowid'].'"').'</a> '.
|
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
|
||||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Monter","1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Descendre","1downarrow").'</a>'.
|
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Monter","1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Descendre","1downarrow").'</a>'.
|
||||||
'</td></tr></table>'
|
'</td></tr></table>'
|
||||||
);
|
);
|
||||||
|
|||||||
@ -55,7 +55,7 @@ if ($action == "set")
|
|||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
$id=GETPOST('PRELEVEMENT_ID_BANKACCOUNT','int');
|
$id=GETPOST('PRELEVEMENT_ID_BANKACCOUNT','int');
|
||||||
$account = new Account($db, $id);
|
$account = new Account($db);
|
||||||
|
|
||||||
if($account->fetch($id)>0)
|
if($account->fetch($id)>0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -366,9 +366,11 @@ print $langs->trans("BackupDescY").'<br><br>';
|
|||||||
id="filename_template"
|
id="filename_template"
|
||||||
value="<?php
|
value="<?php
|
||||||
$prefix='dump';
|
$prefix='dump';
|
||||||
if ($label == 'MySQL') $prefix='mysqldump';
|
$ext='.sql';
|
||||||
if ($label == 'PostgreSQL') $prefix='pg_dump';
|
if ($label == 'MySQL') { $prefix='mysqldump'; $ext='sql'; }
|
||||||
$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.sql';
|
//if ($label == 'PostgreSQL') { $prefix='pg_dump'; $ext='dump'; }
|
||||||
|
if ($label == 'PostgreSQL') { $prefix='pg_dump'; $ext='sql'; }
|
||||||
|
$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.'.$ext;
|
||||||
echo $file;
|
echo $file;
|
||||||
?>" /> <br>
|
?>" /> <br>
|
||||||
<br>
|
<br>
|
||||||
@ -376,16 +378,19 @@ echo $file;
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Define compressions array
|
// Define compressions array
|
||||||
$compression=array(
|
$compression=array();
|
||||||
'none' => array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("None")),
|
|
||||||
'gz' => array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip")),
|
|
||||||
);
|
|
||||||
if ($label == 'MySQL')
|
if ($label == 'MySQL')
|
||||||
{
|
{
|
||||||
// $compression['zip']= array('function' => 'dol_compress', 'id' => 'radio_compression_zip', 'label' => $langs->trans("FormatZip")); // Not open source format. Must implement dol_compress function
|
$compression['none'] = array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("None"));
|
||||||
|
$compression['gz'] = array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip"));
|
||||||
|
// $compression['zip']= array('function' => 'dol_compress', 'id' => 'radio_compression_zip', 'label' => $langs->trans("FormatZip")); // Not open source format. Must implement dol_compress function
|
||||||
$compression['bz'] = array('function' => 'bzopen', 'id' => 'radio_compression_bzip', 'label' => $langs->trans("Bzip2"));
|
$compression['bz'] = array('function' => 'bzopen', 'id' => 'radio_compression_bzip', 'label' => $langs->trans("Bzip2"));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$compression['none'] = array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("Default"));
|
||||||
|
$compression['gz'] = array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip"));
|
||||||
|
}
|
||||||
|
|
||||||
// Show compression choices
|
// Show compression choices
|
||||||
print '<div class="formelementrow">';
|
print '<div class="formelementrow">';
|
||||||
|
|||||||
@ -94,7 +94,7 @@ print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'<br><br>';
|
|||||||
?>
|
?>
|
||||||
<div class="formelementrow">
|
<div class="formelementrow">
|
||||||
<input type="radio" name="what" value="mysql" id="radio_dump_postgresql"<?php echo ($radio_dump=='postgresql_options'?' checked':''); ?> />
|
<input type="radio" name="what" value="mysql" id="radio_dump_postgresql"<?php echo ($radio_dump=='postgresql_options'?' checked':''); ?> />
|
||||||
<label for="radio_dump_postgresql">PostgreSQL Restore (pg_restore)</label>
|
<label for="radio_dump_postgresql">PostgreSQL Restore (pg_restore or psql)</label>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -170,6 +170,9 @@ else if ($label == 'PostgreSQL')
|
|||||||
}*/
|
}*/
|
||||||
$paramcrypted.=" -W";
|
$paramcrypted.=" -W";
|
||||||
$paramclear.=" -W";
|
$paramclear.=" -W";
|
||||||
|
// With psql:
|
||||||
|
$paramcrypted.=" -f";
|
||||||
|
$paramclear.=" -f";
|
||||||
|
|
||||||
echo $langs->trans("ImportPostgreSqlDesc");
|
echo $langs->trans("ImportPostgreSqlDesc");
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2006-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -289,7 +289,9 @@ if ($what == 'postgresql')
|
|||||||
if (preg_match("/\s/",$command)) $command=$command=escapeshellarg($command); // Use quotes on command
|
if (preg_match("/\s/",$command)) $command=$command=escapeshellarg($command); // Use quotes on command
|
||||||
|
|
||||||
//$param=escapeshellarg($dolibarr_main_db_name)." -h ".escapeshellarg($dolibarr_main_db_host)." -u ".escapeshellarg($dolibarr_main_db_user)." -p".escapeshellarg($dolibarr_main_db_pass);
|
//$param=escapeshellarg($dolibarr_main_db_name)." -h ".escapeshellarg($dolibarr_main_db_host)." -u ".escapeshellarg($dolibarr_main_db_user)." -p".escapeshellarg($dolibarr_main_db_pass);
|
||||||
$param=" --no-tablespaces --inserts -h ".$dolibarr_main_db_host;
|
//$param="-F c";
|
||||||
|
$param="-F p";
|
||||||
|
$param.=" --no-tablespaces --inserts -h ".$dolibarr_main_db_host;
|
||||||
$param.=" -U ".$dolibarr_main_db_user;
|
$param.=" -U ".$dolibarr_main_db_user;
|
||||||
if (! empty($dolibarr_main_db_port)) $param.=" -p ".$dolibarr_main_db_port;
|
if (! empty($dolibarr_main_db_port)) $param.=" -p ".$dolibarr_main_db_port;
|
||||||
if (GETPOST("sql_compat") && GETPOST("sql_compat") == 'ANSI') $param.=" --disable-dollar-quoting";
|
if (GETPOST("sql_compat") && GETPOST("sql_compat") == 'ANSI') $param.=" --disable-dollar-quoting";
|
||||||
|
|||||||
@ -50,7 +50,7 @@ print "<br>\n";
|
|||||||
$template_dir = DOL_DOCUMENT_ROOT.'/core/tpl/';
|
$template_dir = DOL_DOCUMENT_ROOT.'/core/tpl/';
|
||||||
|
|
||||||
$interfaces = new Interfaces($db);
|
$interfaces = new Interfaces($db);
|
||||||
$triggers = $interfaces->getTriggersList(0,'priority');
|
$triggers = $interfaces->getTriggersList();
|
||||||
|
|
||||||
print '<table class="noborder">
|
print '<table class="noborder">
|
||||||
<tr class="liste_titre">
|
<tr class="liste_titre">
|
||||||
|
|||||||
@ -65,7 +65,7 @@ llxHeader('',$langs->trans("Categories"),$help_url);
|
|||||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
print_fiche_titre($langs->trans("CategoriesSetup"),$linkback,'setup');
|
print_fiche_titre($langs->trans("CategoriesSetup"),$linkback,'setup');
|
||||||
|
|
||||||
$head = categoriesadmin_prepare_head(null);
|
$head = categoriesadmin_prepare_head();
|
||||||
|
|
||||||
dol_fiche_head($head, 'attributes_categories', $langs->trans("Categories"), 0, 'category');
|
dol_fiche_head($head, 'attributes_categories', $langs->trans("Categories"), 0, 'category');
|
||||||
|
|
||||||
|
|||||||
@ -396,7 +396,7 @@ else if ($id || $ref)
|
|||||||
llxHeader("","",$langs->trans("Member"));
|
llxHeader("","",$langs->trans("Member"));
|
||||||
|
|
||||||
|
|
||||||
$head=member_prepare_head($member, $user);
|
$head=member_prepare_head($member);
|
||||||
$titre=$langs->trans("Member");
|
$titre=$langs->trans("Member");
|
||||||
$picto='user';
|
$picto='user';
|
||||||
dol_fiche_head($head, 'category', $titre,0,$picto);
|
dol_fiche_head($head, 'category', $titre,0,$picto);
|
||||||
@ -471,7 +471,7 @@ else if ($id || $ref)
|
|||||||
llxHeader("","",$langs->trans("Contact"));
|
llxHeader("","",$langs->trans("Contact"));
|
||||||
|
|
||||||
|
|
||||||
$head=contact_prepare_head($object, $user);
|
$head=contact_prepare_head($object);
|
||||||
$titre=$langs->trans("ContactsAddresses");
|
$titre=$langs->trans("ContactsAddresses");
|
||||||
$picto='contact';
|
$picto='contact';
|
||||||
dol_fiche_head($head, 'category', $titre,0,$picto);
|
dol_fiche_head($head, 'category', $titre,0,$picto);
|
||||||
|
|||||||
@ -52,17 +52,19 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
var $datep; // Date action start (datep)
|
var $datep; // Date action start (datep)
|
||||||
var $datef; // Date action end (datep2)
|
var $datef; // Date action end (datep2)
|
||||||
var $durationp = -1; // -1=Unkown duration
|
var $durationp = -1; // -1=Unkown duration // deprecated
|
||||||
var $fulldayevent = 0; // 1=Event on full day
|
var $fulldayevent = 0; // 1=Event on full day
|
||||||
var $punctual = 1; // Milestone
|
var $punctual = 1; // Milestone
|
||||||
var $percentage; // Percentage
|
var $percentage; // Percentage
|
||||||
var $location; // Location
|
var $location; // Location
|
||||||
|
|
||||||
var $transparency; // Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events)
|
var $transparency; // Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events)
|
||||||
var $priority; // Small int (0 By default)
|
var $priority; // Small int (0 By default)
|
||||||
var $note; // Description
|
var $note; // Description
|
||||||
|
|
||||||
var $usertodo; // Object user that must do action
|
var $userassigned; // Array of user ids
|
||||||
var $userdone; // Object user that did action
|
var $usertodo; // Object user of owner
|
||||||
|
var $userdone; // Object user that did action (deprecated)
|
||||||
|
|
||||||
var $societe; // Company linked to action (optional)
|
var $societe; // Company linked to action (optional)
|
||||||
var $contact; // Contact linked to action (optional)
|
var $contact; // Contact linked to action (optional)
|
||||||
@ -89,10 +91,10 @@ class ActionComm extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
$this->author = new stdClass();
|
//$this->author = new stdClass();
|
||||||
$this->usermod = new stdClass();
|
//$this->usermod = new stdClass();
|
||||||
$this->usertodo = new stdClass();
|
//$this->usertodo = new stdClass();
|
||||||
$this->userdone = new stdClass();
|
//$this->userdone = new stdClass();
|
||||||
$this->societe = new stdClass();
|
$this->societe = new stdClass();
|
||||||
$this->contact = new stdClass();
|
$this->contact = new stdClass();
|
||||||
}
|
}
|
||||||
@ -122,7 +124,7 @@ class ActionComm extends CommonObject
|
|||||||
if (empty($this->transparency)) $this->transparency = 0;
|
if (empty($this->transparency)) $this->transparency = 0;
|
||||||
if ($this->percentage > 100) $this->percentage = 100;
|
if ($this->percentage > 100) $this->percentage = 100;
|
||||||
//if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
//if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
||||||
if (! empty($this->datep) && ! empty($this->datef)) $this->durationp=($this->datef - $this->datep);
|
if (! empty($this->datep) && ! empty($this->datef)) $this->durationp=($this->datef - $this->datep); // deprecated
|
||||||
//if (! empty($this->date) && ! empty($this->dateend)) $this->durationa=($this->dateend - $this->date);
|
//if (! empty($this->date) && ! empty($this->dateend)) $this->durationa=($this->dateend - $this->date);
|
||||||
if (! empty($this->datep) && ! empty($this->datef) && $this->datep > $this->datef) $this->datef=$this->datep;
|
if (! empty($this->datep) && ! empty($this->datef) && $this->datep > $this->datef) $this->datef=$this->datep;
|
||||||
//if (! empty($this->date) && ! empty($this->dateend) && $this->date > $this->dateend) $this->dateend=$this->date;
|
//if (! empty($this->date) && ! empty($this->dateend) && $this->date > $this->dateend) $this->dateend=$this->date;
|
||||||
@ -167,7 +169,7 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= "(datec,";
|
$sql.= "(datec,";
|
||||||
$sql.= "datep,";
|
$sql.= "datep,";
|
||||||
$sql.= "datep2,";
|
$sql.= "datep2,";
|
||||||
$sql.= "durationp,";
|
$sql.= "durationp,"; // deprecated
|
||||||
$sql.= "fk_action,";
|
$sql.= "fk_action,";
|
||||||
$sql.= "code,";
|
$sql.= "code,";
|
||||||
$sql.= "fk_soc,";
|
$sql.= "fk_soc,";
|
||||||
@ -186,7 +188,7 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= "'".$this->db->idate($now)."',";
|
$sql.= "'".$this->db->idate($now)."',";
|
||||||
$sql.= (strval($this->datep)!=''?"'".$this->db->idate($this->datep)."'":"null").",";
|
$sql.= (strval($this->datep)!=''?"'".$this->db->idate($this->datep)."'":"null").",";
|
||||||
$sql.= (strval($this->datef)!=''?"'".$this->db->idate($this->datef)."'":"null").",";
|
$sql.= (strval($this->datef)!=''?"'".$this->db->idate($this->datef)."'":"null").",";
|
||||||
$sql.= (isset($this->durationp) && $this->durationp >= 0 && $this->durationp != ''?"'".$this->durationp."'":"null").",";
|
$sql.= (isset($this->durationp) && $this->durationp >= 0 && $this->durationp != ''?"'".$this->durationp."'":"null").","; // deprecated
|
||||||
$sql.= (isset($this->type_id)?$this->type_id:"null").",";
|
$sql.= (isset($this->type_id)?$this->type_id:"null").",";
|
||||||
$sql.= (isset($this->code)?" '".$this->code."'":"null").",";
|
$sql.= (isset($this->code)?" '".$this->code."'":"null").",";
|
||||||
$sql.= (isset($this->societe->id) && $this->societe->id > 0?" '".$this->societe->id."'":"null").",";
|
$sql.= (isset($this->societe->id) && $this->societe->id > 0?" '".$this->societe->id."'":"null").",";
|
||||||
@ -258,9 +260,10 @@ class ActionComm extends CommonObject
|
|||||||
* Load object from database
|
* Load object from database
|
||||||
*
|
*
|
||||||
* @param int $id Id of action to get
|
* @param int $id Id of action to get
|
||||||
|
* @param string $ref Ref of action to get
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch($id)
|
function fetch($id, $ref='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -269,8 +272,8 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= " a.ref_ext,";
|
$sql.= " a.ref_ext,";
|
||||||
$sql.= " a.datep,";
|
$sql.= " a.datep,";
|
||||||
$sql.= " a.datep2,";
|
$sql.= " a.datep2,";
|
||||||
|
$sql.= " a.durationp,"; // deprecated
|
||||||
$sql.= " a.datec,";
|
$sql.= " a.datec,";
|
||||||
$sql.= " a.durationp,";
|
|
||||||
$sql.= " a.tms as datem,";
|
$sql.= " a.tms as datem,";
|
||||||
$sql.= " a.code, a.label, a.note,";
|
$sql.= " a.code, a.label, a.note,";
|
||||||
$sql.= " a.fk_soc,";
|
$sql.= " a.fk_soc,";
|
||||||
@ -286,7 +289,9 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)";
|
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
|
||||||
$sql.= " WHERE a.id=".$id." AND a.fk_action=c.id";
|
$sql.= " WHERE a.fk_action=c.id";
|
||||||
|
if ($ref) $sql.= " AND a.id=".$ref; // No field ref, we use id
|
||||||
|
else $sql.= " AND a.id=".$id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
@ -311,6 +316,7 @@ class ActionComm extends CommonObject
|
|||||||
$this->label = $obj->label;
|
$this->label = $obj->label;
|
||||||
$this->datep = $this->db->jdate($obj->datep);
|
$this->datep = $this->db->jdate($obj->datep);
|
||||||
$this->datef = $this->db->jdate($obj->datep2);
|
$this->datef = $this->db->jdate($obj->datep2);
|
||||||
|
$this->durationp = $this->durationp; // deprecated
|
||||||
|
|
||||||
$this->datec = $this->db->jdate($obj->datec);
|
$this->datec = $this->db->jdate($obj->datec);
|
||||||
$this->datem = $this->db->jdate($obj->datem);
|
$this->datem = $this->db->jdate($obj->datem);
|
||||||
@ -434,7 +440,7 @@ class ActionComm extends CommonObject
|
|||||||
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
|
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
|
||||||
if ($this->percentage > 100) $this->percentage = 100;
|
if ($this->percentage > 100) $this->percentage = 100;
|
||||||
//if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
//if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date;
|
||||||
if ($this->datep && $this->datef) $this->durationp=($this->datef - $this->datep);
|
if ($this->datep && $this->datef) $this->durationp=($this->datef - $this->datep); // deprecated
|
||||||
//if ($this->date && $this->dateend) $this->durationa=($this->dateend - $this->date);
|
//if ($this->date && $this->dateend) $this->durationa=($this->dateend - $this->date);
|
||||||
if ($this->datep && $this->datef && $this->datep > $this->datef) $this->datef=$this->datep;
|
if ($this->datep && $this->datef && $this->datep > $this->datef) $this->datef=$this->datep;
|
||||||
//if ($this->date && $this->dateend && $this->date > $this->dateend) $this->dateend=$this->date;
|
//if ($this->date && $this->dateend && $this->date > $this->dateend) $this->dateend=$this->date;
|
||||||
@ -455,6 +461,7 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= ", label = ".($this->label ? "'".$this->db->escape($this->label)."'":"null");
|
$sql.= ", label = ".($this->label ? "'".$this->db->escape($this->label)."'":"null");
|
||||||
$sql.= ", datep = ".(strval($this->datep)!='' ? "'".$this->db->idate($this->datep)."'" : 'null');
|
$sql.= ", datep = ".(strval($this->datep)!='' ? "'".$this->db->idate($this->datep)."'" : 'null');
|
||||||
$sql.= ", datep2 = ".(strval($this->datef)!='' ? "'".$this->db->idate($this->datef)."'" : 'null');
|
$sql.= ", datep2 = ".(strval($this->datef)!='' ? "'".$this->db->idate($this->datef)."'" : 'null');
|
||||||
|
$sql.= ", durationp = ".(isset($this->durationp) && $this->durationp >= 0 && $this->durationp != ''?"'".$this->durationp."'":"null"); // deprecated
|
||||||
$sql.= ", note = ".($this->note ? "'".$this->db->escape($this->note)."'":"null");
|
$sql.= ", note = ".($this->note ? "'".$this->db->escape($this->note)."'":"null");
|
||||||
$sql.= ", fk_soc =". ($this->societe->id > 0 ? "'".$this->societe->id."'":"null");
|
$sql.= ", fk_soc =". ($this->societe->id > 0 ? "'".$this->societe->id."'":"null");
|
||||||
$sql.= ", fk_project =". ($this->fk_project > 0 ? "'".$this->fk_project."'":"null");
|
$sql.= ", fk_project =". ($this->fk_project > 0 ? "'".$this->fk_project."'":"null");
|
||||||
@ -857,7 +864,7 @@ class ActionComm extends CommonObject
|
|||||||
$sql = "SELECT a.id,";
|
$sql = "SELECT a.id,";
|
||||||
$sql.= " a.datep,"; // Start
|
$sql.= " a.datep,"; // Start
|
||||||
$sql.= " a.datep2,"; // End
|
$sql.= " a.datep2,"; // End
|
||||||
$sql.= " a.durationp,";
|
$sql.= " a.durationp,"; // deprecated
|
||||||
$sql.= " a.datec, a.tms as datem,";
|
$sql.= " a.datec, a.tms as datem,";
|
||||||
$sql.= " a.label, a.code, a.note, a.fk_action as type_id,";
|
$sql.= " a.label, a.code, a.note, a.fk_action as type_id,";
|
||||||
$sql.= " a.fk_soc,";
|
$sql.= " a.fk_soc,";
|
||||||
@ -934,12 +941,12 @@ class ActionComm extends CommonObject
|
|||||||
$event['type']=$type;
|
$event['type']=$type;
|
||||||
$datestart=$this->db->jdate($obj->datep)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600));
|
$datestart=$this->db->jdate($obj->datep)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600));
|
||||||
$dateend=$this->db->jdate($obj->datep2)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600));
|
$dateend=$this->db->jdate($obj->datep2)-(empty($conf->global->AGENDA_EXPORT_FIX_TZ)?0:($conf->global->AGENDA_EXPORT_FIX_TZ*3600));
|
||||||
$duration=$obj->durationp;
|
$duration=($datestart && $dateend)?($dateend - $datestart):0;
|
||||||
$event['summary']=$obj->label.($obj->socname?" (".$obj->socname.")":"");
|
$event['summary']=$obj->label.($obj->socname?" (".$obj->socname.")":"");
|
||||||
$event['desc']=$obj->note;
|
$event['desc']=$obj->note;
|
||||||
$event['startdate']=$datestart;
|
$event['startdate']=$datestart;
|
||||||
$event['duration']=$duration; // Not required with type 'journal'
|
|
||||||
$event['enddate']=$dateend; // Not required with type 'journal'
|
$event['enddate']=$dateend; // Not required with type 'journal'
|
||||||
|
$event['duration']=$duration; // Not required with type 'journal'
|
||||||
$event['author']=dolGetFirstLastname($obj->firstname, $obj->lastname);
|
$event['author']=dolGetFirstLastname($obj->firstname, $obj->lastname);
|
||||||
$event['priority']=$obj->priority;
|
$event['priority']=$obj->priority;
|
||||||
$event['fulldayevent']=$obj->fulldayevent;
|
$event['fulldayevent']=$obj->fulldayevent;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -87,20 +87,37 @@ $hookmanager->initHooks(array('actioncard'));
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (GETPOST('addassignedtouser'))
|
// Remove user to assigned list
|
||||||
|
if (! empty($_POST['removedassigned']))
|
||||||
|
{
|
||||||
|
$idtoremove=$_POST['removedassigned'];
|
||||||
|
if (! empty($_SESSION['assignedtouser'])) $tmpassigneduserids=dol_json_decode($_SESSION['assignedtouser'],1);
|
||||||
|
else $tmpassigneduserids=array();
|
||||||
|
unset($tmpassigneduserids[$idtoremove]);
|
||||||
|
//var_dump($_POST['removedassigned']);exit;
|
||||||
|
$_SESSION['assignedtouser']=dol_json_encode($tmpassigneduserids);
|
||||||
|
$donotclearsession=1;
|
||||||
|
if ($action == 'add') $action = 'create';
|
||||||
|
if ($action == 'update') $action = 'edit';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add user to assigned list
|
||||||
|
if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser'))
|
||||||
{
|
{
|
||||||
// Add a new user
|
// Add a new user
|
||||||
if (GETPOST('affectedto') > 0)
|
if (GETPOST('affectedto') > 0)
|
||||||
{
|
{
|
||||||
$assignedtouser=array();
|
$assignedtouser=array();
|
||||||
if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true);
|
if (! empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true);
|
||||||
$assignedtouser[GETPOST('affectedto')]=array('transparency'=>GETPOST('transparency'),'mandatory'=>1);
|
$assignedtouser[GETPOST('affectedto')]=array('transparency'=>GETPOST('transparency'),'mandatory'=>1);
|
||||||
$_SESSION['assignedtouser']=dol_json_encode($assignedtouser);
|
$_SESSION['assignedtouser']=dol_json_encode($assignedtouser);
|
||||||
}
|
}
|
||||||
$donotclearsession=1;
|
$donotclearsession=1;
|
||||||
$action='create';
|
if ($action == 'add') $action = 'create';
|
||||||
|
if ($action == 'update') $action = 'edit';
|
||||||
}
|
}
|
||||||
// Add action
|
|
||||||
|
// Add event
|
||||||
if ($action == 'add')
|
if ($action == 'add')
|
||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
@ -131,22 +148,22 @@ if ($action == 'add')
|
|||||||
// Check parameters
|
// Check parameters
|
||||||
if (! $datef && $percentage == 100)
|
if (! $datef && $percentage == 100)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++; $donotclearsession=1;
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")), 'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")), 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && ! GETPOST('label'))
|
if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && ! GETPOST('label'))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++; $donotclearsession=1;
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Title")), 'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Title")), 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialisation objet cactioncomm
|
// Initialisation objet cactioncomm
|
||||||
if (! GETPOST('actioncode'))
|
if (! GETPOST('actioncode') > 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++; $donotclearsession=1;
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors');
|
||||||
}
|
}
|
||||||
@ -161,7 +178,6 @@ if ($action == 'add')
|
|||||||
$object->priority = GETPOST("priority")?GETPOST("priority"):0;
|
$object->priority = GETPOST("priority")?GETPOST("priority"):0;
|
||||||
$object->fulldayevent = (! empty($fulldayevent)?1:0);
|
$object->fulldayevent = (! empty($fulldayevent)?1:0);
|
||||||
$object->location = GETPOST("location");
|
$object->location = GETPOST("location");
|
||||||
$object->transparency = (GETPOST("transparency")=='on'?1:0);
|
|
||||||
$object->label = trim(GETPOST('label'));
|
$object->label = trim(GETPOST('label'));
|
||||||
$object->fk_element = GETPOST("fk_element");
|
$object->fk_element = GETPOST("fk_element");
|
||||||
$object->elementtype = GETPOST("elementtype");
|
$object->elementtype = GETPOST("elementtype");
|
||||||
@ -186,18 +202,35 @@ if ($action == 'add')
|
|||||||
$object->percentage = $percentage;
|
$object->percentage = $percentage;
|
||||||
$object->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) * 60;
|
$object->duree=((float) (GETPOST('dureehour') * 60) + (float) GETPOST('dureemin')) * 60;
|
||||||
|
|
||||||
$usertodo=new User($db);
|
$listofuserid=dol_json_decode($_SESSION['assignedtouser']);
|
||||||
if ($_POST["affectedto"] > 0)
|
$i=0;
|
||||||
|
foreach($listofuserid as $key => $value)
|
||||||
{
|
{
|
||||||
$usertodo->fetch($_POST["affectedto"]);
|
if ($i == 0) // First entry
|
||||||
|
{
|
||||||
|
$usertodo=new User($db);
|
||||||
|
if ($key > 0)
|
||||||
|
{
|
||||||
|
$usertodo->fetch($key);
|
||||||
|
}
|
||||||
|
$object->usertodo = $usertodo;
|
||||||
|
$object->transparency = (GETPOST("transparency")=='on'?1:0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$object->userassigned[$key]=array('id'=>$key, 'transparency'=>(GETPOST("transparency")=='on'?1:0));
|
||||||
|
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
$object->usertodo = $usertodo;
|
|
||||||
$userdone=new User($db);
|
if (! empty($conf->global->AGENDA_ENABLE_DONEBY))
|
||||||
if ($_POST["doneby"] > 0)
|
|
||||||
{
|
{
|
||||||
$userdone->fetch($_POST["doneby"]);
|
$userdone=new User($db);
|
||||||
|
if ($_POST["doneby"] > 0)
|
||||||
|
{
|
||||||
|
$userdone->fetch($_POST["doneby"]);
|
||||||
|
}
|
||||||
|
$object->userdone = $userdone;
|
||||||
}
|
}
|
||||||
$object->userdone = $userdone;
|
|
||||||
|
|
||||||
$object->note = trim($_POST["note"]);
|
$object->note = trim($_POST["note"]);
|
||||||
if (isset($_POST["contactid"])) $object->contact = $contact;
|
if (isset($_POST["contactid"])) $object->contact = $contact;
|
||||||
@ -214,16 +247,22 @@ if ($action == 'add')
|
|||||||
if (! empty($conf->phenix->enabled) && GETPOST('add_phenix') == 'on') $object->use_phenix=1;
|
if (! empty($conf->phenix->enabled) && GETPOST('add_phenix') == 'on') $object->use_phenix=1;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
|
if (empty($object->usertodo))
|
||||||
|
{
|
||||||
|
$error++; $donotclearsession=1;
|
||||||
|
$action = 'create';
|
||||||
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("ActionAffectedTo")), 'errors');
|
||||||
|
}
|
||||||
if ($object->type_code == 'AC_RDV' && ($datep == '' || ($datef == '' && empty($fulldayevent))))
|
if ($object->type_code == 'AC_RDV' && ($datep == '' || ($datef == '' && empty($fulldayevent))))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++; $donotclearsession=1;
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")), 'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")), 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! GETPOST('apyear') && ! GETPOST('adyear'))
|
if (! GETPOST('apyear') && ! GETPOST('adyear'))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++; $donotclearsession=1;
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")), 'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")), 'errors');
|
||||||
}
|
}
|
||||||
@ -265,42 +304,14 @@ if ($action == 'add')
|
|||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error=$langs->trans($object->error);
|
$error=$langs->trans($object->error);
|
||||||
setEventMessage($error,'errors');
|
setEventMessage($error,'errors');
|
||||||
$action = 'create';
|
$action = 'create'; $donotclearsession=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
$langs->load("errors");
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
$action = 'create'; $donotclearsession=1;
|
||||||
if (! empty($object->error)) setEventMessage($langs->trans($object->error), 'errors');
|
|
||||||
if (count($object->errors)) setEventMessage($object->errors, 'errors');
|
|
||||||
|
|
||||||
$action = 'create';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Action suppression de l'action
|
|
||||||
*/
|
|
||||||
if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes')
|
|
||||||
{
|
|
||||||
$object->fetch($id);
|
|
||||||
|
|
||||||
if ($user->rights->agenda->myactions->delete
|
|
||||||
|| $user->rights->agenda->allactions->delete)
|
|
||||||
{
|
|
||||||
$result=$object->delete();
|
|
||||||
|
|
||||||
if ($result >= 0)
|
|
||||||
{
|
|
||||||
header("Location: index.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setEventMessage($object->error,'errors');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -348,25 +359,59 @@ if ($action == 'update')
|
|||||||
|
|
||||||
if (! $datef && $percentage == 100)
|
if (! $datef && $percentage == 100)
|
||||||
{
|
{
|
||||||
$error=$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd"));
|
$error++; $donotclearsession=1;
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")),$object->errors,'errors');
|
||||||
$action = 'edit';
|
$action = 'edit';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Users
|
// Users
|
||||||
$usertodo=new User($db);
|
$listofuserid=dol_json_decode($_SESSION['assignedtouser']);
|
||||||
if ($_POST["affectedto"])
|
$i=0;
|
||||||
|
foreach($listofuserid as $key => $value)
|
||||||
{
|
{
|
||||||
$usertodo->fetch($_POST["affectedto"]);
|
if ($i == 0) // First entry
|
||||||
}
|
{
|
||||||
$object->usertodo = $usertodo;
|
$usertodo=new User($db);
|
||||||
$object->transparency=(GETPOST("transparency")=='on'?1:0);
|
if ($key > 0)
|
||||||
|
{
|
||||||
|
$usertodo->fetch($key);
|
||||||
|
}
|
||||||
|
$object->usertodo = $usertodo;
|
||||||
|
$object->transparency=(GETPOST("transparency")=='on'?1:0);
|
||||||
|
}
|
||||||
|
|
||||||
$userdone=new User($db);
|
$object->userassigned[$key]=array('id'=>$key, 'transparency'=>(GETPOST("transparency")=='on'?1:0));
|
||||||
if ($_POST["doneby"])
|
|
||||||
{
|
$i++;
|
||||||
$userdone->fetch($_POST["doneby"]);
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->global->AGENDA_ENABLE_DONEBY))
|
||||||
|
{
|
||||||
|
$userdone=new User($db);
|
||||||
|
if ($_POST["doneby"])
|
||||||
|
{
|
||||||
|
$userdone->fetch($_POST["doneby"]);
|
||||||
|
}
|
||||||
|
$object->userdone = $userdone;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check parameters
|
||||||
|
if (! GETPOST('actioncode') > 0)
|
||||||
|
{
|
||||||
|
$error++; $donotclearsession=1;
|
||||||
|
$action = 'edit';
|
||||||
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$result=$cactioncomm->fetch(GETPOST('actioncode'));
|
||||||
|
}
|
||||||
|
if (empty($object->usertodo))
|
||||||
|
{
|
||||||
|
$error++; $donotclearsession=1;
|
||||||
|
$action = 'edit';
|
||||||
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("ActionAffectedTo")), 'errors');
|
||||||
}
|
}
|
||||||
$object->userdone = $userdone;
|
|
||||||
|
|
||||||
// Fill array 'array_options' with data from add form
|
// Fill array 'array_options' with data from add form
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||||
@ -383,17 +428,13 @@ if ($action == 'update')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
setEventMessages($object->error,$object->errors,'errors');
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result < 0)
|
if (! $error)
|
||||||
{
|
|
||||||
setEventMessage($object->error,'errors');
|
|
||||||
setEventMessage($object->errors,'errors');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (! empty($backtopage))
|
if (! empty($backtopage))
|
||||||
{
|
{
|
||||||
@ -403,6 +444,30 @@ if ($action == 'update')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* delete event
|
||||||
|
*/
|
||||||
|
if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes')
|
||||||
|
{
|
||||||
|
$object->fetch($id);
|
||||||
|
|
||||||
|
if ($user->rights->agenda->myactions->delete
|
||||||
|
|| $user->rights->agenda->allactions->delete)
|
||||||
|
{
|
||||||
|
$result=$object->delete();
|
||||||
|
|
||||||
|
if ($result >= 0)
|
||||||
|
{
|
||||||
|
header("Location: index.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($object->error,$object->errors,'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Action move update, used when user move an event in calendar by drag'n drop
|
* Action move update, used when user move an event in calendar by drag'n drop
|
||||||
*/
|
*/
|
||||||
@ -576,15 +641,14 @@ if ($action == 'create')
|
|||||||
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.(GETPOST('location')?GETPOST('location'):$object->location).'"></td></tr>';
|
print '<tr><td>'.$langs->trans("Location").'</td><td colspan="3"><input type="text" name="location" size="50" value="'.(GETPOST('location')?GETPOST('location'):$object->location).'"></td></tr>';
|
||||||
|
|
||||||
// Assigned to
|
// Assigned to
|
||||||
$var=false;
|
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
|
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td>';
|
||||||
if (empty($donotclearsession))
|
if (empty($donotclearsession))
|
||||||
{
|
{
|
||||||
$assignedtouser=GETPOST("affectedtouser")?GETPOST("affectedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id);
|
$assignedtouser=GETPOST("affectedtouser")?GETPOST("affectedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id);
|
||||||
$_SESSION['assignedtouser']=dol_json_encode(array($assignedtouser=>array('transparency'=>1,'mandatory'=>1)));
|
$_SESSION['assignedtouser']=dol_json_encode(array($assignedtouser=>array('transparency'=>1,'mandatory'=>1)));
|
||||||
}
|
}
|
||||||
//print $form->select_dolusers_forevent('affectedto',1);
|
print $form->select_dolusers_forevent(($action=='create'?'add':'update'),'affectedto',1);
|
||||||
print $form->select_dolusers(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1);
|
//print $form->select_dolusers(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -599,7 +663,7 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Realised by
|
// Realised by
|
||||||
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
if (! empty($conf->global->AGENDA_ENABLE_DONEBY))
|
||||||
{
|
{
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td>';
|
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td>';
|
||||||
print $form->select_dolusers(GETPOST("doneby")?GETPOST("doneby"):(! empty($object->userdone->id) && $percent==100?$object->userdone->id:0),'doneby',1);
|
print $form->select_dolusers(GETPOST("doneby")?GETPOST("doneby"):(! empty($object->userdone->id) && $percent==100?$object->userdone->id:0),'doneby',1);
|
||||||
@ -704,11 +768,6 @@ if ($action == 'create')
|
|||||||
// View or edit
|
// View or edit
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
if ($error)
|
|
||||||
{
|
|
||||||
dol_htmloutput_errors($error);
|
|
||||||
}
|
|
||||||
|
|
||||||
$result=$object->fetch($id);
|
$result=$object->fetch($id);
|
||||||
$object->fetch_optionals($id,$extralabels);
|
$object->fetch_optionals($id,$extralabels);
|
||||||
|
|
||||||
@ -833,7 +892,14 @@ if ($id > 0)
|
|||||||
|
|
||||||
// Assigned to
|
// Assigned to
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
print '<tr><td class="nowrap">'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
|
||||||
print $form->select_dolusers($object->usertodo->id>0?$object->usertodo->id:-1,'affectedto',1);
|
$listofuserid=array();
|
||||||
|
if (empty($donotclearsession))
|
||||||
|
{
|
||||||
|
if (is_object($object->usertodo)) $listofuserid[$object->usertodo->id]=array('id'=>$object->usertodo->id,'transparency'=>$object->transparency);
|
||||||
|
$_SESSION['assignedtouser']=dol_json_encode($listofuserid);
|
||||||
|
}
|
||||||
|
print $form->select_dolusers_forevent(($action=='create'?'add':'update'),'affectedto',1);
|
||||||
|
//print $form->select_dolusers($object->usertodo->id>0?$object->usertodo->id:-1,'affectedto',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table><br><br><table class="border" width="100%">';
|
print '</table><br><br><table class="border" width="100%">';
|
||||||
@ -844,7 +910,7 @@ if ($id > 0)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Realised by
|
// Realised by
|
||||||
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
if (! empty($conf->global->AGENDA_ENABLE_DONEBY))
|
||||||
{
|
{
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
||||||
print $form->select_dolusers($object->userdone->id> 0?$object->userdone->id:-1,'doneby',1);
|
print $form->select_dolusers($object->userdone->id> 0?$object->userdone->id:-1,'doneby',1);
|
||||||
|
|||||||
@ -327,11 +327,11 @@ if ($id > 0)
|
|||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
if ($action == 'editconditions')
|
if ($action == 'editconditions')
|
||||||
{
|
{
|
||||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->cond_reglement_id,'cond_reglement_id',-1,1);
|
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id',1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->cond_reglement_id,'none');
|
$form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_id, 'none');
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -66,6 +66,7 @@ $origin = GETPOST('origin', 'alpha');
|
|||||||
$originid = GETPOST('originid', 'int');
|
$originid = GETPOST('originid', 'int');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$lineid = GETPOST('lineid', 'int');
|
$lineid = GETPOST('lineid', 'int');
|
||||||
|
$contactid = GETPOST('contactid','int');
|
||||||
|
|
||||||
// PDF
|
// PDF
|
||||||
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0));
|
||||||
@ -76,8 +77,7 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($co
|
|||||||
$NBLINES = 4;
|
$NBLINES = 4;
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! empty($user->societe_id))
|
if (! empty($user->societe_id)) $socid = $user->societe_id;
|
||||||
$socid = $user->societe_id;
|
|
||||||
$result = restrictedArea($user, 'propal', $id);
|
$result = restrictedArea($user, 'propal', $id);
|
||||||
|
|
||||||
$object = new Propal($db);
|
$object = new Propal($db);
|
||||||
@ -261,7 +261,7 @@ else if ($action == 'add' && $user->rights->propal->creer) {
|
|||||||
$object->remise_percent = GETPOST('remise_percent');
|
$object->remise_percent = GETPOST('remise_percent');
|
||||||
$object->remise_absolue = GETPOST('remise_absolue');
|
$object->remise_absolue = GETPOST('remise_absolue');
|
||||||
$object->socid = GETPOST('socid');
|
$object->socid = GETPOST('socid');
|
||||||
$object->contactid = GETPOST('contactidp');
|
$object->contactid = GETPOST('contactid');
|
||||||
$object->fk_project = GETPOST('projectid');
|
$object->fk_project = GETPOST('projectid');
|
||||||
$object->modelpdf = GETPOST('model');
|
$object->modelpdf = GETPOST('model');
|
||||||
$object->author = $user->id; // deprecated
|
$object->author = $user->id; // deprecated
|
||||||
@ -285,7 +285,7 @@ else if ($action == 'add' && $user->rights->propal->creer) {
|
|||||||
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
||||||
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
||||||
$object->fk_account = GETPOST('fk_account', 'int');
|
$object->fk_account = GETPOST('fk_account', 'int');
|
||||||
$object->contactid = GETPOST('contactidp');
|
$object->contactid = GETPOST('contactid');
|
||||||
$object->fk_project = GETPOST('projectid');
|
$object->fk_project = GETPOST('projectid');
|
||||||
$object->modelpdf = GETPOST('model');
|
$object->modelpdf = GETPOST('model');
|
||||||
$object->author = $user->id; // deprecated
|
$object->author = $user->id; // deprecated
|
||||||
@ -450,9 +450,9 @@ else if ($action == 'add' && $user->rights->propal->creer) {
|
|||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
// Insertion contact par defaut si defini
|
// Insertion contact par defaut si defini
|
||||||
if (GETPOST('contactidp') > 0)
|
if (GETPOST('contactid') > 0)
|
||||||
{
|
{
|
||||||
$result = $object->add_contact(GETPOST('contactidp'), 'CUSTOMER', 'external');
|
$result = $object->add_contact(GETPOST('contactid'), 'CUSTOMER', 'external');
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
@ -1256,7 +1256,8 @@ $companystatic = new Societe($db);
|
|||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
// Add new proposal
|
// Add new proposal
|
||||||
if ($action == 'create') {
|
if ($action == 'create')
|
||||||
|
{
|
||||||
print_fiche_titre($langs->trans("NewProp"));
|
print_fiche_titre($langs->trans("NewProp"));
|
||||||
|
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
@ -1356,12 +1357,16 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
print '</tr>' . "\n";
|
print '</tr>' . "\n";
|
||||||
|
|
||||||
// Contacts
|
// Contacts (ask contact only if thirdparty already defined). TODO do this also into order and invoice.
|
||||||
if ($socid > 0) {
|
if ($socid > 0)
|
||||||
|
{
|
||||||
print "<tr><td>" . $langs->trans("DefaultContact") . '</td><td colspan="2">';
|
print "<tr><td>" . $langs->trans("DefaultContact") . '</td><td colspan="2">';
|
||||||
$form->select_contacts($soc->id, $setcontact, 'contactidp', 1, $srccontactslist);
|
$form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($socid > 0)
|
||||||
|
{
|
||||||
// Ligne info remises tiers
|
// Ligne info remises tiers
|
||||||
print '<tr><td>' . $langs->trans('Discounts') . '</td><td colspan="2">';
|
print '<tr><td>' . $langs->trans('Discounts') . '</td><td colspan="2">';
|
||||||
if ($soc->remise_percent)
|
if ($soc->remise_percent)
|
||||||
|
|||||||
@ -233,7 +233,7 @@ else if ($action == 'add' && $user->rights->commande->creer) {
|
|||||||
$object->date_livraison = $datelivraison;
|
$object->date_livraison = $datelivraison;
|
||||||
$object->shipping_method_id = GETPOST('shipping_method_id', 'int');
|
$object->shipping_method_id = GETPOST('shipping_method_id', 'int');
|
||||||
$object->fk_delivery_address = GETPOST('fk_address');
|
$object->fk_delivery_address = GETPOST('fk_address');
|
||||||
$object->contactid = GETPOST('contactidp');
|
$object->contactid = GETPOST('contactid');
|
||||||
|
|
||||||
// If creation from another object of another module (Example: origin=propal, originid=1)
|
// If creation from another object of another module (Example: origin=propal, originid=1)
|
||||||
if (! empty($origin) && ! empty($originid)) {
|
if (! empty($origin) && ! empty($originid)) {
|
||||||
@ -383,8 +383,8 @@ else if ($action == 'add' && $user->rights->commande->creer) {
|
|||||||
|
|
||||||
// Insert default contacts if defined
|
// Insert default contacts if defined
|
||||||
if ($object_id > 0) {
|
if ($object_id > 0) {
|
||||||
if (GETPOST('contactidp')) {
|
if (GETPOST('contactid')) {
|
||||||
$result = $object->add_contact(GETPOST('contactidp'), 'CUSTOMER', 'external');
|
$result = $object->add_contact(GETPOST('contactid'), 'CUSTOMER', 'external');
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessage($langs->trans("ErrorFailedToAddContact"), 'errors');
|
setEventMessage($langs->trans("ErrorFailedToAddContact"), 'errors');
|
||||||
$error ++;
|
$error ++;
|
||||||
@ -1484,7 +1484,7 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
|||||||
*/
|
*/
|
||||||
if ($socid > 0) {
|
if ($socid > 0) {
|
||||||
print "<tr><td>" . $langs->trans("DefaultContact") . '</td><td colspan="2">';
|
print "<tr><td>" . $langs->trans("DefaultContact") . '</td><td colspan="2">';
|
||||||
$form->select_contacts($soc->id, $setcontact, 'contactidp', 1, $srccontactslist);
|
$form->select_contacts($soc->id, $setcontact, 'contactid', 1, $srccontactslist);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Ligne info remises tiers
|
// Ligne info remises tiers
|
||||||
|
|||||||
@ -338,9 +338,10 @@ class Account extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Create bank account into database
|
* Create bank account into database
|
||||||
*
|
*
|
||||||
|
* @param User $user Object user making creation
|
||||||
* @return int < 0 if KO, > 0 if OK
|
* @return int < 0 if KO, > 0 if OK
|
||||||
*/
|
*/
|
||||||
function create()
|
function create($user='')
|
||||||
{
|
{
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
|
|
||||||
@ -665,10 +666,9 @@ class Account extends CommonObject
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$this->db->free($result);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -102,7 +102,7 @@ if ($_POST["action"] == 'add')
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$id = $account->create($user->id);
|
$id = $account->create($user);
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
$_GET["id"]=$id; // Force chargement page en mode visu
|
$_GET["id"]=$id; // Force chargement page en mode visu
|
||||||
@ -306,7 +306,7 @@ if ($action == 'create')
|
|||||||
$doleditor=new DolEditor('account_comment',$account->comment,'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
|
$doleditor=new DolEditor('account_comment',$account->comment,'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -510,7 +510,7 @@ else
|
|||||||
$account->fetch(GETPOST('id','int'));
|
$account->fetch(GETPOST('id','int'));
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("EditFinancialAccount"));
|
print_fiche_titre($langs->trans("EditFinancialAccount"));
|
||||||
|
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
print "\n".'<script type="text/javascript" language="javascript">';
|
print "\n".'<script type="text/javascript" language="javascript">';
|
||||||
@ -614,7 +614,7 @@ else
|
|||||||
$doleditor=new DolEditor('account_comment',(isset($_POST["account_comment"])?$_POST["account_comment"]:$account->comment),'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
|
$doleditor=new DolEditor('account_comment',(isset($_POST["account_comment"])?$_POST["account_comment"]:$account->comment),'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -635,7 +635,7 @@ else
|
|||||||
// Accountancy journal
|
// Accountancy journal
|
||||||
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
|
||||||
print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(isset($_POST["accountancy_journal"])?$_POST["accountancy_journal"]:$account->accountancy_journal).'"></td></tr>';
|
print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(isset($_POST["accountancy_journal"])?$_POST["accountancy_journal"]:$account->accountancy_journal).'"></td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<center><br><input value="'.$langs->trans("Modify").'" type="submit" class="button">';
|
print '<center><br><input value="'.$langs->trans("Modify").'" type="submit" class="button">';
|
||||||
|
|||||||
@ -263,11 +263,13 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
print '<td align="center" class="nowrap">';
|
print '<td align="center" class="nowrap">';
|
||||||
print '<span id="datevalue_'.$objp->rowid.'">'.dol_print_date($db->jdate($objp->dv),"day")."</span>";
|
print '<span id="datevalue_'.$objp->rowid.'">'.dol_print_date($db->jdate($objp->dv),"day")."</span>";
|
||||||
print ' <span> ';
|
print '  ';
|
||||||
|
print '<span>';
|
||||||
print '<a class="ajax" href="'.$_SERVER['PHP_SELF'].'?action=dvprev&account='.$acct->id.'&rowid='.$objp->rowid.'">';
|
print '<a class="ajax" href="'.$_SERVER['PHP_SELF'].'?action=dvprev&account='.$acct->id.'&rowid='.$objp->rowid.'">';
|
||||||
print img_edit_remove() . "</a> ";
|
print img_edit_remove() . "</a> ";
|
||||||
print '<a class="ajax" href="'.$_SERVER['PHP_SELF'].'?action=dvnext&account='.$acct->id.'&rowid='.$objp->rowid.'">';
|
print '<a class="ajax" href="'.$_SERVER['PHP_SELF'].'?action=dvnext&account='.$acct->id.'&rowid='.$objp->rowid.'">';
|
||||||
print img_edit_add() ."</a></span>";
|
print img_edit_add() ."</a>";
|
||||||
|
print '</span>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -222,13 +222,16 @@ class Deplacement extends CommonObject
|
|||||||
* Load an object from database
|
* Load an object from database
|
||||||
*
|
*
|
||||||
* @param int $id Id of record to load
|
* @param int $id Id of record to load
|
||||||
|
* @param string $ref Ref of record
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch($id)
|
function fetch($id, $ref='')
|
||||||
{
|
{
|
||||||
$sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note_private, note_public, fk_projet, extraparams";
|
$sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note_private, note_public, fk_projet, extraparams";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement";
|
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement";
|
||||||
$sql.= " WHERE rowid = ".$id;
|
$sql.= " WHERE entity IN (".getEntity('deplacement').")";
|
||||||
|
if ($ref) $sql.= " AND ref ='".$this->db->escape($ref)."'";
|
||||||
|
else $sql.= " AND id = ".$id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class DeplacementStats extends Stats
|
|||||||
*/
|
*/
|
||||||
function getNbByYear()
|
function getNbByYear()
|
||||||
{
|
{
|
||||||
$sql = "SELECT YEAR(datef) as dm, count(*)";
|
$sql = "SELECT YEAR(dated) as dm, count(*)";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
$sql.= " GROUP BY dm DESC";
|
$sql.= " GROUP BY dm DESC";
|
||||||
$sql.= " WHERE ".$this->where;
|
$sql.= " WHERE ".$this->where;
|
||||||
|
|||||||
@ -88,7 +88,7 @@ if ($object->id)
|
|||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$head=trip_prepare_head($object, $user);
|
$head=trip_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'documents', $langs->trans("TripCard"), 0, 'trip');
|
dol_fiche_head($head, 'documents', $langs->trans("TripCard"), 0, 'trip');
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2009 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -209,38 +209,42 @@ class Don extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function check($minimum=0)
|
function check($minimum=0)
|
||||||
{
|
{
|
||||||
|
global $langs;
|
||||||
|
$langs->load('main');
|
||||||
|
$langs->load('companies');
|
||||||
|
|
||||||
$err = 0;
|
$err = 0;
|
||||||
|
|
||||||
if (dol_strlen(trim($this->societe)) == 0)
|
if (dol_strlen(trim($this->societe)) == 0)
|
||||||
{
|
{
|
||||||
if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0)
|
if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0)
|
||||||
{
|
{
|
||||||
$error_string[$err] = "Vous devez saisir vos nom et prenom ou le nom de votre societe.";
|
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Company').'/'.$langs->trans('Firstname').'-'.$langs->trans('Lastname'));
|
||||||
$err++;
|
$err++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dol_strlen(trim($this->address)) == 0)
|
if (dol_strlen(trim($this->address)) == 0)
|
||||||
{
|
{
|
||||||
$error_string[$err] = "L'adresse saisie est invalide";
|
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Address'));
|
||||||
$err++;
|
$err++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dol_strlen(trim($this->zip)) == 0)
|
if (dol_strlen(trim($this->zip)) == 0)
|
||||||
{
|
{
|
||||||
$error_string[$err] = "Le code postal saisi est invalide";
|
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Zip'));
|
||||||
$err++;
|
$err++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dol_strlen(trim($this->town)) == 0)
|
if (dol_strlen(trim($this->town)) == 0)
|
||||||
{
|
{
|
||||||
$error_string[$err] = "La ville saisie est invalide";
|
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Town'));
|
||||||
$err++;
|
$err++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dol_strlen(trim($this->email)) == 0)
|
if (dol_strlen(trim($this->email)) == 0)
|
||||||
{
|
{
|
||||||
$error_string[$err] = "L'email saisi est invalide";
|
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('EMail'));
|
||||||
$err++;
|
$err++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,7 +256,7 @@ class Don extends CommonObject
|
|||||||
{
|
{
|
||||||
if (!isset($map[substr($this->amount, $i, 1)] ))
|
if (!isset($map[substr($this->amount, $i, 1)] ))
|
||||||
{
|
{
|
||||||
$error_string[$err] = "Le montant du don contient un/des caractere(s) invalide(s)";
|
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Amount'));
|
||||||
$err++;
|
$err++;
|
||||||
$amount_invalid = 1;
|
$amount_invalid = 1;
|
||||||
break;
|
break;
|
||||||
@ -263,14 +267,14 @@ class Don extends CommonObject
|
|||||||
{
|
{
|
||||||
if ($this->amount == 0)
|
if ($this->amount == 0)
|
||||||
{
|
{
|
||||||
$error_string[$err] = "Le montant du don est null";
|
$error_string[$err] = $langs->trans('ErrorFieldRequired',$langs->trans('Amount'));
|
||||||
$err++;
|
$err++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($this->amount < $minimum && $minimum > 0)
|
if ($this->amount < $minimum && $minimum > 0)
|
||||||
{
|
{
|
||||||
$error_string[$err] = "Le montant minimum du don est de $minimum";
|
$error_string[$err] = $langs->trans('MinimumAmount',$langs->trans('$minimum'));
|
||||||
$err++;
|
$err++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -171,11 +171,12 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fact
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete line
|
// Delete line
|
||||||
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->facture->creer) {
|
else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$result = $object->deleteline($_GET ['lineid'], $user);
|
$result = $object->deleteline(GETPOST('lineid'));
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
@ -203,14 +204,16 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete link of credit note to invoice
|
// Delete link of credit note to invoice
|
||||||
else if ($action == 'unlinkdiscount' && $user->rights->facture->creer) {
|
else if ($action == 'unlinkdiscount' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$discount = new DiscountAbsolute($db);
|
$discount = new DiscountAbsolute($db);
|
||||||
$result = $discount->fetch($_GET ["discountid"]);
|
$result = $discount->fetch(GETPOST("discountid"));
|
||||||
$discount->unlink_invoice();
|
$discount->unlink_invoice();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validation
|
// Validation
|
||||||
else if ($action == 'valid' && $user->rights->facture->creer) {
|
else if ($action == 'valid' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
|
||||||
// On verifie signe facture
|
// On verifie signe facture
|
||||||
@ -229,7 +232,8 @@ else if ($action == 'valid' && $user->rights->facture->creer) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'set_thirdparty' && $user->rights->facture->creer) {
|
else if ($action == 'set_thirdparty' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->setValueFrom('fk_soc', $socid);
|
$object->setValueFrom('fk_soc', $socid);
|
||||||
|
|
||||||
@ -237,12 +241,14 @@ else if ($action == 'set_thirdparty' && $user->rights->facture->creer) {
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'classin' && $user->rights->facture->creer) {
|
else if ($action == 'classin' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->setProject($_POST['projectid']);
|
$object->setProject($_POST['projectid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setmode' && $user->rights->facture->creer) {
|
else if ($action == 'setmode' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
|
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -268,7 +274,8 @@ else if ($action == 'setinvoicedate' && $user->rights->facture->creer)
|
|||||||
if ($result < 0) dol_print_error($db, $object->error);
|
if ($result < 0) dol_print_error($db, $object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setconditions' && $user->rights->facture->creer) {
|
else if ($action == 'setconditions' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->cond_reglement_code = 0; // To clean property
|
$object->cond_reglement_code = 0; // To clean property
|
||||||
$object->cond_reglement_id = 0; // To clean property
|
$object->cond_reglement_id = 0; // To clean property
|
||||||
@ -283,7 +290,8 @@ else if ($action == 'setconditions' && $user->rights->facture->creer) {
|
|||||||
if ($result < 0) dol_print_error($db, $object->error);
|
if ($result < 0) dol_print_error($db, $object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setpaymentterm' && $user->rights->facture->creer) {
|
else if ($action == 'setpaymentterm' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->date_lim_reglement = dol_mktime(12, 0, 0, $_POST['paymenttermmonth'], $_POST['paymenttermday'], $_POST['paymenttermyear']);
|
$object->date_lim_reglement = dol_mktime(12, 0, 0, $_POST['paymenttermmonth'], $_POST['paymenttermday'], $_POST['paymenttermyear']);
|
||||||
if ($object->date_lim_reglement < $object->date) {
|
if ($object->date_lim_reglement < $object->date) {
|
||||||
@ -295,7 +303,8 @@ else if ($action == 'setpaymentterm' && $user->rights->facture->creer) {
|
|||||||
dol_print_error($db, $object->error);
|
dol_print_error($db, $object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setrevenuestamp' && $user->rights->facture->creer) {
|
else if ($action == 'setrevenuestamp' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->revenuestamp = GETPOST('revenuestamp');
|
$object->revenuestamp = GETPOST('revenuestamp');
|
||||||
$result = $object->update($user);
|
$result = $object->update($user);
|
||||||
@ -305,16 +314,19 @@ else if ($action == 'setrevenuestamp' && $user->rights->facture->creer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// bank account
|
// bank account
|
||||||
else if ($action == 'setbankaccount' && $user->rights->facture->creer) {
|
else if ($action == 'setbankaccount' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$result=$object->setBankAccount(GETPOST('fk_account', 'int'));
|
$result=$object->setBankAccount(GETPOST('fk_account', 'int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setremisepercent' && $user->rights->facture->creer) {
|
else if ($action == 'setremisepercent' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->set_remise($user, $_POST['remise_percent']);
|
$result = $object->set_remise($user, $_POST['remise_percent']);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == "setabsolutediscount" && $user->rights->facture->creer) {
|
else if ($action == "setabsolutediscount" && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
// POST[remise_id] ou POST[remise_id_for_payment]
|
// POST[remise_id] ou POST[remise_id_for_payment]
|
||||||
if (! empty($_POST["remise_id"])) {
|
if (! empty($_POST["remise_id"])) {
|
||||||
$ret = $object->fetch($id);
|
$ret = $object->fetch($id);
|
||||||
@ -339,7 +351,8 @@ else if ($action == "setabsolutediscount" && $user->rights->facture->creer) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'set_ref_client' && $user->rights->facture->creer) {
|
else if ($action == 'set_ref_client' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->set_ref_client($_POST['ref_client']);
|
$object->set_ref_client($_POST['ref_client']);
|
||||||
}
|
}
|
||||||
@ -359,7 +372,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu
|
|||||||
{
|
{
|
||||||
$idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_INVOICE_MANDATORY';
|
$idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_INVOICE_MANDATORY';
|
||||||
$idprof = 'idprof' . $i;
|
$idprof = 'idprof' . $i;
|
||||||
if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory)) {
|
if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory))
|
||||||
|
{
|
||||||
if (! $error)
|
if (! $error)
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error ++;
|
$error ++;
|
||||||
@ -376,7 +390,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for warehouse
|
// Check for warehouse
|
||||||
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) {
|
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change)
|
||||||
|
{
|
||||||
if (! $idwarehouse || $idwarehouse == - 1) {
|
if (! $idwarehouse || $idwarehouse == - 1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), 'errors');
|
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), 'errors');
|
||||||
@ -412,7 +427,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Go back to draft status (unvalidate)
|
// Go back to draft status (unvalidate)
|
||||||
else if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate)) {
|
else if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate))
|
||||||
|
{
|
||||||
$idwarehouse = GETPOST('idwarehouse');
|
$idwarehouse = GETPOST('idwarehouse');
|
||||||
|
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
@ -426,7 +442,8 @@ else if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) {
|
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change)
|
||||||
|
{
|
||||||
if (! $idwarehouse || $idwarehouse == - 1) {
|
if (! $idwarehouse || $idwarehouse == - 1) {
|
||||||
$error ++;
|
$error ++;
|
||||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), 'errors');
|
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), 'errors');
|
||||||
@ -460,7 +477,8 @@ else if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_
|
|||||||
$ventilExportCompta = $object->getVentilExportCompta();
|
$ventilExportCompta = $object->getVentilExportCompta();
|
||||||
|
|
||||||
// On verifie si aucun paiement n'a ete effectue
|
// On verifie si aucun paiement n'a ete effectue
|
||||||
if ($resteapayer == $object->total_ttc && $object->paye == 0 && $ventilExportCompta == 0) {
|
if ($resteapayer == $object->total_ttc && $object->paye == 0 && $ventilExportCompta == 0)
|
||||||
|
{
|
||||||
$result=$object->set_draft($user, $idwarehouse);
|
$result=$object->set_draft($user, $idwarehouse);
|
||||||
if ($result<0) setEventMessage($object->error,'errors');
|
if ($result<0) setEventMessage($object->error,'errors');
|
||||||
|
|
||||||
@ -484,12 +502,14 @@ else if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Classify "paid"
|
// Classify "paid"
|
||||||
else if ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->facture->paiement) {
|
else if ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->facture->paiement)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->set_paid($user);
|
$result = $object->set_paid($user);
|
||||||
if ($result<0) setEventMessage($object->error,'errors');
|
if ($result<0) setEventMessage($object->error,'errors');
|
||||||
} // Classif "paid partialy"
|
} // Classif "paid partialy"
|
||||||
else if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $user->rights->facture->paiement) {
|
else if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $user->rights->facture->paiement)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$close_code = $_POST["close_code"];
|
$close_code = $_POST["close_code"];
|
||||||
$close_note = $_POST["close_note"];
|
$close_note = $_POST["close_note"];
|
||||||
|
|||||||
@ -484,7 +484,7 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('BILL_CREATE',$user);
|
$result=$this->call_trigger('BILL_CREATE',$user);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
// End call triggers
|
// End call triggers
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -593,8 +593,8 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
// Load source object
|
// Load source object
|
||||||
$objFrom = dol_clone($this);
|
$objFrom = dol_clone($this);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Change socid if needed
|
// Change socid if needed
|
||||||
if (! empty($socid) && $socid != $this->socid)
|
if (! empty($socid) && $socid != $this->socid)
|
||||||
@ -637,7 +637,7 @@ class Facture extends CommonInvoice
|
|||||||
unset($this->products[$i]); // Tant que products encore utilise
|
unset($this->products[$i]); // Tant que products encore utilise
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create clone
|
// Create clone
|
||||||
$result=$this->create($user);
|
$result=$this->create($user);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
@ -645,7 +645,7 @@ class Facture extends CommonInvoice
|
|||||||
// copy internal contacts
|
// copy internal contacts
|
||||||
if ($this->copy_linked_contact($objFrom, 'internal') < 0)
|
if ($this->copy_linked_contact($objFrom, 'internal') < 0)
|
||||||
$error++;
|
$error++;
|
||||||
|
|
||||||
// copy external contacts if same company
|
// copy external contacts if same company
|
||||||
elseif ($objFrom->socid == $this->socid)
|
elseif ($objFrom->socid == $this->socid)
|
||||||
{
|
{
|
||||||
@ -667,7 +667,7 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('BILL_CLONE',$user);
|
$result=$this->call_trigger('BILL_CLONE',$user);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1108,7 +1108,7 @@ class Facture extends CommonInvoice
|
|||||||
{
|
{
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('BILL_MODIFY',$user);
|
$result=$this->call_trigger('BILL_MODIFY',$user);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1266,7 +1266,7 @@ class Facture extends CommonInvoice
|
|||||||
{
|
{
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('BILL_DELETE',$user);
|
$result=$this->call_trigger('BILL_DELETE',$user);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1438,7 +1438,7 @@ class Facture extends CommonInvoice
|
|||||||
{
|
{
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('BILL_PAYED',$user);
|
$result=$this->call_trigger('BILL_PAYED',$user);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1490,7 +1490,7 @@ class Facture extends CommonInvoice
|
|||||||
{
|
{
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('BILL_UNPAYED',$user);
|
$result=$this->call_trigger('BILL_UNPAYED',$user);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1554,7 +1554,7 @@ class Facture extends CommonInvoice
|
|||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('BILL_CANCEL',$user);
|
$result=$this->call_trigger('BILL_CANCEL',$user);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1768,11 +1768,11 @@ class Facture extends CommonInvoice
|
|||||||
{
|
{
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('BILL_VALIDATE',$user);
|
$result=$this->call_trigger('BILL_VALIDATE',$user);
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
//TODO: Restoring ref, facnumber, statut, brouillon to previous value if trigger fail
|
//TODO: Restoring ref, facnumber, statut, brouillon to previous value if trigger fail
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set new ref and define current statut
|
// Set new ref and define current statut
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
@ -1856,7 +1856,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->statut = 0;
|
$this->statut = 0;
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('BILL_UNVALIDATE',$user);
|
$result=$this->call_trigger('BILL_UNVALIDATE',$user);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
$this->statut=$old_statut;
|
$this->statut=$old_statut;
|
||||||
@ -3164,7 +3164,7 @@ class Facture extends CommonInvoice
|
|||||||
$sql.= ' p.ref as product_ref, p.fk_product_type, p.label as product_label,';
|
$sql.= ' p.ref as product_ref, p.fk_product_type, p.label as product_label,';
|
||||||
$sql.= ' p.description as product_desc';
|
$sql.= ' p.description as product_desc';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facturedet as l';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'facturedet as l';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product p ON l.fk_product=p.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product=p.rowid';
|
||||||
$sql.= ' WHERE l.fk_facture = '.$this->id;
|
$sql.= ' WHERE l.fk_facture = '.$this->id;
|
||||||
$sql.= ' ORDER BY l.rang ASC, l.rowid';
|
$sql.= ' ORDER BY l.rang ASC, l.rowid';
|
||||||
|
|
||||||
@ -3659,7 +3659,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('LINEBILL_INSERT',$user);
|
$result=$this->call_trigger('LINEBILL_INSERT',$user);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
@ -3770,7 +3770,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
{
|
{
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('LINEBILL_UPDATE',$user);
|
$result=$this->call_trigger('LINEBILL_UPDATE',$user);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -2;
|
return -2;
|
||||||
@ -3800,7 +3800,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('LINEBILL_DELETE',$user);
|
$result=$this->call_trigger('LINEBILL_DELETE',$user);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -3809,7 +3809,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// End call triggers
|
// End call triggers
|
||||||
|
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".$this->rowid;
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".$this->rowid;
|
||||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||||
|
|||||||
@ -372,6 +372,17 @@ $search_montant_ht = GETPOST("search_montant_ht");
|
|||||||
$search_montant_ttc = GETPOST("search_montant_ttc");
|
$search_montant_ttc = GETPOST("search_montant_ttc");
|
||||||
$late = GETPOST("late");
|
$late = GETPOST("late");
|
||||||
|
|
||||||
|
// Do we click on purge search criteria ?
|
||||||
|
if (GETPOST("button_removefilter_x"))
|
||||||
|
{
|
||||||
|
$search_ref='';
|
||||||
|
$search_refcustomer='';
|
||||||
|
$search_societe='';
|
||||||
|
$search_paymentmode='';
|
||||||
|
$search_montant_ht='';
|
||||||
|
$search_montant_ttc='';
|
||||||
|
}
|
||||||
|
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
@ -571,6 +582,7 @@ if ($resql)
|
|||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="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 '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (empty($mode))
|
if (empty($mode))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -327,6 +327,7 @@ if ($resql)
|
|||||||
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="10" name="search_montant_ttc" value="'.$search_montant_ttc.'"></td>';
|
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="10" name="search_montant_ttc" value="'.$search_montant_ttc.'"></td>';
|
||||||
print '<td class="liste_titre" align="right"> </td>';
|
print '<td class="liste_titre" align="right"> </td>';
|
||||||
print '<td class="liste_titre" align="right"><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 class="liste_titre" align="right"><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_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
|
|||||||
@ -104,11 +104,11 @@ $sql.= " fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_t
|
|||||||
$sql.= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur,";
|
$sql.= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur,";
|
||||||
$sql.= " p.rowid as pid, p.ref as ref, p.accountancy_code_buy,";
|
$sql.= " p.rowid as pid, p.ref as ref, p.accountancy_code_buy,";
|
||||||
$sql.= " ct.accountancy_code_buy as account_tva, ct.recuperableonly";
|
$sql.= " ct.accountancy_code_buy as account_tva, ct.recuperableonly";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn_det fd";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as fd";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = '".$idpays."'";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva as ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = '".$idpays."'";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product p ON p.rowid = fd.fk_product";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product";
|
||||||
$sql.= " JOIN ".MAIN_DB_PREFIX."facture_fourn f ON f.rowid = fd.fk_facture_fourn";
|
$sql.= " JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = fd.fk_facture_fourn";
|
||||||
$sql.= " JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid = f.fk_soc" ;
|
$sql.= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc" ;
|
||||||
$sql.= " WHERE f.fk_statut > 0 AND f.entity = ".$conf->entity;
|
$sql.= " WHERE f.fk_statut > 0 AND f.entity = ".$conf->entity;
|
||||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2)";
|
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2)";
|
||||||
else $sql.= " AND f.type IN (0,1,2,3)";
|
else $sql.= " AND f.type IN (0,1,2,3)";
|
||||||
|
|||||||
@ -105,10 +105,10 @@ $sql.= " fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.total_ttc, fd
|
|||||||
$sql.= " s.rowid as socid, s.nom as name, s.code_compta, s.client,";
|
$sql.= " s.rowid as socid, s.nom as name, s.code_compta, s.client,";
|
||||||
$sql.= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell,";
|
$sql.= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell,";
|
||||||
$sql.= " ct.accountancy_code_sell as account_tva, ct.recuperableonly";
|
$sql.= " ct.accountancy_code_sell as account_tva, ct.recuperableonly";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facturedet fd";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product p ON p.rowid = fd.fk_product";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product";
|
||||||
$sql.= " JOIN ".MAIN_DB_PREFIX."facture f ON f.rowid = fd.fk_facture";
|
$sql.= " JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture";
|
||||||
$sql.= " JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid = f.fk_soc";
|
$sql.= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = '".$idpays."'";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = '".$idpays."'";
|
||||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||||
$sql.= " AND f.fk_statut > 0";
|
$sql.= " AND f.fk_statut > 0";
|
||||||
|
|||||||
@ -109,8 +109,8 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye
|
|||||||
if ($datepaye && ($datepaye < $tmpinvoice->date))
|
if ($datepaye && ($datepaye < $tmpinvoice->date))
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error++;
|
//$error++;
|
||||||
setEventMessage($langs->transnoentities("ErrorPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'errors');
|
setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -20,12 +21,14 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/compta/paiement/cheque/liste.php
|
* \file htdocs/compta/paiement/cheque/liste.php
|
||||||
* \ingroup compta
|
* \ingroup compta
|
||||||
* \brief Page liste des bordereau de remise de cheque
|
* \brief Page list of cheque deposits
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../../main.inc.php');
|
require('../../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
@ -44,12 +47,16 @@ $pageprev = $page - 1;
|
|||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
$limit = $conf->liste_limit;
|
$limit = $conf->liste_limit;
|
||||||
if (! $sortorder) $sortorder="DESC";
|
if (! $sortorder) $sortorder="DESC";
|
||||||
if (! $sortfield) $sortfield="bc.number";
|
if (! $sortfield) $sortfield="dp";
|
||||||
|
|
||||||
|
$year=GETPOST("year");
|
||||||
|
$month=GETPOST("month");
|
||||||
|
|
||||||
|
$form=new Form($db);
|
||||||
|
$formother = new FormOther($db);
|
||||||
$checkdepositstatic=new RemiseCheque($db);
|
$checkdepositstatic=new RemiseCheque($db);
|
||||||
$accountstatic=new Account($db);
|
$accountstatic=new Account($db);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -63,10 +70,25 @@ $sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc,";
|
|||||||
$sql.= " ".MAIN_DB_PREFIX."bank_account as ba";
|
$sql.= " ".MAIN_DB_PREFIX."bank_account as ba";
|
||||||
$sql.= " WHERE bc.fk_bank_account = ba.rowid";
|
$sql.= " WHERE bc.fk_bank_account = ba.rowid";
|
||||||
$sql.= " AND bc.entity = ".$conf->entity;
|
$sql.= " AND bc.entity = ".$conf->entity;
|
||||||
if (GETPOST('search_montant'))
|
|
||||||
|
// Search criteria
|
||||||
|
if (GETPOST("search_ref")) $sql.=" AND bc.number=".GETPOST("search_ref",'int');
|
||||||
|
if (GETPOST("search_account") > 0) $sql.=" AND bc.fk_bank_account=".GETPOST("search_account",'int');
|
||||||
|
if (GETPOST("search_amount")) $sql.=" AND bc.amount=".price2num(GETPOST("search_amount"));
|
||||||
|
if ($month > 0)
|
||||||
{
|
{
|
||||||
$sql.=" AND bc.amount=".price2num(GETPOST('search_montant'));
|
if ($year > 0 && empty($day))
|
||||||
|
$sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'";
|
||||||
|
else if ($year > 0 && ! empty($day))
|
||||||
|
$sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'";
|
||||||
|
else
|
||||||
|
$sql.= " AND date_format(bc.date_bordereau, '%m') = '".$month."'";
|
||||||
}
|
}
|
||||||
|
else if ($year > 0)
|
||||||
|
{
|
||||||
|
$sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
|
||||||
|
}
|
||||||
|
|
||||||
$sql.= " ORDER BY $sortfield $sortorder";
|
$sql.= " ORDER BY $sortfield $sortorder";
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
$sql.= $db->plimit($limit+1, $offset);
|
||||||
//print "$sql";
|
//print "$sql";
|
||||||
@ -79,27 +101,35 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$params='';
|
$params='';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("MenuChequeDeposits"), $page, 'liste.php', $params, $sortfield, $sortorder, '', $num);
|
print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num);
|
||||||
|
|
||||||
print '<form method="get" action="liste.php">';
|
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),"liste.php","bc.number","",$params,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bc.number","",$params,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Date"),"liste.php","dp","",$params,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"dp","",$params,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Account"),"liste.php","ba.label","",$params,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$params,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("NbOfCheques"),"liste.php","bc.nbcheque","",$params,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("NbOfCheques"),$_SERVER["PHP_SELF"],"bc.nbcheque","",$params,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Amount"),"liste.php","bc.amount","",$params,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"bc.amount","",$params,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),"liste.php","bc.statut","",$params,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"bc.statut","",$params,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<input class="fat" type="text" size="4" name="search_ref" value="'.GETPOST('search_ref').'">';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '</td>';
|
||||||
|
print '<td class="liste_titre" align="center">';
|
||||||
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
||||||
|
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||||
|
$formother->select_year($year?$year:-1,'year',1, 20, 5);
|
||||||
|
print '</td>';
|
||||||
|
print '<td>';
|
||||||
|
$form->select_comptes($_REQUEST["search_account"],'search_account',0,'',1);
|
||||||
|
print '</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" align="right">';
|
||||||
print '<input class="fat" type="text" size="6" name="search_montant" value="'.GETPOST('search_montant').'">';
|
print '<input class="fat" type="text" size="6" name="search_amount" value="'.GETPOST('search_amount').'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="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")).'">';
|
||||||
@ -124,16 +154,16 @@ if ($resql)
|
|||||||
// Date
|
// Date
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'day').'</td>';
|
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'day').'</td>';
|
||||||
|
|
||||||
// Banque
|
// Bank
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</a>';
|
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</a>';
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Nb of cheques
|
// Number of cheques
|
||||||
print '<td align="right">'.$objp->nbcheque.'</td>';
|
print '<td align="right">'.$objp->nbcheque.'</td>';
|
||||||
|
|
||||||
// Montant
|
// Amount
|
||||||
print '<td align="right">'.price($objp->amount).'</td>';
|
print '<td align="right">'.price($objp->amount).'</td>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
|
|||||||
@ -31,6 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
$id=GETPOST('id');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -39,8 +41,8 @@ $langs->load("companies");
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$paiement = new Paiement($db);
|
$paiement = new Paiement($db);
|
||||||
$paiement->fetch($_GET["id"], $user);
|
$paiement->fetch($id);
|
||||||
$paiement->info($_GET["id"]);
|
$paiement->info($id);
|
||||||
|
|
||||||
$head = payment_prepare_head($paiement);
|
$head = payment_prepare_head($paiement);
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -33,6 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||||||
|
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
$langs->load("donation");
|
||||||
|
$langs->load("salaries");
|
||||||
|
|
||||||
$date_startmonth=GETPOST('date_startmonth');
|
$date_startmonth=GETPOST('date_startmonth');
|
||||||
$date_startday=GETPOST('date_startday');
|
$date_startday=GETPOST('date_startday');
|
||||||
@ -555,7 +558,7 @@ if (! empty($date_start) && ! empty($date_end))
|
|||||||
$sql.= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm";
|
$sql.= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm";
|
||||||
$sql.= " ORDER BY u.firstname";
|
$sql.= " ORDER BY u.firstname";
|
||||||
|
|
||||||
dol_syslog("get payment salaries sql=".$sql);
|
dol_syslog("get payment salaries");
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
$subtotal_ht = 0;
|
$subtotal_ht = 0;
|
||||||
$subtotal_ttc = 0;
|
$subtotal_ttc = 0;
|
||||||
@ -598,6 +601,64 @@ else
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Dunning
|
||||||
|
*/
|
||||||
|
|
||||||
|
print '<tr><td colspan="4">'.$langs->trans("Donation").'</td></tr>';
|
||||||
|
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||||
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
|
$sql.= " AND fk_statut=2";
|
||||||
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
|
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
|
||||||
|
$sql.= " GROUP BY p.societe, p.firstname, p.lastname";
|
||||||
|
$sql.= " ORDER BY p.societe, p.firstname, p.lastname";
|
||||||
|
|
||||||
|
dol_syslog("get dunning");
|
||||||
|
$result=$db->query($sql);
|
||||||
|
$subtotal_ht = 0;
|
||||||
|
$subtotal_ttc = 0;
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($result);
|
||||||
|
$var=true;
|
||||||
|
$i = 0;
|
||||||
|
if ($num)
|
||||||
|
{
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
|
$total_ht += $obj->amount;
|
||||||
|
$total_ttc += $obj->amount;
|
||||||
|
$subtotal_ht -= $obj->amount;
|
||||||
|
$subtotal_ttc -= $obj->amount;
|
||||||
|
|
||||||
|
$var = !$var;
|
||||||
|
print "<tr ".$bc[$var]."><td> </td>";
|
||||||
|
|
||||||
|
print "<td>".$langs->trans("Donation")." <a href=\"".DOL_URL_ROOT."/compta/dons/liste.php?search_company=".$obj->nom."&search_name=".$obj->firstname." ".$obj->lastname."\">".$obj->nom. " ".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
||||||
|
|
||||||
|
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price($obj->amount).'</td>';
|
||||||
|
print '<td align="right">'.price($obj->amount).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$var = !$var;
|
||||||
|
print "<tr ".$bc[$var]."><td> </td>";
|
||||||
|
print '<td colspan="3">'.$langs->trans("None").'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>';
|
print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>';
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -480,7 +481,7 @@ $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
|||||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY p.label, dm";
|
$sql.= " GROUP BY p.label, dm";
|
||||||
|
|
||||||
dol_syslog("get social salaries payments sql=".$sql);
|
dol_syslog("get social salaries payments");
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
@ -508,6 +509,45 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* get dunning paiement
|
||||||
|
*/
|
||||||
|
$subtotal_ht = 0;
|
||||||
|
$subtotal_ttc = 0;
|
||||||
|
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||||
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
|
$sql.= " AND fk_statut=2";
|
||||||
|
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
||||||
|
|
||||||
|
dol_syslog("get social salaries payments");
|
||||||
|
$result=$db->query($sql);
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($result);
|
||||||
|
$var=false;
|
||||||
|
$i = 0;
|
||||||
|
if ($num)
|
||||||
|
{
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
|
if (! isset($encaiss[$obj->dm])) $encaiss[$obj->dm]=0;
|
||||||
|
$encaiss[$obj->dm] += $obj->amount;
|
||||||
|
|
||||||
|
if (! isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm]=0;
|
||||||
|
$encaiss_ttc[$obj->dm] += $obj->amount;
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show result array
|
* Show result array
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -27,8 +27,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class CommonDocGenerator
|
* Parent class for documents generators
|
||||||
* \brief Parent class for documents generators
|
|
||||||
*/
|
*/
|
||||||
abstract class CommonDocGenerator
|
abstract class CommonDocGenerator
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1276,6 +1276,7 @@ class Form
|
|||||||
/**
|
/**
|
||||||
* Return select list of users. Selected users are stored into session.
|
* Return select list of users. Selected users are stored into session.
|
||||||
*
|
*
|
||||||
|
* @param string $action Value for $action
|
||||||
* @param string $htmlname Field name in form
|
* @param string $htmlname Field name in form
|
||||||
* @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
|
* @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
|
||||||
* @param array $exclude Array list of users id to exclude
|
* @param array $exclude Array list of users id to exclude
|
||||||
@ -1289,7 +1290,7 @@ class Form
|
|||||||
* @return string HTML select string
|
* @return string HTML select string
|
||||||
* @see select_dolgroups
|
* @see select_dolgroups
|
||||||
*/
|
*/
|
||||||
function select_dolusers_forevent($htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0, $showstatus=0, $morefilter='')
|
function select_dolusers_forevent($action='', $htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0, $showstatus=0, $morefilter='')
|
||||||
{
|
{
|
||||||
global $conf,$user,$langs;
|
global $conf,$user,$langs;
|
||||||
|
|
||||||
@ -1297,18 +1298,24 @@ class Form
|
|||||||
|
|
||||||
// Method with no ajax
|
// Method with no ajax
|
||||||
//$out.='<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
//$out.='<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
$out.=$this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter);
|
$out.='<input type="hidden" class="removedassignedhidden" name="removedassigned" value="">';
|
||||||
$out.='<input type="submit" class="button" name="addassignedtouser" value="'.dol_escape_htmltag($langs->trans("Add")).'">';
|
$out.='<script type="text/javascript" language="javascript">jQuery(document).ready(function () { jQuery(".removedassigned").click(function() { jQuery(".removedassignedhidden").val(jQuery(this).val()); });})</script>';
|
||||||
|
$out.=$this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter);
|
||||||
|
$out.='<input type="submit" class="button" name="'.$action.'assignedtouser" value="'.dol_escape_htmltag($langs->trans("Add")).'">';
|
||||||
$assignedtouser=array();
|
$assignedtouser=array();
|
||||||
if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true);
|
if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true);
|
||||||
if (count($assignedtouser)) $out.='<br>';
|
if (count($assignedtouser)) $out.='<br>';
|
||||||
|
$i=0;
|
||||||
foreach($assignedtouser as $key => $value)
|
foreach($assignedtouser as $key => $value)
|
||||||
{
|
{
|
||||||
$userstatic->fetch($key);
|
$userstatic->fetch($key);
|
||||||
$out.=$userstatic->getNomUrl(1);
|
$out.=$userstatic->getNomUrl(1);
|
||||||
|
if ($i == 0) $out.=' ('.$langs->trans("Owner").')';
|
||||||
|
$out.=' <input type="image" style="border: 0px;" src="'.img_picto($langs->trans("Remove"), 'delete', '', 0, 1).'" value="'.$userstatic->id.'" class="removedassigned" id="removedassigned_'.$userstatic->id.'" name="removedassigned_'.$userstatic->id.'">';
|
||||||
//$out.=' '.($value['mandatory']?$langs->trans("Mandatory"):$langs->trans("Optional"));
|
//$out.=' '.($value['mandatory']?$langs->trans("Mandatory"):$langs->trans("Optional"));
|
||||||
//$out.=' '.($value['transparency']?$langs->trans("Busy"):$langs->trans("NotBusy"));
|
//$out.=' '.($value['transparency']?$langs->trans("Busy"):$langs->trans("NotBusy"));
|
||||||
$out.='<br>';
|
$out.='<br>';
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//$out.='</form>';
|
//$out.='</form>';
|
||||||
@ -3043,7 +3050,7 @@ class Form
|
|||||||
* @param int $page Page
|
* @param int $page Page
|
||||||
* @param string $selected Id condition pre-selectionne
|
* @param string $selected Id condition pre-selectionne
|
||||||
* @param string $htmlname Name of select html field
|
* @param string $htmlname Name of select html field
|
||||||
* @param int $addempty Ajoute entree vide
|
* @param int $addempty Add empty entry
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0)
|
function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0)
|
||||||
@ -3344,7 +3351,7 @@ class Form
|
|||||||
* @param string $htmlname Nom du formulaire select
|
* @param string $htmlname Nom du formulaire select
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_contacts($page, $societe, $selected='', $htmlname='contactidp')
|
function form_contacts($page, $societe, $selected='', $htmlname='contactid')
|
||||||
{
|
{
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
|
|
||||||
|
|||||||
@ -250,6 +250,21 @@ class FormMail
|
|||||||
if (! empty($_SESSION["listofnames"])) $listofnames=explode(';',$_SESSION["listofnames"]);
|
if (! empty($_SESSION["listofnames"])) $listofnames=explode(';',$_SESSION["listofnames"]);
|
||||||
if (! empty($_SESSION["listofmimes"])) $listofmimes=explode(';',$_SESSION["listofmimes"]);
|
if (! empty($_SESSION["listofmimes"])) $listofmimes=explode(';',$_SESSION["listofmimes"]);
|
||||||
|
|
||||||
|
// Define output language
|
||||||
|
$outputlangs = $langs;
|
||||||
|
$newlang = '';
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $this->param['langsmodels'];
|
||||||
|
if (! empty($newlang))
|
||||||
|
{
|
||||||
|
$outputlangs = new Translate("", $conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
$outputlangs->load('other');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get message template
|
||||||
|
$arraydefaultmessage=$this->getEMailTemplate($this->db, $this->param["models"], $user, $outputlangs);
|
||||||
|
|
||||||
|
|
||||||
$out.= "\n<!-- Debut form mail -->\n";
|
$out.= "\n<!-- Debut form mail -->\n";
|
||||||
if ($this->withform == 1)
|
if ($this->withform == 1)
|
||||||
{
|
{
|
||||||
@ -439,7 +454,7 @@ class FormMail
|
|||||||
}
|
}
|
||||||
$out.= "</td></tr>\n";
|
$out.= "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// CCC
|
// CCC
|
||||||
if (! empty($this->withtoccc) || is_array($this->withtoccc))
|
if (! empty($this->withtoccc) || is_array($this->withtoccc))
|
||||||
{
|
{
|
||||||
@ -492,19 +507,23 @@ class FormMail
|
|||||||
// Topic
|
// Topic
|
||||||
if (! empty($this->withtopic))
|
if (! empty($this->withtopic))
|
||||||
{
|
{
|
||||||
$this->withtopic=make_substitutions($this->withtopic,$this->substit);
|
$defaulttopic="";
|
||||||
|
if (count($arraydefaultmessage) > 0 && $arraydefaultmessage['topic']) $defaulttopic=$arraydefaultmessage['topic'];
|
||||||
|
elseif (! is_numeric($this->withtopic)) $defaulttopic=$this->withtopic;
|
||||||
|
|
||||||
|
$defaulttopic=make_substitutions($defaulttopic,$this->substit);
|
||||||
|
|
||||||
$out.= '<tr>';
|
$out.= '<tr>';
|
||||||
$out.= '<td width="180">'.$langs->trans("MailTopic").'</td>';
|
$out.= '<td width="180">'.$langs->trans("MailTopic").'</td>';
|
||||||
$out.= '<td>';
|
$out.= '<td>';
|
||||||
if ($this->withtopicreadonly)
|
if ($this->withtopicreadonly)
|
||||||
{
|
{
|
||||||
$out.= $this->withtopic;
|
$out.= $defaulttopic;
|
||||||
$out.= '<input type="hidden" size="60" id="subject" name="subject" value="'.$this->withtopic.'" />';
|
$out.= '<input type="hidden" size="60" id="subject" name="subject" value="'.$defaulttopic.'" />';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$out.= '<input type="text" size="60" id="subject" name="subject" value="'. (isset($_POST["subject"])?$_POST["subject"]:(is_numeric($this->withtopic)?'':$this->withtopic)) .'" />';
|
$out.= '<input type="text" size="60" id="subject" name="subject" value="'. (isset($_POST["subject"])?$_POST["subject"]:($defaulttopic?$defaulttopic:'')) .'" />';
|
||||||
}
|
}
|
||||||
$out.= "</td></tr>\n";
|
$out.= "</td></tr>\n";
|
||||||
}
|
}
|
||||||
@ -563,31 +582,8 @@ class FormMail
|
|||||||
if (! empty($this->withbody))
|
if (! empty($this->withbody))
|
||||||
{
|
{
|
||||||
$defaultmessage="";
|
$defaultmessage="";
|
||||||
|
if (count($arraydefaultmessage) > 0 && $arraydefaultmessage['content']) $defaultmessage=$arraydefaultmessage['content'];
|
||||||
// Define output language
|
elseif (! is_numeric($this->withbody)) $defaultmessage=$this->withbody;
|
||||||
$outputlangs = $langs;
|
|
||||||
$newlang = '';
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
|
||||||
$newlang = $this->param['langsmodels'];
|
|
||||||
|
|
||||||
if (! empty($newlang)) {
|
|
||||||
$outputlangs = new Translate("", $conf);
|
|
||||||
$outputlangs->setDefaultLang($newlang);
|
|
||||||
$outputlangs->load('other');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// TODO A partir du type, proposer liste de messages dans table llx_c_email_template
|
|
||||||
if ($this->param["models"]=='facture_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendInvoice"); }
|
|
||||||
elseif ($this->param["models"]=='facture_relance') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendInvoiceReminder"); }
|
|
||||||
elseif ($this->param["models"]=='propal_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendProposal"); }
|
|
||||||
elseif ($this->param["models"]=='order_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendOrder"); }
|
|
||||||
elseif ($this->param["models"]=='order_supplier_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendSupplierOrder"); }
|
|
||||||
elseif ($this->param["models"]=='invoice_supplier_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendSupplierInvoice"); }
|
|
||||||
elseif ($this->param["models"]=='shipping_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendShipping"); }
|
|
||||||
elseif ($this->param["models"]=='fichinter_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendFichInter"); }
|
|
||||||
elseif ($this->param["models"]=='thirdparty') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentThirdparty"); }
|
|
||||||
elseif (! is_numeric($this->withbody)) { $defaultmessage=$this->withbody; }
|
|
||||||
|
|
||||||
// Complete substitution array
|
// Complete substitution array
|
||||||
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_ADD_PAYMENT_URL))
|
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_ADD_PAYMENT_URL))
|
||||||
@ -679,5 +675,65 @@ class FormMail
|
|||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return template of email
|
||||||
|
* Search into table c_email_template
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $type_template Get message for key module
|
||||||
|
* @param string $user Use template public or limited to this user
|
||||||
|
* @param Translate $outputlangs Output lang object
|
||||||
|
* @return array array('topic'=>,'content'=>,..)
|
||||||
|
*/
|
||||||
|
private function getEMailTemplate($db, $type_template, $user, $outputlangs)
|
||||||
|
{
|
||||||
|
$ret=array();
|
||||||
|
|
||||||
|
$sql = "SELECT topic, content";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX.'c_email_templates';
|
||||||
|
$sql.= " WHERE type_template='".$db->escape($type_template)."'";
|
||||||
|
$sql.= " AND entity IN (".getEntity("c_email_templates").")";
|
||||||
|
$sql.= " AND (fk_user is NULL or fk_user = 0 or fk_user = ".$user->id.")";
|
||||||
|
// TODO Add field and where filter on language code
|
||||||
|
//print $sql;
|
||||||
|
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object($resql);
|
||||||
|
if ($obj)
|
||||||
|
{
|
||||||
|
$ret['topic']=$obj->topic;
|
||||||
|
$ret['content']=$obj->content;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$defaultmessage='';
|
||||||
|
if ($type_template=='facture_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendInvoice"); }
|
||||||
|
elseif ($type_template=='facture_relance') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendInvoiceReminder"); }
|
||||||
|
elseif ($type_template=='propal_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendProposal"); }
|
||||||
|
elseif ($type_template=='order_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendOrder"); }
|
||||||
|
elseif ($type_template=='order_supplier_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendSupplierOrder"); }
|
||||||
|
elseif ($type_template=='invoice_supplier_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendSupplierInvoice"); }
|
||||||
|
elseif ($type_template=='shipping_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendShipping"); }
|
||||||
|
elseif ($type_template=='fichinter_send') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentSendFichInter"); }
|
||||||
|
elseif ($type_template=='thirdparty') { $defaultmessage=$outputlangs->transnoentities("PredefinedMailContentThirdparty"); }
|
||||||
|
|
||||||
|
$ret['topic']='';
|
||||||
|
$ret['content']=$defaultmessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->free($resql);
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1209,11 +1209,14 @@ class DoliDBPgsql extends DoliDB
|
|||||||
*/
|
*/
|
||||||
function getPathOfRestore()
|
function getPathOfRestore()
|
||||||
{
|
{
|
||||||
$fullpathofdump='/pathtopgrestore/pg_restore';
|
//$tool='pg_restore';
|
||||||
|
$tool='psql';
|
||||||
|
|
||||||
if (file_exists('/usr/bin/pg_restore'))
|
$fullpathofdump='/pathtopgrestore/'.$tool;
|
||||||
|
|
||||||
|
if (file_exists('/usr/bin/'.$tool))
|
||||||
{
|
{
|
||||||
$fullpathofdump='/usr/bin/pg_restore';
|
$fullpathofdump='/usr/bin/'.$tool;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1223,7 +1226,7 @@ class DoliDBPgsql extends DoliDB
|
|||||||
{
|
{
|
||||||
$liste=$this->fetch_array($resql);
|
$liste=$this->fetch_array($resql);
|
||||||
$basedir=$liste['data_directory'];
|
$basedir=$liste['data_directory'];
|
||||||
$fullpathofdump=preg_replace('/data$/','bin',$basedir).'/pg_restore';
|
$fullpathofdump=preg_replace('/data$/','bin',$basedir).'/'.$tool;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1841,7 +1841,8 @@ function img_picto($titlealt, $picto, $options = '', $pictoisfullpath = false, $
|
|||||||
if ($srconly) return $fullpathpicto;
|
if ($srconly) return $fullpathpicto;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$tmparray=explode(':',$titlealt);
|
$tmparray=array(0=>$titlealt);
|
||||||
|
if (preg_match('/:[^\s]/',$titlealt)) $tmparray=explode(':',$titlealt); // We explode if we have TextA:TextB. Not if we have TextA: TextB
|
||||||
$title=$tmparray[0];
|
$title=$tmparray[0];
|
||||||
$alt=empty($tmparray[1])?'':$tmparray[1];
|
$alt=empty($tmparray[1])?'':$tmparray[1];
|
||||||
return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'"'.($notitle?'':' title="'.dol_escape_htmltag($title).'"').($options?' '.$options:'').'>'; // Alt is used for accessibility, title for popup
|
return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'"'.($notitle?'':' title="'.dol_escape_htmltag($title).'"').($options?' '.$options:'').'>'; // Alt is used for accessibility, title for popup
|
||||||
@ -1939,29 +1940,31 @@ function img_pdf($titlealt = 'default', $size = 3)
|
|||||||
* Show logo +
|
* Show logo +
|
||||||
*
|
*
|
||||||
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
||||||
|
* @param string $other Add more attributes on img
|
||||||
* @return string Return tag img
|
* @return string Return tag img
|
||||||
*/
|
*/
|
||||||
function img_edit_add($titlealt = 'default')
|
function img_edit_add($titlealt = 'default', $other = '')
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if ($titlealt == 'default') $titlealt = $langs->trans('Add');
|
if ($titlealt == 'default') $titlealt = $langs->trans('Add');
|
||||||
|
|
||||||
return img_picto($titlealt, 'edit_add.png');
|
return img_picto($titlealt, 'edit_add.png', $other);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Show logo -
|
* Show logo -
|
||||||
*
|
*
|
||||||
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
||||||
|
* @param string $other Add more attributes on img
|
||||||
* @return string Return tag img
|
* @return string Return tag img
|
||||||
*/
|
*/
|
||||||
function img_edit_remove($titlealt = 'default')
|
function img_edit_remove($titlealt = 'default', $other='')
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if ($titlealt == 'default') $titlealt = $langs->trans('Remove');
|
if ($titlealt == 'default') $titlealt = $langs->trans('Remove');
|
||||||
|
|
||||||
return img_picto($titlealt, 'edit_remove.png');
|
return img_picto($titlealt, 'edit_remove.png', $other);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2252,6 +2255,47 @@ function img_phone($titlealt = 'default', $option = 0)
|
|||||||
return img_picto($titlealt, $img);
|
return img_picto($titlealt, $img);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show search logo
|
||||||
|
*
|
||||||
|
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
||||||
|
* @param string $other Add more attributes on img
|
||||||
|
* @return string Retourne tag img
|
||||||
|
*/
|
||||||
|
function img_search($titlealt = 'default', $other = '')
|
||||||
|
{
|
||||||
|
global $conf, $langs;
|
||||||
|
|
||||||
|
if ($titlealt == 'default') $titlealt = $langs->trans('Search');
|
||||||
|
|
||||||
|
$img = img_picto($titlealt, 'search.png', $other, false, 1);
|
||||||
|
|
||||||
|
$input = '<input type="image" class="liste_titre" name="button_search" src="'.$img.'" ';
|
||||||
|
$input.= 'value="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'" >';
|
||||||
|
|
||||||
|
return $input;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show search logo
|
||||||
|
*
|
||||||
|
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
||||||
|
* @param string $other Add more attributes on img
|
||||||
|
* @return string Retourne tag img
|
||||||
|
*/
|
||||||
|
function img_searchclear($titlealt = 'default', $other = '')
|
||||||
|
{
|
||||||
|
global $conf, $langs;
|
||||||
|
|
||||||
|
if ($titlealt == 'default') $titlealt = $langs->trans('Search');
|
||||||
|
|
||||||
|
$img = img_picto($titlealt, 'searchclear.png', $other, false, 1);
|
||||||
|
|
||||||
|
$input = '<input type="image" class="liste_titre" name="button_removefilter" src="'.$img.'" ';
|
||||||
|
$input.= 'value="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'" >';
|
||||||
|
|
||||||
|
return $input;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show information for admin users
|
* Show information for admin users
|
||||||
|
|||||||
@ -1221,7 +1221,7 @@ function dol_print_reduction($reduction,$langs)
|
|||||||
$string = '';
|
$string = '';
|
||||||
if ($reduction == 100)
|
if ($reduction == 100)
|
||||||
{
|
{
|
||||||
$string = $langs->trans("Offered");
|
$string = $langs->transnoentities("Offered");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1326,7 +1326,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
|
|||||||
if (! $tmpdir) { unset($listofdir[$key]); continue; }
|
if (! $tmpdir) { unset($listofdir[$key]); continue; }
|
||||||
if (is_dir($tmpdir))
|
if (is_dir($tmpdir))
|
||||||
{
|
{
|
||||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$','','name',SORT_ASC,0,true); // Disable hook for the moment
|
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$','','name',SORT_ASC,0);
|
||||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -642,6 +642,7 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0, $sta
|
|||||||
|
|
||||||
$sortfield='';
|
$sortfield='';
|
||||||
$sortorder='';
|
$sortorder='';
|
||||||
|
$project_year_filter=0;
|
||||||
|
|
||||||
$title=$langs->trans("Project");
|
$title=$langs->trans("Project");
|
||||||
if ($statut == 0) $title=$langs->trans("ProjectDraft");
|
if ($statut == 0) $title=$langs->trans("ProjectDraft");
|
||||||
@ -681,6 +682,17 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0, $sta
|
|||||||
{
|
{
|
||||||
$sql.= " AND p.fk_statut = ".$statut;
|
$sql.= " AND p.fk_statut = ".$statut;
|
||||||
}
|
}
|
||||||
|
if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) {
|
||||||
|
$project_year_filter = GETPOST("project_year_filter");
|
||||||
|
//Check if empty or invalid year. Wildcard ignores the sql check
|
||||||
|
if ($project_year_filter != "*") {
|
||||||
|
if (empty($project_year_filter) || !ctype_digit($project_year_filter)) { //
|
||||||
|
$project_year_filter = date("Y");
|
||||||
|
}
|
||||||
|
$sql.= " AND (p.dateo IS NULL OR p.dateo <= ".$db->idate(dol_get_last_day($project_year_filter,12,false)).")";
|
||||||
|
$sql.= " AND (p.datee IS NULL OR p.datee >= ".$db->idate(dol_get_first_day($project_year_filter,1,false)).")";
|
||||||
|
}
|
||||||
|
}
|
||||||
$sql.= " GROUP BY p.rowid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut";
|
$sql.= " GROUP BY p.rowid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut";
|
||||||
$sql.= " ORDER BY p.title, p.ref";
|
$sql.= " ORDER BY p.title, p.ref";
|
||||||
|
|
||||||
@ -724,6 +736,19 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0, $sta
|
|||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
if (!empty($conf->global->PROJECT_LIMIT_YEAR_RANGE)) {
|
||||||
|
//Add the year filter input
|
||||||
|
print '<table width="100%">';
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>'.$langs->trans("Year").'</td>';
|
||||||
|
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<td style="text-align:right"><input type="text" size="4" class="flat" name="project_year_filter" value="'.$project_year_filter.'"/>';
|
||||||
|
print '</form>';
|
||||||
|
print "</tr>\n";
|
||||||
|
print '</table>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,22 +39,22 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
-- Home - Sytem info
|
-- Home - Sytem info
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$user->admin', __HANDLER__, 'left', 300__+MAX_llx_menu__, 'home', 'admintools', 1__+MAX_llx_menu__, '/admin/tools/index.php?leftmenu=admintools', 'SystemTools', 0, 'admin', '', '', 2, 2, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$user->admin', __HANDLER__, 'left', 300__+MAX_llx_menu__, 'home', 'admintools', 1__+MAX_llx_menu__, '/admin/tools/index.php?leftmenu=admintools', 'SystemTools', 0, 'admin', '', '', 2, 2, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 201__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/dolibarr.php?leftmenu=admintools', 'InfoDolibarr', 1, 'admin', '', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 201__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/dolibarr.php?leftmenu=admintools', 'InfoDolibarr', 1, 'admin', '', '', 2, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 208__+MAX_llx_menu__, 'home', '', 201__+MAX_llx_menu__, '/admin/system/modules.php?leftmenu=admintools', 'Modules', 2, 'admin', '', '', 2, 2, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 202__+MAX_llx_menu__, 'home', '', 201__+MAX_llx_menu__, '/admin/system/modules.php?leftmenu=admintools', 'Modules', 2, 'admin', '', '', 2, 2, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 207__+MAX_llx_menu__, 'home', '', 201__+MAX_llx_menu__, '/admin/triggers.php?leftmenu=admintools', 'Triggers', 2, 'admin', '', '', 2, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 203__+MAX_llx_menu__, 'home', '', 201__+MAX_llx_menu__, '/admin/triggers.php?leftmenu=admintools', 'Triggers', 2, 'admin', '', '', 2, 3, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 204__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/browser.php?leftmenu=admintools', 'InfoBrowser', 1, 'admin', '', '', 2, 1, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 204__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/browser.php?leftmenu=admintools', 'InfoBrowser', 1, 'admin', '', '', 2, 1, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 204__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/os.php?leftmenu=admintools', 'InfoOS', 1, 'admin', '', '', 2, 2, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 205__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/os.php?leftmenu=admintools', 'InfoOS', 1, 'admin', '', '', 2, 2, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 205__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/web.php?leftmenu=admintools', 'InfoWebServer', 1, 'admin', '', '', 2, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 206__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/web.php?leftmenu=admintools', 'InfoWebServer', 1, 'admin', '', '', 2, 3, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 206__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/phpinfo.php?leftmenu=admintools', 'InfoPHP', 1, 'admin', '', '', 2, 4, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 207__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/phpinfo.php?leftmenu=admintools', 'InfoPHP', 1, 'admin', '', '', 2, 4, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 210__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/database.php?leftmenu=admintools', 'InfoDatabase', 1, 'admin', '', '', 2, 5, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 210__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/database.php?leftmenu=admintools', 'InfoDatabase', 1, 'admin', '', '', 2, 5, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 301__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_export.php?leftmenu=admintools', 'Backup', 1, 'admin', '', '', 2, 6, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 301__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_export.php?leftmenu=admintools', 'Backup', 1, 'admin', '', '', 2, 6, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 302__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_import.php?leftmenu=admintools', 'Restore', 1, 'admin', '', '', 2, 7, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 302__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_import.php?leftmenu=admintools', 'Restore', 1, 'admin', '', '', 2, 7, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 305__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/update.php?leftmenu=admintools', 'MenuUpgrade', 1, 'admin', '', '', 2, 8, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 305__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/update.php?leftmenu=admintools', 'MenuUpgrade', 1, 'admin', '', '', 2, 8, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools" && function_exists("eaccelerator_info")', __HANDLER__, 'left', 304__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/eaccelerator.php?leftmenu=admintools', 'EAccelerator', 1, 'admin', '', '', 2, 9, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools" && function_exists("eaccelerator_info")', __HANDLER__, 'left', 306__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/eaccelerator.php?leftmenu=admintools', 'EAccelerator', 1, 'admin', '', '', 2, 9, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 306__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listevents.php?leftmenu=admintools', 'Audit', 1, 'admin', '', '', 2, 10, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 307__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listevents.php?leftmenu=admintools', 'Audit', 1, 'admin', '', '', 2, 10, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 308__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listsessions.php?leftmenu=admintools', 'Sessions', 1, 'admin', '', '', 2, 11, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 308__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listsessions.php?leftmenu=admintools', 'Sessions', 1, 'admin', '', '', 2, 11, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 303__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/purge.php?leftmenu=admintools', 'Purge', 1, 'admin', '', '', 2, 12, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 309__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/purge.php?leftmenu=admintools', 'Purge', 1, 'admin', '', '', 2, 12, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 307__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/support/index.php?leftmenu=admintools', 'HelpCenter', 1, 'help', '', '_blank', 2, 13, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 310__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/support/index.php?leftmenu=admintools', 'HelpCenter', 1, 'help', '', '_blank', 2, 13, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 203__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 311__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__);
|
||||||
-- Home - Menu users and groups
|
-- Home - Menu users and groups
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 3, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);
|
||||||
@ -102,7 +102,6 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3100__+MAX_llx_menu__, 'products', 'stock', 3__+MAX_llx_menu__, '/product/stock/index.php?leftmenu=stock', 'Stock', 0, 'stocks', '$user->rights->stock->lire', '', 2, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3100__+MAX_llx_menu__, 'products', 'stock', 3__+MAX_llx_menu__, '/product/stock/index.php?leftmenu=stock', 'Stock', 0, 'stocks', '$user->rights->stock->lire', '', 2, 3, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3101__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/fiche.php?action=create', 'MenuNewWarehouse', 1, 'stocks', '$user->rights->stock->creer', '', 2, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3101__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/fiche.php?action=create', 'MenuNewWarehouse', 1, 'stocks', '$user->rights->stock->creer', '', 2, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3102__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/liste.php', 'List', 1, 'stocks', '$user->rights->stock->lire', '', 2, 1, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3102__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/liste.php', 'List', 1, 'stocks', '$user->rights->stock->lire', '', 2, 1, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3103__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/valo.php', 'EnhancedValue', 1, 'stocks', '$user->rights->stock->lire', '', 2, 2, __ENTITY__);
|
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3104__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/mouvement.php', 'Movements', 1, 'stocks', '$user->rights->stock->mouvement->lire', '', 2, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3104__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/mouvement.php', 'Movements', 1, 'stocks', '$user->rights->stock->mouvement->lire', '', 2, 3, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3106__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/massstockmove.php', 'StockTransfer', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3106__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/massstockmove.php', 'StockTransfer', 1, 'stocks', '$user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__);
|
||||||
|
|||||||
@ -918,7 +918,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
// Grand livre
|
// Grand livre
|
||||||
$newmenu->add("/accountancy/bookkeeping/list.php?leftmenu=bookkeeping",$langs->trans("Bookkeeping"),0,$user->rights->accounting->mouvements->lire, '', $mainmenu, 'bookkeeping');
|
$newmenu->add("/accountancy/bookkeeping/list.php?leftmenu=bookkeeping",$langs->trans("Bookkeeping"),0,$user->rights->accounting->mouvements->lire, '', $mainmenu, 'bookkeeping');
|
||||||
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/listbyyear.php",$langs->trans("ByYear"),1,$user->rights->accounting->mouvements->lire);
|
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/listbyyear.php",$langs->trans("ByYear"),1,$user->rights->accounting->mouvements->lire);
|
||||||
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/balancebymonth.php.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire);
|
if (empty($leftmenu) || preg_match('/bookkeeping/',$leftmenu)) $newmenu->add("/accountancy/bookkeeping/balancebymonth.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire);
|
||||||
|
|
||||||
// Accountancy journals
|
// Accountancy journals
|
||||||
if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy')
|
if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy')
|
||||||
@ -1068,7 +1068,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Stocks"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
|
$newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Stocks"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
|
||||||
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/fiche.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer);
|
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/fiche.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer);
|
||||||
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/liste.php", $langs->trans("List"), 1, $user->rights->stock->lire);
|
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/liste.php", $langs->trans("List"), 1, $user->rights->stock->lire);
|
||||||
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/valo.php", $langs->trans("EnhancedValue"), 1, $user->rights->stock->lire);
|
|
||||||
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire);
|
if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire);
|
||||||
if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire);
|
if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire);
|
||||||
if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire);
|
if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire);
|
||||||
|
|||||||
@ -153,6 +153,36 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
|
$nblignes = count($object->lines);
|
||||||
|
|
||||||
|
// Loop on each lines to detect if there is at least one image to show
|
||||||
|
$realpatharray=array();
|
||||||
|
if (! empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE))
|
||||||
|
{
|
||||||
|
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||||
|
{
|
||||||
|
if (empty($object->lines[$i]->fk_product)) continue;
|
||||||
|
|
||||||
|
$objphoto = new Product($this->db);
|
||||||
|
$objphoto->fetch($object->lines[$i]->fk_product);
|
||||||
|
|
||||||
|
$pdir = get_exdir($object->lines[$i]->fk_product,2) . $object->lines[$i]->fk_product ."/photos/";
|
||||||
|
$dir = $conf->product->dir_output.'/'.$pdir;
|
||||||
|
|
||||||
|
$realpath='';
|
||||||
|
foreach ($objphoto->liste_photos($dir,1) as $key => $obj)
|
||||||
|
{
|
||||||
|
$filename=$obj['photo'];
|
||||||
|
//if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette'];
|
||||||
|
$realpath = $dir.$filename;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($realpath) $realpatharray[$i]=$realpath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (count($realpatharray) == 0) $this->posxpicture=$this->posxtva;
|
||||||
|
|
||||||
if ($conf->facture->dir_output)
|
if ($conf->facture->dir_output)
|
||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
@ -195,9 +225,8 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
global $action;
|
global $action;
|
||||||
$reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('beforePDFCreation',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
$nblignes = count($object->lines);
|
// Create pdf instance
|
||||||
|
$pdf=pdf_getInstance($this->format);
|
||||||
$pdf=pdf_getInstance($this->format);
|
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
$default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance
|
||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
@ -309,17 +338,43 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
|
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
|
||||||
|
// Define size of image if we need it
|
||||||
|
$imglinesize=array();
|
||||||
|
if (! empty($realpatharray[$i])) $imglinesize=pdf_getSizeForImage($realpatharray[$i]);
|
||||||
|
|
||||||
$pdf->setTopMargin($tab_top_newpage);
|
$pdf->setTopMargin($tab_top_newpage);
|
||||||
$pdf->setPageOrientation('', 1, $heightforfooter+$heightforfreetext+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, $heightforfooter+$heightforfreetext+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
||||||
$pageposbefore=$pdf->getPage();
|
$pageposbefore=$pdf->getPage();
|
||||||
|
|
||||||
|
$showpricebeforepagebreak=1;
|
||||||
|
$posYAfterImage=0;
|
||||||
|
$posYAfterDescription=0;
|
||||||
|
|
||||||
|
// We start with Photo of product line
|
||||||
|
if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur-($heightforfooter+$heightforfreetext+$heightforinfotot))) // If photo too high, we moved completely on new 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($pageposbefore+1);
|
||||||
|
|
||||||
|
$curY = $tab_top_newpage;
|
||||||
|
$showpricebeforepagebreak=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($imglinesize['width']) && isset($imglinesize['height']))
|
||||||
|
{
|
||||||
|
$curX = $this->posxpicture-1;
|
||||||
|
$pdf->Image($realpatharray[$i], $curX + (($this->posxtva-$this->posxpicture-$imglinesize['width'])/2), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi
|
||||||
|
// $pdf->Image does not increase value return by getY, so we save it manually
|
||||||
|
$posYAfterImage=$curY+$imglinesize['height'];
|
||||||
|
}
|
||||||
|
|
||||||
// Description of product line
|
// Description of product line
|
||||||
$curX = $this->posxdesc-1;
|
$curX = $this->posxdesc-1;
|
||||||
|
|
||||||
$showpricebeforepagebreak=1;
|
|
||||||
|
|
||||||
$pdf->startTransaction();
|
$pdf->startTransaction();
|
||||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc);
|
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxpicture-$curX,3,$curX,$curY,$hideref,$hidedesc);
|
||||||
$pageposafter=$pdf->getPage();
|
$pageposafter=$pdf->getPage();
|
||||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||||
{
|
{
|
||||||
@ -327,7 +382,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pageposafter=$pageposbefore;
|
$pageposafter=$pageposbefore;
|
||||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc);
|
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxpicture-$curX,3,$curX,$curY,$hideref,$hidedesc);
|
||||||
$pageposafter=$pdf->getPage();
|
$pageposafter=$pdf->getPage();
|
||||||
$posyafter=$pdf->GetY();
|
$posyafter=$pdf->GetY();
|
||||||
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
|
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
|
||||||
@ -351,14 +406,15 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
$pdf->commitTransaction();
|
$pdf->commitTransaction();
|
||||||
}
|
}
|
||||||
|
$posYAfterDescription=$pdf->GetY();
|
||||||
|
|
||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
$pageposafter=$pdf->getPage();
|
$pageposafter=$pdf->getPage();
|
||||||
$pdf->setPage($pageposbefore);
|
$pdf->setPage($pageposbefore);
|
||||||
$pdf->setTopMargin($this->marge_haute);
|
$pdf->setTopMargin($this->marge_haute);
|
||||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||||
|
|
||||||
// We suppose that a too long description is moved completely on next page
|
// We suppose that a too long description or photo were moved completely on next page
|
||||||
if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
|
if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
|
||||||
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
||||||
}
|
}
|
||||||
@ -430,6 +486,8 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if (! isset($this->tva[$vatrate])) $this->tva[$vatrate]='';
|
if (! isset($this->tva[$vatrate])) $this->tva[$vatrate]='';
|
||||||
$this->tva[$vatrate] += $tvaligne;
|
$this->tva[$vatrate] += $tvaligne;
|
||||||
|
|
||||||
|
if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage;
|
||||||
|
|
||||||
// Add line
|
// Add line
|
||||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
|
||||||
{
|
{
|
||||||
@ -512,11 +570,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->Output($file,'F');
|
$pdf->Output($file,'F');
|
||||||
|
|
||||||
// Add pdfgeneration hook
|
// Add pdfgeneration hook
|
||||||
if (! is_object($hookmanager))
|
|
||||||
{
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
|
||||||
$hookmanager=new HookManager($this->db);
|
|
||||||
}
|
|
||||||
$hookmanager->initHooks(array('pdfgeneration'));
|
$hookmanager->initHooks(array('pdfgeneration'));
|
||||||
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
global $action;
|
global $action;
|
||||||
@ -894,7 +947,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//{
|
//{
|
||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5','7'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||||
{
|
{
|
||||||
@ -927,7 +980,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//{
|
//{
|
||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('1','3','5','7'))) continue;
|
if (in_array((string) $localtax_type, array('1','3','5'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||||
{
|
{
|
||||||
@ -1121,7 +1174,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1);
|
||||||
|
|
||||||
// Fin
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
}
|
}
|
||||||
@ -1180,6 +1232,16 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE))
|
||||||
|
{
|
||||||
|
$pdf->line($this->posxpicture-1, $tab_top, $this->posxpicture-1, $tab_top + $tab_height);
|
||||||
|
if (empty($hidetop))
|
||||||
|
{
|
||||||
|
//$pdf->SetXY($this->posxpicture-1, $tab_top+1);
|
||||||
|
//$pdf->MultiCell($this->posxtva-$this->posxpicture-1,2, $outputlangs->transnoentities("Photo"),'','C');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||||
{
|
{
|
||||||
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
||||||
|
|||||||
@ -82,7 +82,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$this->option_modereg = 0; // Affiche mode reglement
|
$this->option_modereg = 0; // Affiche mode reglement
|
||||||
$this->option_condreg = 0; // Affiche conditions reglement
|
$this->option_condreg = 0; // Affiche conditions reglement
|
||||||
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
$this->option_codeproduitservice = 0; // Affiche code produit-service
|
||||||
$this->option_multilang = 0; // Dispo en plusieurs langues
|
$this->option_multilang = 1; // Dispo en plusieurs langues
|
||||||
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
||||||
|
|
||||||
// Get source company
|
// Get source company
|
||||||
@ -222,22 +222,22 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$nexY = $tab_top + 7;
|
$nexY = $tab_top + 7;
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $tab_top);
|
$pdf->SetXY($this->marge_gauche, $tab_top);
|
||||||
$pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0);
|
$pdf->MultiCell(190,5,$outputlangs->transnoentities("Description"),0,'L',0);
|
||||||
$pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8);
|
$pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur-$this->marge_droite, $tab_top + 5);
|
||||||
|
|
||||||
$pdf->SetFont('', '', $default_font_size - 1);
|
$pdf->SetFont('', '', $default_font_size - 1);
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $tab_top + 8);
|
$pdf->SetXY($this->marge_gauche, $tab_top + 5);
|
||||||
$text=$object->description;
|
$text=$object->description;
|
||||||
if ($object->duree > 0)
|
if ($object->duree > 0)
|
||||||
{
|
{
|
||||||
$totaltime=convertSecondToTime($object->duree,'all',$conf->global->MAIN_DURATION_OF_WORKDAY);
|
$totaltime=convertSecondToTime($object->duration,'all',$conf->global->MAIN_DURATION_OF_WORKDAY);
|
||||||
$text.=($text?' - ':'').$langs->trans("Total").": ".$totaltime;
|
$text.=($text?' - ':'').$langs->trans("Total").": ".$totaltime;
|
||||||
}
|
}
|
||||||
$desc=dol_htmlentitiesbr($text,1);
|
$desc=dol_htmlentitiesbr($text,1);
|
||||||
//print $outputlangs->convToOutputCharset($desc); exit;
|
//print $outputlangs->convToOutputCharset($desc); exit;
|
||||||
|
|
||||||
$pdf->writeHTMLCell(180, 3, 10, $tab_top + 8, $outputlangs->convToOutputCharset($desc), 0, 1);
|
$pdf->writeHTMLCell(180, 3, 10, $tab_top + 5, $outputlangs->convToOutputCharset($desc), 0, 1);
|
||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
|
|
||||||
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur-$this->marge_droite, $nexY);
|
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur-$this->marge_droite, $nexY);
|
||||||
@ -262,7 +262,12 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$pageposbefore=$pdf->getPage();
|
$pageposbefore=$pdf->getPage();
|
||||||
|
|
||||||
// Description of product line
|
// Description of product line
|
||||||
$txt='<strong>'.dol_htmlentitiesbr($outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei,'dayhour',false,$outputlangs,true)." - ".$outputlangs->transnoentities("Duration")." : ".convertSecondToTime($objectligne->duration),1,$outputlangs->charset_output).'</strong>';
|
$txt=$outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei,'dayhour',false,$outputlangs,true);
|
||||||
|
if ($objectligne->duration > 0)
|
||||||
|
{
|
||||||
|
$txt.=" - ".$outputlangs->transnoentities("Duration")." : ".convertSecondToTime($objectligne->duration);
|
||||||
|
}
|
||||||
|
$txt='<strong>'.dol_htmlentitiesbr($txt,1,$outputlangs->charset_output).'</strong>';
|
||||||
$desc=dol_htmlentitiesbr($objectligne->desc,1);
|
$desc=dol_htmlentitiesbr($objectligne->desc,1);
|
||||||
|
|
||||||
$pdf->writeHTMLCell(0, 0, $curX, $curY + 1, dol_concatdesc($txt,$desc), 0, 1, 0);
|
$pdf->writeHTMLCell(0, 0, $curX, $curY + 1, dol_concatdesc($txt,$desc), 0, 1, 0);
|
||||||
|
|||||||
@ -205,7 +205,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
{
|
{
|
||||||
if (dol_mkdir($dir) < 0)
|
if (dol_mkdir($dir) < 0)
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
$this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -383,6 +383,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
$pageposafter=$pdf->getPage();
|
$pageposafter=$pdf->getPage();
|
||||||
$posyafter=$pdf->GetY();
|
$posyafter=$pdf->GetY();
|
||||||
|
//var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit;
|
||||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
||||||
{
|
{
|
||||||
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page
|
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page
|
||||||
@ -551,12 +552,11 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs);
|
$posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs);
|
||||||
|
|
||||||
// Affiche zone totaux
|
// Affiche zone totaux
|
||||||
//$posy=$this->_tableau_tot($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs);
|
|
||||||
$posy=$this->_tableau_tot($pdf, $object, 0, $bottomlasttab, $outputlangs);
|
$posy=$this->_tableau_tot($pdf, $object, 0, $bottomlasttab, $outputlangs);
|
||||||
|
|
||||||
// Affiche zone versements
|
// Affiche zone versements
|
||||||
/*
|
/*
|
||||||
if ($deja_regle)
|
if ($deja_regle || $amount_credit_notes_included || $amount_deposits_included)
|
||||||
{
|
{
|
||||||
$posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs);
|
$posy=$this->_tableau_versements($pdf, $object, $posy, $outputlangs);
|
||||||
}
|
}
|
||||||
@ -729,20 +729,22 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
// Si mode reglement non force ou si force a CHQ
|
// Si mode reglement non force ou si force a CHQ
|
||||||
if (! empty($conf->global->FACTURE_CHQ_NUMBER))
|
if (! empty($conf->global->FACTURE_CHQ_NUMBER))
|
||||||
{
|
{
|
||||||
|
$diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE);
|
||||||
|
|
||||||
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
|
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
|
||||||
{
|
{
|
||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
$account->fetch($conf->global->FACTURE_CHQ_NUMBER);
|
$account->fetch($conf->global->FACTURE_CHQ_NUMBER);
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$pdf->SetFont('','B', $default_font_size - 3);
|
$pdf->SetFont('','B', $default_font_size - $diffsizetitle);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$account->proprio),0,'L',0);
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$account->proprio),0,'L',0);
|
||||||
$posy=$pdf->GetY()+1;
|
$posy=$pdf->GetY()+1;
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS))
|
if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS))
|
||||||
{
|
{
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$pdf->SetFont('','', $default_font_size - 3);
|
$pdf->SetFont('','', $default_font_size - $diffsizetitle);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0);
|
$pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0);
|
||||||
$posy=$pdf->GetY()+2;
|
$posy=$pdf->GetY()+2;
|
||||||
}
|
}
|
||||||
@ -750,14 +752,14 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
if ($conf->global->FACTURE_CHQ_NUMBER == -1)
|
if ($conf->global->FACTURE_CHQ_NUMBER == -1)
|
||||||
{
|
{
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$pdf->SetFont('','B', $default_font_size - 3);
|
$pdf->SetFont('','B', $default_font_size - $diffsizetitle);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$this->emetteur->name),0,'L',0);
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$this->emetteur->name),0,'L',0);
|
||||||
$posy=$pdf->GetY()+1;
|
$posy=$pdf->GetY()+1;
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS))
|
if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS))
|
||||||
{
|
{
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$pdf->SetFont('','', $default_font_size - 3);
|
$pdf->SetFont('','', $default_font_size - $diffsizetitle);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0);
|
$pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0);
|
||||||
$posy=$pdf->GetY()+2;
|
$posy=$pdf->GetY()+2;
|
||||||
}
|
}
|
||||||
@ -768,10 +770,11 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
// If payment mode not forced or forced to VIR, show payment with BAN
|
// If payment mode not forced or forced to VIR, show payment with BAN
|
||||||
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR')
|
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR')
|
||||||
{
|
{
|
||||||
if (! empty($conf->global->FACTURE_RIB_NUMBER))
|
if (! empty($object->fk_bank) || ! empty($conf->global->FACTURE_RIB_NUMBER))
|
||||||
{
|
{
|
||||||
|
$bankid=(empty($object->fk_bank)?$conf->global->FACTURE_RIB_NUMBER:$object->fk_bank);
|
||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
$account->fetch($bankid);
|
||||||
|
|
||||||
$curx=$this->marge_gauche;
|
$curx=$this->marge_gauche;
|
||||||
$cury=$posy;
|
$cury=$posy;
|
||||||
@ -971,6 +974,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||||
{
|
{
|
||||||
|
// retrieve global local tax
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
@ -1091,7 +1095,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||||
|
|
||||||
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
|
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
|
||||||
if (! empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_droite-$this->marge_gauche, 6, 'F', null, explode(',',$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
|
if (! empty($conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR)) $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_droite-$this->marge_gauche, 5, 'F', null, explode(',',$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR));
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetDrawColor(128,128,128);
|
$pdf->SetDrawColor(128,128,128);
|
||||||
@ -1102,7 +1106,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
if (empty($hidetop))
|
if (empty($hidetop))
|
||||||
{
|
{
|
||||||
$pdf->line($this->marge_gauche, $tab_top+6, $this->page_largeur-$this->marge_droite, $tab_top+6); // line prend une position y en 2eme param et 4eme param
|
$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param
|
||||||
|
|
||||||
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
||||||
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||||
@ -1235,11 +1239,11 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref), '', 'R');
|
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref), '', 'R');
|
||||||
|
|
||||||
$posy+=1;
|
$posy+=1;
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 2);
|
||||||
|
|
||||||
if ($object->ref_client)
|
if ($object->ref_client)
|
||||||
{
|
{
|
||||||
$posy+=5;
|
$posy+=4;
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R');
|
||||||
|
|||||||
@ -34,6 +34,10 @@ $expeditionid = GETPOST('id','int');
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'expedition',$expeditionid,'');
|
$result = restrictedArea($user, 'expedition',$expeditionid,'');
|
||||||
|
|
||||||
|
$search_ref_exp = GETPOST("search_ref_exp");
|
||||||
|
$search_ref_liv = GETPOST('search_ref_liv');
|
||||||
|
$search_societe = GETPOST("search_societe");
|
||||||
|
|
||||||
$sortfield = GETPOST('sortfield','alpha');
|
$sortfield = GETPOST('sortfield','alpha');
|
||||||
$sortorder = GETPOST('sortorder','alpha');
|
$sortorder = GETPOST('sortorder','alpha');
|
||||||
$page = GETPOST('page','int');
|
$page = GETPOST('page','int');
|
||||||
@ -47,6 +51,13 @@ if (! $sortfield) $sortfield="e.ref";
|
|||||||
if (! $sortorder) $sortorder="DESC";
|
if (! $sortorder) $sortorder="DESC";
|
||||||
$limit = $conf->liste_limit;
|
$limit = $conf->liste_limit;
|
||||||
|
|
||||||
|
// Do we click on purge search criteria ?
|
||||||
|
if (GETPOST("button_removefilter_x"))
|
||||||
|
{
|
||||||
|
$search_ref_exp='';
|
||||||
|
$search_ref_liv='';
|
||||||
|
$search_societe='';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -79,10 +90,9 @@ if ($socid)
|
|||||||
{
|
{
|
||||||
$sql.= " AND e.fk_soc = ".$socid;
|
$sql.= " AND e.fk_soc = ".$socid;
|
||||||
}
|
}
|
||||||
if (GETPOST('sf_ref','alpha'))
|
if ($search_ref_exp) $sql .= natural_search('e.ref', $search_ref_exp);
|
||||||
{
|
if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv);
|
||||||
$sql.= " AND e.ref like '%".$db->escape(GETPOST('sf_ref','alpha'))."%'";
|
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
|
||||||
}
|
|
||||||
|
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($limit + 1,$offset);
|
$sql.= $db->plimit($limit + 1,$offset);
|
||||||
@ -94,7 +104,10 @@ if ($resql)
|
|||||||
|
|
||||||
$expedition = new Expedition($db);
|
$expedition = new Expedition($db);
|
||||||
|
|
||||||
$param="&socid=$socid";
|
$param="";
|
||||||
|
if ($search_ref_exp) $param.= "&search_ref_exp=".$search_ref_exp;
|
||||||
|
if ($search_ref_liv) $param.= "&search_ref_liv=".$search_ref_liv;
|
||||||
|
if ($search_societe) $param.= "&search_societe=".$search_societe;
|
||||||
|
|
||||||
print_barre_liste($langs->trans('ListOfSendings'), $page, "liste.php",$param,$sortfield,$sortorder,'',$num);
|
print_barre_liste($langs->trans('ListOfSendings'), $page, "liste.php",$param,$sortfield,$sortorder,'',$num);
|
||||||
|
|
||||||
@ -103,14 +116,44 @@ if ($resql)
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre($langs->trans("Ref"),"liste.php","e.ref","",$param,'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),"ship2bill.php","e.ref","",$param,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),"liste.php","s.nom", "", $param,'align="left"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),"ship2bill.php","s.nom", "", $param,'align="left"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateDeliveryPlanned"),"liste.php","e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DateDeliveryPlanned"),"ship2bill.php","e.date_delivery","",$param, 'align="center"',$sortfield,$sortorder);
|
||||||
if($conf->livraison_bon->enabled) {
|
if($conf->livraison_bon->enabled) {
|
||||||
print_liste_field_titre($langs->trans("DateReceived"),"liste.php","e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("DeliveryOrder"),"ship2bill.php","e.date_expedition","",$param, '',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("DateReceived"),"ship2bill.php","e.date_expedition","",$param, 'align="center"',$sortfield,$sortorder);
|
||||||
}
|
}
|
||||||
print_liste_field_titre($langs->trans("Status"),"liste.php","e.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),"ship2bill.php","e.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Lignes des champs de filtre
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td class="liste_titre">';
|
||||||
|
print '<input class="flat" size="10" type="text" name="search_ref_exp" value="'.$search_ref_exp.'">';
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre" align="left">';
|
||||||
|
print '<input class="flat" type="text" size="10" name="search_societe" value="'.dol_escape_htmltag($search_societe).'">';
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
|
if($conf->livraison_bon->enabled) {
|
||||||
|
print '<td class="liste_titre">';
|
||||||
|
print '<input class="flat" size="10" type="text" name="search_ref_liv" value="'.$search_ref_liv.'"';
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre"> </td>';
|
||||||
|
}
|
||||||
|
print '<td class="liste_titre" align="right">';
|
||||||
|
// Développé dans la 3.7
|
||||||
|
//print img_search();
|
||||||
|
//print img_searchclear();
|
||||||
|
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_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre" align="center">';
|
||||||
|
print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a>';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
|
|
||||||
while ($i < min($num,$limit))
|
while ($i < min($num,$limit))
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobjectline.class.php';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classe des gestion des fiches interventions
|
* Class to manage interventions
|
||||||
*/
|
*/
|
||||||
class Fichinter extends CommonObject
|
class Fichinter extends CommonObject
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1682,11 +1682,11 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
if ($object->statut != 2)
|
if ($object->statut != 2)
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("ClassifyBilled").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled">'.$langs->trans("InterventionClassifyBilled").'</a></div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifyunbilled">'.$langs->trans("ClassifyUnBilled").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifyunbilled">'.$langs->trans("InterventionClassifyUnBilled").'</a></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,8 +63,9 @@ $search_status=GETPOST('search_status');
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
$interventionstatic=new Fichinter($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader('', $langs->trans("Intervention"));
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
@ -102,8 +103,6 @@ if ($result)
|
|||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|
||||||
$interventionstatic=new Fichinter($db);
|
|
||||||
|
|
||||||
$urlparam="&socid=$socid";
|
$urlparam="&socid=$socid";
|
||||||
print_barre_liste($langs->trans("ListOfInterventions"), $page, $_SERVER['PHP_SELF'], $urlparam, $sortfield, $sortorder, '', $num);
|
print_barre_liste($langs->trans("ListOfInterventions"), $page, $_SERVER['PHP_SELF'], $urlparam, $sortfield, $sortorder, '', $num);
|
||||||
|
|
||||||
@ -114,9 +113,9 @@ if ($result)
|
|||||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.ref","",$urlparam,'width="15%"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.ref","",$urlparam,'width="15%"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$urlparam,'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$urlparam,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Description"),$_SERVER["PHP_SELF"],"f.description","",$urlparam,'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Description"),$_SERVER["PHP_SELF"],"f.description","",$urlparam,'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre('',$_SERVER["PHP_SELF"],'');
|
|
||||||
if (empty($conf->global->FICHINTER_DISABLE_DETAILS))
|
if (empty($conf->global->FICHINTER_DISABLE_DETAILS))
|
||||||
{
|
{
|
||||||
|
print_liste_field_titre('',$_SERVER["PHP_SELF"],'');
|
||||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"fd.date","",$urlparam,'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"fd.date","",$urlparam,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Duration"),$_SERVER["PHP_SELF"],"fd.duree","",$urlparam,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Duration"),$_SERVER["PHP_SELF"],"fd.duree","",$urlparam,'align="right"',$sortfield,$sortorder);
|
||||||
}
|
}
|
||||||
@ -131,15 +130,16 @@ if ($result)
|
|||||||
print '</td><td class="liste_titre">';
|
print '</td><td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="search_desc" value="'.$search_desc.'" size="12">';
|
print '<input type="text" class="flat" name="search_desc" value="'.$search_desc.'" size="12">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
|
||||||
if (empty($conf->global->FICHINTER_DISABLE_DETAILS))
|
if (empty($conf->global->FICHINTER_DISABLE_DETAILS))
|
||||||
{
|
{
|
||||||
|
// Desc of line
|
||||||
|
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" align="right">';
|
||||||
$liststatus=array('0'=>$langs->trans("Draft"), '1'=>$langs->trans("Validated"), '2'=>$langs->trans("Billed"));
|
$liststatus=$interventionstatic->statuts_short;
|
||||||
print $form->selectarray('search_status', $liststatus, GETPOST('search_status'), 1);
|
print $form->selectarray('search_status', $liststatus, GETPOST('search_status'), 1, 0, 0, '', 1);
|
||||||
print '<input class="liste_titre" align="right" type="image" 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 class="liste_titre" align="right" type="image" 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>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -166,9 +166,9 @@ if ($result)
|
|||||||
print $companystatic->getNomUrl(1,'',44);
|
print $companystatic->getNomUrl(1,'',44);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.dol_htmlentitiesbr(dol_trunc($objp->description,20)).'</td>';
|
print '<td>'.dol_htmlentitiesbr(dol_trunc($objp->description,20)).'</td>';
|
||||||
print '<td>'.dol_htmlentitiesbr(dol_trunc($objp->descriptiondetail,20)).'</td>';
|
|
||||||
if (empty($conf->global->FICHINTER_DISABLE_DETAILS))
|
if (empty($conf->global->FICHINTER_DISABLE_DETAILS))
|
||||||
{
|
{
|
||||||
|
print '<td>'.dol_htmlentitiesbr(dol_trunc($objp->descriptiondetail,20)).'</td>';
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'dayhour')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'dayhour')."</td>\n";
|
||||||
print '<td align="right">'.convertSecondToTime($objp->duree).'</td>';
|
print '<td align="right">'.convertSecondToTime($objp->duree).'</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -526,11 +526,11 @@ elseif ($action == 'update_line' && $user->rights->fournisseur->facture->creer)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$localtax1tx= get_localtax($_POST['tauxtva'], 1, $mysoc,$object->thirdparty);
|
$localtax1_tx= get_localtax($_POST['tauxtva'], 1, $mysoc,$object->thirdparty);
|
||||||
$localtax2tx= get_localtax($_POST['tauxtva'], 2, $mysoc,$object->thirdparty);
|
$localtax2_tx= get_localtax($_POST['tauxtva'], 2, $mysoc,$object->thirdparty);
|
||||||
$remise_percent=GETPOST('remise_percent');
|
$remise_percent=GETPOST('remise_percent');
|
||||||
|
|
||||||
$result=$object->updateline(GETPOST('lineid'), $label, $pu, GETPOST('tauxtva'), $localtax1tx, $localtax2tx, GETPOST('qty'), GETPOST('idprod'), $price_base_type, 0, $type, $remise_percent);
|
$result=$object->updateline(GETPOST('lineid'), $label, $pu, GETPOST('tauxtva'), $localtax1_tx, $localtax2_tx, GETPOST('qty'), GETPOST('idprod'), $price_base_type, 0, $type, $remise_percent);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
unset($_POST['label']);
|
unset($_POST['label']);
|
||||||
@ -626,13 +626,13 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer)
|
|||||||
$tvatx=get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, $_POST['idprodfournprice']);
|
$tvatx=get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, $_POST['idprodfournprice']);
|
||||||
$npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, $_POST['idprodfournprice']);
|
$npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, $_POST['idprodfournprice']);
|
||||||
|
|
||||||
$localtax1tx= get_localtax($tvatx, 1, $mysoc,$object->thirdparty);
|
$localtax1_tx= get_localtax($tvatx, 1, $mysoc,$object->thirdparty);
|
||||||
$localtax2tx= get_localtax($tvatx, 2, $mysoc,$object->thirdparty);
|
$localtax2_tx= get_localtax($tvatx, 2, $mysoc,$object->thirdparty);
|
||||||
|
|
||||||
$type = $productsupplier->type;
|
$type = $productsupplier->type;
|
||||||
|
|
||||||
// TODO Save the product supplier ref into database into field ref_supplier (must rename field ref into ref_supplier first)
|
// TODO Save the product supplier ref into database into field ref_supplier (must rename field ref into ref_supplier first)
|
||||||
$result=$object->addline($desc, $productsupplier->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $qty, $idprod, $remise_percent, '', '', 0, $npr);
|
$result=$object->addline($desc, $productsupplier->fourn_pu, $tvatx, $localtax1_tx, $localtax2_tx, $qty, $idprod, $remise_percent, '', '', 0, $npr);
|
||||||
}
|
}
|
||||||
if ($idprod == -2 || $idprod == 0)
|
if ($idprod == -2 || $idprod == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -106,8 +106,8 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye
|
|||||||
if ($datepaye && ($datepaye < $tmpinvoice->date))
|
if ($datepaye && ($datepaye < $tmpinvoice->date))
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error++;
|
//$error++;
|
||||||
setEventMessage($langs->transnoentities("ErrorPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'errors');
|
setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,19 @@
|
|||||||
-- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user);
|
-- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user);
|
||||||
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
|
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
|
||||||
|
|
||||||
|
ALTER TABLE llx_bank_account ADD COLUMN fk_user_author integer;
|
||||||
|
|
||||||
|
ALTER TABLE llx_propal ADD COLUMN fk_user_modif integer after fk_user_author;
|
||||||
|
ALTER TABLE llx_commande ADD COLUMN fk_user_modif integer after fk_user_author;
|
||||||
|
ALTER TABLE llx_facture ADD COLUMN fk_user_modif integer after fk_user_author;
|
||||||
|
ALTER TABLE llx_product ADD COLUMN fk_user_modif integer after fk_user_author;
|
||||||
|
ALTER TABLE llx_fichinter ADD COLUMN fk_user_modif integer after fk_user_author;
|
||||||
|
ALTER TABLE llx_commande_fournisseur ADD COLUMN fk_user_modif integer after fk_user_author;
|
||||||
|
ALTER TABLE llx_facture_fourn ADD COLUMN fk_user_modif integer after fk_user_author;
|
||||||
|
ALTER TABLE llx_bank_account ADD COLUMN fk_user_modif integer after fk_user_author;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_fichinter ADD COLUMN ref_ext varchar(255);
|
||||||
|
|
||||||
|
|
||||||
-- Defined only to have specific list for countries that can't use generic list (like argentina that need type A or B)
|
-- Defined only to have specific list for countries that can't use generic list (like argentina that need type A or B)
|
||||||
|
|||||||
@ -108,6 +108,7 @@ UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps
|
|||||||
-- VMYSQL DELETE from llx_menu where module = 'margins' and url = '/margin/index.php' and not exists (select * from llx_const where name = 'MAIN_MODULE_MARGIN' or name = 'MAIN_MODULE_MARGINS');
|
-- VMYSQL DELETE from llx_menu where module = 'margins' and url = '/margin/index.php' and not exists (select * from llx_const where name = 'MAIN_MODULE_MARGIN' or name = 'MAIN_MODULE_MARGINS');
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur;
|
||||||
ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur;
|
ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur;
|
||||||
|
|
||||||
|
|
||||||
@ -178,3 +179,9 @@ UPDATE llx_actioncomm set fk_user_action = fk_user_author where fk_user_author >
|
|||||||
-- DROP TABLE llx_pos_moviments;
|
-- DROP TABLE llx_pos_moviments;
|
||||||
-- DROP TABLE llx_pos_ticketdet;
|
-- DROP TABLE llx_pos_ticketdet;
|
||||||
|
|
||||||
|
-- To replace amount on all invoice and lines when forgetting to apply a 20% vat
|
||||||
|
-- update llx_facturedet set tva_tx = 20 where tva_tx = 0;
|
||||||
|
-- update llx_facturedet set total_ht = round(total_ttc / 1.2, 5) where total_ht = total_ttc;
|
||||||
|
-- update llx_facturedet set total_tva = total_ttc - total_ht where total_vat = 0;
|
||||||
|
-- update llx_facture set total = round(total_ttc / 1.2, 5) where total_ht = total_ttc;
|
||||||
|
-- update llx_facture set tva = total_ttc - total where tva = 0;
|
||||||
|
|||||||
@ -30,6 +30,8 @@ create table llx_bank_account
|
|||||||
ref varchar(12) NOT NULL,
|
ref varchar(12) NOT NULL,
|
||||||
label varchar(30) NOT NULL,
|
label varchar(30) NOT NULL,
|
||||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
|
fk_user_author integer,
|
||||||
|
fk_user_modif integer,
|
||||||
bank varchar(60),
|
bank varchar(60),
|
||||||
code_banque varchar(8),
|
code_banque varchar(8),
|
||||||
code_guichet varchar(6),
|
code_guichet varchar(6),
|
||||||
|
|||||||
@ -36,9 +36,10 @@ create table llx_commande
|
|||||||
date_valid datetime, -- date de validation
|
date_valid datetime, -- date de validation
|
||||||
date_cloture datetime, -- date de cloture
|
date_cloture datetime, -- date de cloture
|
||||||
date_commande date, -- date de la commande
|
date_commande date, -- date de la commande
|
||||||
fk_user_author integer, -- createur de la commande
|
fk_user_author integer, -- user making creation
|
||||||
fk_user_valid integer, -- valideur de la commande
|
fk_user_modif integer, -- user making last change
|
||||||
fk_user_cloture integer, -- auteur cloture
|
fk_user_valid integer, -- user validating
|
||||||
|
fk_user_cloture integer, -- user closing
|
||||||
source smallint,
|
source smallint,
|
||||||
fk_statut smallint default 0,
|
fk_statut smallint default 0,
|
||||||
amount_ht real default 0,
|
amount_ht real default 0,
|
||||||
|
|||||||
@ -30,16 +30,17 @@ create table llx_commande_fournisseur
|
|||||||
ref_supplier varchar(30),
|
ref_supplier varchar(30),
|
||||||
|
|
||||||
fk_soc integer NOT NULL,
|
fk_soc integer NOT NULL,
|
||||||
fk_projet integer DEFAULT 0, -- projet auquel est rattache la commande
|
fk_projet integer DEFAULT 0, -- project id
|
||||||
|
|
||||||
tms timestamp,
|
tms timestamp,
|
||||||
date_creation datetime, -- date de creation
|
date_creation datetime, -- date de creation
|
||||||
date_valid datetime, -- date de validation
|
date_valid datetime, -- date de validation
|
||||||
date_approve datetime, -- date de approve
|
date_approve datetime, -- date de approve
|
||||||
date_commande date, -- date de la commande
|
date_commande date, -- date de la commande
|
||||||
fk_user_author integer, -- createur de la commande
|
fk_user_author integer, -- user making creation
|
||||||
fk_user_valid integer, -- valideur de la commande
|
fk_user_modif integer, -- user making last change
|
||||||
fk_user_approve integer, -- auteur approve
|
fk_user_valid integer, -- user validating
|
||||||
|
fk_user_approve integer, -- user approving
|
||||||
source smallint NOT NULL,
|
source smallint NOT NULL,
|
||||||
fk_statut smallint default 0,
|
fk_statut smallint default 0,
|
||||||
amount_ht real default 0,
|
amount_ht real default 0,
|
||||||
|
|||||||
@ -56,8 +56,9 @@ create table llx_facture
|
|||||||
|
|
||||||
fk_statut smallint DEFAULT 0 NOT NULL,
|
fk_statut smallint DEFAULT 0 NOT NULL,
|
||||||
|
|
||||||
fk_user_author integer, -- createur de la facture
|
fk_user_author integer, -- user making creation
|
||||||
fk_user_valid integer, -- valideur de la facture
|
fk_user_modif integer, -- user making last change
|
||||||
|
fk_user_valid integer, -- user validating
|
||||||
|
|
||||||
fk_facture_source integer, -- facture origine si facture avoir
|
fk_facture_source integer, -- facture origine si facture avoir
|
||||||
fk_projet integer DEFAULT NULL, -- projet auquel est associee la facture
|
fk_projet integer DEFAULT NULL, -- projet auquel est associee la facture
|
||||||
|
|||||||
@ -52,8 +52,9 @@ create table llx_facture_fourn
|
|||||||
|
|
||||||
fk_statut smallint DEFAULT 0 NOT NULL,
|
fk_statut smallint DEFAULT 0 NOT NULL,
|
||||||
|
|
||||||
fk_user_author integer, -- createur de la facture
|
fk_user_author integer, -- user making creation
|
||||||
fk_user_valid integer, -- valideur de la facture
|
fk_user_modif integer, -- user making last change
|
||||||
|
fk_user_valid integer, -- user validating
|
||||||
|
|
||||||
fk_facture_source integer, -- facture origine si facture avoir
|
fk_facture_source integer, -- facture origine si facture avoir
|
||||||
fk_projet integer, -- projet auquel est associee la facture
|
fk_projet integer, -- projet auquel est associee la facture
|
||||||
|
|||||||
@ -24,13 +24,15 @@ create table llx_fichinter
|
|||||||
fk_projet integer DEFAULT 0, -- projet auquel est rattache la fiche
|
fk_projet integer DEFAULT 0, -- projet auquel est rattache la fiche
|
||||||
fk_contrat integer DEFAULT 0, -- contrat auquel est rattache la fiche
|
fk_contrat integer DEFAULT 0, -- contrat auquel est rattache la fiche
|
||||||
ref varchar(30) NOT NULL, -- number
|
ref varchar(30) NOT NULL, -- number
|
||||||
|
ref_ext varchar(255),
|
||||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
tms timestamp,
|
tms timestamp,
|
||||||
datec datetime, -- date de creation
|
datec datetime, -- date de creation
|
||||||
date_valid datetime, -- date de validation
|
date_valid datetime, -- date de validation
|
||||||
datei date, -- date de livraison du bon d'intervention
|
datei date, -- date de livraison du bon d'intervention
|
||||||
fk_user_author integer, -- createur de la fiche
|
fk_user_author integer, -- user making creation
|
||||||
fk_user_valid integer, -- valideur de la fiche
|
fk_user_modif integer, -- user making last change
|
||||||
|
fk_user_valid integer, -- valideur de la fiche
|
||||||
fk_statut smallint DEFAULT 0,
|
fk_statut smallint DEFAULT 0,
|
||||||
duree real, -- duree totale de l'intervention
|
duree real, -- duree totale de l'intervention
|
||||||
description text,
|
description text,
|
||||||
|
|||||||
@ -48,8 +48,9 @@ create table llx_product
|
|||||||
recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT
|
recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT
|
||||||
localtax1_tx double(6,3) DEFAULT 0, -- Spanish local VAT 1
|
localtax1_tx double(6,3) DEFAULT 0, -- Spanish local VAT 1
|
||||||
localtax2_tx double(6,3) DEFAULT 0, -- Spanish local VAT 2
|
localtax2_tx double(6,3) DEFAULT 0, -- Spanish local VAT 2
|
||||||
fk_user_author integer DEFAULT NULL,
|
fk_user_author integer DEFAULT NULL, -- user making creation
|
||||||
tosell tinyint DEFAULT 1, -- Product you sell
|
fk_user_modif integer, -- user making last change
|
||||||
|
tosell tinyint DEFAULT 1, -- Product you sell
|
||||||
tobuy tinyint DEFAULT 1, -- Product you buy
|
tobuy tinyint DEFAULT 1, -- Product you buy
|
||||||
tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch or eat-by management
|
tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch or eat-by management
|
||||||
fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module)
|
fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module)
|
||||||
|
|||||||
@ -38,9 +38,10 @@ create table llx_propal
|
|||||||
fin_validite datetime, -- date de fin de validite
|
fin_validite datetime, -- date de fin de validite
|
||||||
date_valid datetime, -- date de validation
|
date_valid datetime, -- date de validation
|
||||||
date_cloture datetime, -- date de cloture
|
date_cloture datetime, -- date de cloture
|
||||||
fk_user_author integer, -- createur de la propale
|
fk_user_author integer, -- user making creation
|
||||||
fk_user_valid integer, -- valideur de la propale
|
fk_user_modif integer, -- user making last change
|
||||||
fk_user_cloture integer, -- cloture de la propale signee ou non signee
|
fk_user_valid integer, -- user validating
|
||||||
|
fk_user_cloture integer, -- user closing (signed or not)
|
||||||
fk_statut smallint DEFAULT 0 NOT NULL,
|
fk_statut smallint DEFAULT 0 NOT NULL,
|
||||||
price real DEFAULT 0, -- (obsolete)
|
price real DEFAULT 0, -- (obsolete)
|
||||||
remise_percent real DEFAULT 0, -- remise globale relative en pourcent (obsolete)
|
remise_percent real DEFAULT 0, -- remise globale relative en pourcent (obsolete)
|
||||||
|
|||||||
@ -66,26 +66,26 @@ Lineofinvoice=Line of invoice
|
|||||||
VentilatedinAccount=Ventilated successfully in the accounting account
|
VentilatedinAccount=Ventilated successfully in the accounting account
|
||||||
NotVentilatedinAccount=Not ventilated in the accounting account
|
NotVentilatedinAccount=Not ventilated in the accounting account
|
||||||
|
|
||||||
ACCOUNTINGEX_SEPARATORCSV=Separator CSV
|
ACCOUNTING_SEPARATORCSV=Separator CSV
|
||||||
|
|
||||||
ACCOUNTINGEX_LIMIT_LIST_VENTILATION=Number of elements to be ventilated shown by page (maximum recommended : 50)
|
ACCOUNTING_LIMIT_LIST_VENTILATION=Number of elements to be ventilated shown by page (maximum recommended : 50)
|
||||||
ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO=Begin the sorting of the pages of ventilation "Has to ventilate" by the most recent elements
|
ACCOUNTING_LIST_SORT_VENTILATION_TODO=Begin the sorting of the pages of ventilation "Has to ventilate" by the most recent elements
|
||||||
ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE=Begin the sorting of the pages of ventilation "Ventilated" by the most recent elements
|
ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin the sorting of the pages of ventilation "Ventilated" by the most recent elements
|
||||||
|
|
||||||
AccountLength=Length of the accounting accounts shown in Dolibarr
|
AccountLength=Length of the accounting accounts shown in Dolibarr
|
||||||
AccountLengthDesc=Function allowing to feign a length of accounting account by replacing spaces by the zero figure. This function touches only the display, it does not modify the accounting accounts registered in Dolibarr. For the export, this function is necessary to be compatible with certain software.
|
AccountLengthDesc=Function allowing to feign a length of accounting account by replacing spaces by the zero figure. This function touches only the display, it does not modify the accounting accounts registered in Dolibarr. For the export, this function is necessary to be compatible with certain software.
|
||||||
ACCOUNTINGEX_LENGTH_GACCOUNT=Length of the general accounts
|
ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounts
|
||||||
ACCOUNTINGEX_LENGTH_AACCOUNT=Length of the third party accounts
|
ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounts
|
||||||
|
|
||||||
ACCOUNTINGEX_SELL_JOURNAL=Sell journal
|
ACCOUNTING_SELL_JOURNAL=Sell journal
|
||||||
ACCOUNTINGEX_PURCHASE_JOURNAL=Purchase journal
|
ACCOUNTING_PURCHASE_JOURNAL=Purchase journal
|
||||||
ACCOUNTINGEX_BANK_JOURNAL=Bank journal
|
ACCOUNTING_BANK_JOURNAL=Bank journal
|
||||||
ACCOUNTINGEX_CASH_JOURNAL=Cash journal
|
ACCOUNTING_CASH_JOURNAL=Cash journal
|
||||||
ACCOUNTINGEX_MISCELLANEOUS_JOURNAL=Miscellaneous journal
|
ACCOUNTING_MISCELLANEOUS_JOURNAL=Miscellaneous journal
|
||||||
ACCOUNTINGEX_SOCIAL_JOURNAL=Social journal
|
ACCOUNTING_SOCIAL_JOURNAL=Social journal
|
||||||
|
|
||||||
ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH=Account of transfer
|
ACCOUNTING_ACCOUNT_TRANSFER_CASH=Account of transfer
|
||||||
ACCOUNTINGEX_ACCOUNT_SUSPENSE=Account of wait
|
ACCOUNTING_ACCOUNT_SUSPENSE=Account of wait
|
||||||
|
|
||||||
COMPTA_PRODUCT_BUY_ACCOUNT=Accounting account by default for bought products (if not defined in the product sheet)
|
COMPTA_PRODUCT_BUY_ACCOUNT=Accounting account by default for bought products (if not defined in the product sheet)
|
||||||
COMPTA_PRODUCT_SOLD_ACCOUNT=Accounting account by default for the sold products (if not defined in the product sheet)
|
COMPTA_PRODUCT_SOLD_ACCOUNT=Accounting account by default for the sold products (if not defined in the product sheet)
|
||||||
@ -122,6 +122,7 @@ CustomerInvoicePayment=Payment of invoice customer
|
|||||||
|
|
||||||
ThirdPartyAccount=Thirdparty account
|
ThirdPartyAccount=Thirdparty account
|
||||||
|
|
||||||
|
NewAccountingMvt=New movement
|
||||||
NumMvts=Number of movement
|
NumMvts=Number of movement
|
||||||
ListeMvts=List of the movement
|
ListeMvts=List of the movement
|
||||||
ErrorDebitCredit=Debit and Credit cannot have a value at the same time
|
ErrorDebitCredit=Debit and Credit cannot have a value at the same time
|
||||||
|
|||||||
@ -30,3 +30,4 @@ SearchADonation=Search a donation
|
|||||||
DonationRecipient=Donation recipient
|
DonationRecipient=Donation recipient
|
||||||
ThankYou=Thank You
|
ThankYou=Thank You
|
||||||
IConfirmDonationReception=The recipient declare reception, as a donation, of the following amount
|
IConfirmDonationReception=The recipient declare reception, as a donation, of the following amount
|
||||||
|
MinimumAmount=Minimum amount is %s
|
||||||
|
|||||||
@ -133,7 +133,6 @@ ErrorPHPNeedModule=Error, your PHP must have module <b>%s</b> installed to use t
|
|||||||
ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s
|
ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s
|
||||||
ErrorWarehouseMustDiffers=Source and target warehouses must differs
|
ErrorWarehouseMustDiffers=Source and target warehouses must differs
|
||||||
ErrorBadFormat=Bad format!
|
ErrorBadFormat=Bad format!
|
||||||
ErrorPaymentDateLowerThanInvoiceDate=Payment date (%s) cant' be before invoice date (%s) for invoice %s.
|
|
||||||
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any thirdparty. Link member to an existing third party or create a new thirdparty before creating subscription with invoice.
|
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any thirdparty. Link member to an existing third party or create a new thirdparty before creating subscription with invoice.
|
||||||
ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused.
|
ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused.
|
||||||
ErrorCantDeletePaymentReconciliated=Can't delete a payment that had generated a bank transaction that was conciliated
|
ErrorCantDeletePaymentReconciliated=Can't delete a payment that had generated a bank transaction that was conciliated
|
||||||
@ -155,4 +154,6 @@ WarningCloseAlways=Warning, closing is done even if amount differs between sourc
|
|||||||
WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box.
|
WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box.
|
||||||
WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card).
|
WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card).
|
||||||
WarningNotRelevant=Irrelevant operation for this dataset
|
WarningNotRelevant=Irrelevant operation for this dataset
|
||||||
WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers.
|
WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers.
|
||||||
|
WarningPaymentDateLowerThanInvoiceDate=Payment date (%s) is earlier than invoice date (%s) for invoice %s.
|
||||||
|
WarningTooManyDataPleaseUseMoreFilters=Too many data. Please use more filters
|
||||||
|
|||||||
@ -24,8 +24,8 @@ NameAndSignatureOfInternalContact=Name and signature of intervening :
|
|||||||
NameAndSignatureOfExternalContact=Name and signature of customer :
|
NameAndSignatureOfExternalContact=Name and signature of customer :
|
||||||
DocumentModelStandard=Standard document model for interventions
|
DocumentModelStandard=Standard document model for interventions
|
||||||
InterventionCardsAndInterventionLines=Interventions and lines of interventions
|
InterventionCardsAndInterventionLines=Interventions and lines of interventions
|
||||||
ClassifyBilled=Classify "Billed"
|
InterventionClassifyBilled=Classify "Billed"
|
||||||
ClassifyUnBilled=Classify "Unbilled"
|
InterventionClassifyUnBilled=Classify "Unbilled"
|
||||||
StatusInterInvoiced=Billed
|
StatusInterInvoiced=Billed
|
||||||
RelatedInterventions=Related interventions
|
RelatedInterventions=Related interventions
|
||||||
ShowIntervention=Show intervention
|
ShowIntervention=Show intervention
|
||||||
|
|||||||
@ -1,148 +1,150 @@
|
|||||||
# Dolibarr language file - es_ES - Experto de la contabilidad
|
# Dolibarr language file - en_US - Accounting Expert
|
||||||
CHARSET=UTF-8
|
CHARSET=UTF-8
|
||||||
|
|
||||||
Accounting=Contabilidad
|
Accounting=Contabilidad
|
||||||
Globalparameters=Configuración global
|
Globalparameters=Configuración global
|
||||||
Chartofaccounts=Cuentas
|
Chartofaccounts=Plan contable
|
||||||
Fiscalyear=Años fiscales
|
Fiscalyear=Años fiscales
|
||||||
Menuaccount=Contabilidad Cuentas
|
Menuaccount=Cuentas contables
|
||||||
Menuthirdpartyaccount=Cuentas de terceros
|
Menuthirdpartyaccount=Cuentas de terceros
|
||||||
MenuTools=Instrumentos
|
MenuTools=Utilidades
|
||||||
Configuration=Configuración
|
|
||||||
Export=Exportación
|
|
||||||
|
|
||||||
ConfigAccountingExpert=Configuración del módulo contable
|
ConfigAccountingExpert=Configuración del módulo contable
|
||||||
Journaux=Diarios
|
Journaux=Diarios
|
||||||
JournalFinancial=Diarios
|
JournalFinancial=Diarios financieros
|
||||||
Exports=Exportaciones
|
Exports=Exportaciones
|
||||||
Modelcsv=Plantilla de Exportación
|
Modelcsv=Modelo de exportación
|
||||||
Selectmodelcsv=Seleccione una plantilla de exportación
|
Selectmodelcsv=Seleccione un modelo de exportación
|
||||||
Modelcsv_normal=Exportación clásica
|
Modelcsv_normal=Exportación clásica
|
||||||
Modelcsv_CEGID=Exportar a Cegid Expert
|
Modelcsv_CEGID=Exportar a Cegid Expert
|
||||||
BackToChartofaccounts=Volver al plan contable
|
BackToChartofaccounts=Volver al plan contable
|
||||||
Back=Volver
|
Back=Volver
|
||||||
|
|
||||||
Definechartofaccounts=Definir la contabilidad
|
Definechartofaccounts=Definir plan contable
|
||||||
Selectchartofaccounts=Seleccione un plan contable
|
Selectchartofaccounts=Seleccione un plan contable
|
||||||
Validate=validar
|
Validate=Validar
|
||||||
Addanaccount=Añadir una cuenta contable
|
Addanaccount=Añadir una cuenta contable
|
||||||
ImportAccount=Importar cuentas
|
AccountAccounting=Cuenta contable
|
||||||
AccountAccounting=Cuenta
|
Ventilation=Contabilizar
|
||||||
Ventilation=Contabilización
|
|
||||||
ToDispatch=A realizar
|
ToDispatch=A realizar
|
||||||
Dispatched=Realizadas
|
Dispatched=Realizadas
|
||||||
|
|
||||||
CustomersVentilation=Contabilización ventas
|
CustomersVentilation=Contabilización ventas
|
||||||
SuppliersVentilation=Contabilización compras
|
SuppliersVentilation=Contabilización compras
|
||||||
TradeMargin=margen de beneficio
|
TradeMargin=Margen de beneficio
|
||||||
Reports=relaciones
|
Reports=Informes
|
||||||
ByCustomerInvoice=Por las facturas de los clientes
|
ByCustomerInvoice=Por facturas a clientes
|
||||||
ByMonth=por mes
|
ByMonth=Por mes
|
||||||
NewAccount=Nueva cuenta contable
|
NewAccount=Nueva cuenta contable
|
||||||
Update=Actualización
|
Update=Actualizar
|
||||||
List=lista
|
List=Listado
|
||||||
Create=crear
|
Create=Crear
|
||||||
UpdateAccount=Editar una cuenta
|
UpdateAccount=Modificar una cuenta contable
|
||||||
UpdateMvts=Modificación de un movimiento
|
UpdateMvts=Modificar un movimiento
|
||||||
WriteBookKeeping=Registrar los asientos en el libro mayor
|
WriteBookKeeping=Registrar los asientos en el libro mayor
|
||||||
Bookkeeping=libro mayor
|
Bookkeeping=Libro Mayor
|
||||||
AccountBalanceByMonth=Saldo Mensual
|
AccountBalanceByMonth=Saldo mensual
|
||||||
|
|
||||||
AccountingVentilation=desglose de Contabilidad
|
AccountingVentilation=Contabilización
|
||||||
AccountingVentilationSupplier=Proveedor de cuentas de ventilación
|
AccountingVentilationSupplier=Contabilización compras
|
||||||
AccountingVentilationCustomer=Cliente de cuentas de ventilación
|
AccountingVentilationCustomer=Contabilización ventas
|
||||||
Line=línea
|
Line=Línea
|
||||||
|
|
||||||
Ventilate=contabilizar
|
CAHTF=Total (base imponible) compras a proveedor
|
||||||
VentilationAuto=contabilización automática
|
InvoiceLines=Líneas de factura para contabilizar
|
||||||
|
InvoiceLinesDone=Líneas de facturas contabilizadas
|
||||||
|
IntoAccount=En la cuenta
|
||||||
|
|
||||||
|
Ventilate=Contabilizar
|
||||||
|
VentilationAuto=Contabilización automática
|
||||||
|
|
||||||
Processing=Tratamiento
|
Processing=Tratamiento
|
||||||
EndProcessing=Final del tratamiento
|
EndProcessing=Final del tratamiento
|
||||||
AnyLineVentilate=No hay línea para contabilizar
|
AnyLineVentilate=No hay líneas para contabilizar
|
||||||
SelectedLines=Las líneas seleccionadas
|
SelectedLines=Líneas seleccionadas
|
||||||
Lineofinvoice=Línea de la factura
|
Lineofinvoice=Línea de la factura
|
||||||
VentilatedinAccount=Contabilizada con éxito en la cuenta contable
|
VentilatedinAccount=Contabilizada con éxito en la cuenta contable
|
||||||
NotVentilatedinAccount=Cuenta sin contabilización en la contabilidad
|
NotVentilatedinAccount=Cuenta sin contabilización en la contabilidad
|
||||||
|
|
||||||
ACCOUNTING_SEPARATORCSV=separador CSV
|
ACCOUNTINGEX_SEPARATORCSV=separador CSV
|
||||||
|
|
||||||
ACCOUNTING_LIMIT_LIST_VENTILATION=(El máximo recomendado: 50) Número de elementos que se muestran por página para contabilizar
|
ACCOUNTINGEX_LIMIT_LIST_VENTILATION=Número de elementos a contabilizar que se muestran por página (máximo recomendado: 50)
|
||||||
ACCOUNTING_LIST_SORT_VENTILATION_TODO=Páginas de inicio de clasificación de ventilación "desglose" de las pruebas más recientes
|
ACCOUNTINGEX_LIST_SORT_VENTILATION_TODO=Ordenar las páginas de contabilización "A contabilizar" por los elementos más recientes
|
||||||
ACCOUNTING_LIST_SORT_VENTILATION_DONE=Páginas de inicio de clasificación de ventilación "ventilada" por la evidencia más reciente
|
ACCOUNTINGEX_LIST_SORT_VENTILATION_DONE=Ordenar las páginas de contabilización "Contabilizadas" por los elementos más recientes
|
||||||
|
|
||||||
AccountLength=Cuentas contables longitud mostrada en Dolibarr
|
AccountLength=Longitud de las cuentas contables mostradas en Dolibarr
|
||||||
AccountLengthDesc=Función para simular una longitud de cuenta contable sustituyendo espacios con el número cero. Esta función sólo afecta a la pantalla, no cambia las cuentas contables registrados en Dolibarr. Para la exportación, esta función se requiere para ser compatible con algunos programas.
|
AccountLengthDesc=Función para simular una longitud de cuenta contable sustituyendo los espacios por cero. Esta función sólo afecta a la pantalla, no cambia las cuentas contables registradas en Dolibarr. Esta función es necesaria para la exportación, para ser compatible con algunos programas.
|
||||||
ACCOUNTING_LENGTH_GACCOUNT=Longitud de las cuentas generales
|
ACCOUNTINGEX_LENGTH_GACCOUNT=Longitud de las cuentas generales
|
||||||
ACCOUNTING_LENGTH_AACCOUNT=Duración de subcuentas
|
ACCOUNTINGEX_LENGTH_AACCOUNT=Longitud de las subcuentas
|
||||||
|
|
||||||
ACCOUNTING_SELL_JOURNAL=Diario de Ventas
|
ACCOUNTINGEX_SELL_JOURNAL=Diario de ventas
|
||||||
ACCOUNTING_PURCHASE_JOURNAL=Diario de Compras
|
ACCOUNTINGEX_PURCHASE_JOURNAL=Diario de compras
|
||||||
ACCOUNTING_BANK_JOURNAL=Diario del Banco
|
ACCOUNTINGEX_BANK_JOURNAL=Diario bancario
|
||||||
ACCOUNTING_CASH_JOURNAL=Diario de Caso
|
ACCOUNTINGEX_CASH_JOURNAL=Diario de caja
|
||||||
ACCOUNTING_MISCELLANEOUS_JOURNAL=Diario de Operaciones diversas
|
ACCOUNTINGEX_MISCELLANEOUS_JOURNAL=Diario de operaciones diversas
|
||||||
ACCOUNTING_SOCIAL_JOURNAL=Diario Social
|
ACCOUNTINGEX_SOCIAL_JOURNAL=Diario social
|
||||||
|
|
||||||
ACCOUNTING_ACCOUNT_TRANSFER_CASH=Cuenta de caja
|
ACCOUNTINGEX_ACCOUNT_TRANSFER_CASH=Cuenta de caja
|
||||||
ACCOUNTING_ACCOUNT_SUSPENSE=Cuenta partidas pendientes de aplicación
|
ACCOUNTINGEX_ACCOUNT_SUSPENSE=Cuenta operaciones pendientes de asignar
|
||||||
|
|
||||||
COMPTA_PRODUCT_BUY_ACCOUNT=Cuenta predeterminada de contabilidad para los productos comprados (si no se define en el producto)
|
COMPTA_PRODUCT_BUY_ACCOUNT=Cuenta contable predeterminada para los productos comprados (si no se define en el producto)
|
||||||
COMPTA_PRODUCT_SOLD_ACCOUNT=Cuenta predeterminada de contabilidad para los productos vendidos (si no se define en el producto)
|
COMPTA_PRODUCT_SOLD_ACCOUNT=Cuenta contable predeterminada para los productos vendidos (si no se define en el producto)
|
||||||
COMPTA_SERVICE_BUY_ACCOUNT=Cuenta predeterminada de contabilidad para los servicios adquiridos (si no está definido en la hoja de servicio)
|
COMPTA_SERVICE_BUY_ACCOUNT=Cuenta contable predeterminada para los servicios comprados (si no se define en el servicio)
|
||||||
COMPTA_SERVICE_SOLD_ACCOUNT=Cuenta predeterminada de contabilidad para servicios vendidos (si no se define en la ficha de servicio)
|
COMPTA_SERVICE_SOLD_ACCOUNT=Cuenta contable predeterminada para los servicios vendidos (si no se define en el servico)
|
||||||
|
|
||||||
Doctype=Tipo de documento
|
Doctype=Tipo de documento
|
||||||
Docdate=fecha
|
Docdate=Fecha
|
||||||
Docref=referencia
|
Docref=Referencia
|
||||||
Numerocompte=cuenta
|
Numerocompte=Cuenta
|
||||||
Code_tiers=tercero
|
Code_tiers=Tercero
|
||||||
Labelcompte=Descripción
|
Labelcompte=Descripción
|
||||||
Debit=débito
|
Debit=Debe
|
||||||
Credit=crédito
|
Credit=Crédito
|
||||||
Amount=cantidad
|
Amount=Cantidad
|
||||||
Sens=sentido
|
Sens=Sentido
|
||||||
Codejournal=diario
|
Codejournal=Diario
|
||||||
|
|
||||||
DelBookKeeping=Eliminar el libro mayor
|
DelBookKeeping=Eliminar los registros del Diario Mayor
|
||||||
|
|
||||||
SellsJournal=Diario de ventas
|
SellsJournal=Diario de ventas
|
||||||
PurchasesJournal=Diario de compras
|
PurchasesJournal=Diario de compras
|
||||||
DescSellsJournal=Diario de ventas
|
DescSellsJournal=Diario de ventas
|
||||||
DescPurchasesJournal=Diario de compras
|
DescPurchasesJournal=Diario de compras
|
||||||
BankJournal=Diario de banco
|
BankJournal=Diario bancario
|
||||||
DescBankJournal=Descripción del diario del Banco
|
DescBankJournal=El diario bancario incluye todos los tipos pagos que no sean de efectivo
|
||||||
CashJournal=Libro de Caja
|
CashJournal=Diario de caja
|
||||||
DescCashJournal=Descripción Libro de Caja
|
DescCashJournal=El diario de caja incluye el tipo de pago efectivo
|
||||||
|
|
||||||
CashPayment=Reglas caja
|
CashPayment=Pago en efectivo
|
||||||
|
|
||||||
SupplierInvoicePayment=Pago factura de proveedor
|
SupplierInvoicePayment=Pago de factura de proveedor
|
||||||
CustomerInvoicePayment=Pago Factura a cliente
|
CustomerInvoicePayment=Cobro de factura a cliente
|
||||||
|
|
||||||
ThirdPartyAccount=Cuenta tercero
|
ThirdPartyAccount=Cuenta de tercero
|
||||||
|
|
||||||
NumMvts=Número de movimiento
|
NewAccountingMvt=Nuevo movimiento
|
||||||
ListeMvts=Apuntes del movimiento
|
NumMvts=Número del movimiento
|
||||||
ErrorDebitCredit=Débito y Crédito no pueden terner valor al mismo tiempo
|
ListeMvts=Listado del movimiento
|
||||||
|
ErrorDebitCredit=Debe y Haber no pueden contener un valor al mismo tiempo
|
||||||
|
|
||||||
ReportThirdParty=Lista cuentas de terceros
|
ReportThirdParty=Listado cuentas de terceros
|
||||||
DescThirdPartyReport=Consult here the list of the thirdparty customers and the suppliers and their accounting accounts
|
DescThirdPartyReport=Consulte aquí el listado de clientes y proveedores y sus códigos contables
|
||||||
|
|
||||||
ListAccounts=Lista de cuentas
|
ListAccounts=Listado de cuentas contables
|
||||||
|
|
||||||
Pcgversion=Versión del plan
|
Pcgversion=Versión del plan
|
||||||
Pcgtype=Tipo de cuenta
|
Pcgtype=Tipo del plan
|
||||||
Pcgsubtype=tipo de subcuenta
|
Pcgsubtype=Subcuenta
|
||||||
Accountparent=Cuenta padre
|
Accountparent=Padre de la cuenta
|
||||||
Active=Activa
|
Active=Estado
|
||||||
|
|
||||||
NewFiscalYear=Nuevo año fiscal
|
NewFiscalYear=Nuevo año fiscal
|
||||||
NewMovCompta=Nuevo registro contable
|
|
||||||
|
|
||||||
DescVentilCustomer=Consulte aquí la contabilidad anual de sus facturas a clientes
|
DescVentilCustomer=Consulte aquí la contabilización anual de sus facturas a clientes
|
||||||
TotalVente=Total ventas (base imponible)
|
TotalVente=Total ventas (base imponible)
|
||||||
TotalMarge=Total margen ventas
|
TotalMarge=Total margen ventas
|
||||||
DescVentilDoneCustomer=Consulte aquí las líneas de facturas a clientes y sus cuentas contables
|
DescVentilDoneCustomer=Consulte aquí las líneas de facturas a clientes y sus cuentas contables
|
||||||
DescVentilTodoCustomer=Contabilize sus líneas de facturas a clientes
|
DescVentilTodoCustomer=Contabilice sus líneas de facturas a clientes con una cuenta contable
|
||||||
ChangeAccount=Cambie la cuenta para las líneas seleccionadas a la cuenta:
|
ChangeAccount=Cambie la cuenta para las líneas seleccionadas a la cuenta:
|
||||||
Vide=-
|
Vide=-
|
||||||
DescVentilSupplier=Consulte aquí la contabilidad anual de sus facturas de proveedores
|
DescVentilSupplier=Consulte aquí la contabilidad anual de sus facturas de proveedores
|
||||||
@ -154,14 +156,3 @@ ValidateHistory=Validar automáticamente
|
|||||||
ErrorAccountancyCodeIsAlreadyUse=Error, no puede eliminar esta cuenta ya que está siendo usada
|
ErrorAccountancyCodeIsAlreadyUse=Error, no puede eliminar esta cuenta ya que está siendo usada
|
||||||
|
|
||||||
FicheVentilation=Ficha contable
|
FicheVentilation=Ficha contable
|
||||||
|
|
||||||
Accountancy_code_buy=Código compras
|
|
||||||
Accountancy_code_buy_suggest=Código compras sugerido
|
|
||||||
Accountancy_code_sell=Código ventas
|
|
||||||
Accountancy_code_sell_suggest=Código ventas sugerido
|
|
||||||
CreateMvts=Crear movimiento
|
|
||||||
customer_invoice=Factura a cliente
|
|
||||||
|
|
||||||
accountingaccount=Cuenta contable
|
|
||||||
label=Descripción
|
|
||||||
Import=Importar
|
|
||||||
@ -45,6 +45,8 @@ ErrorModuleRequireDolibarrVersion=Error, este módulo requiere una versión %s o
|
|||||||
ErrorDecimalLargerThanAreForbidden=Error, las precisiones superiores a <b>%s</b> no están soportadas.
|
ErrorDecimalLargerThanAreForbidden=Error, las precisiones superiores a <b>%s</b> no están soportadas.
|
||||||
DictionarySetup=Diccionarios
|
DictionarySetup=Diccionarios
|
||||||
Dictionary=Diccionarios
|
Dictionary=Diccionarios
|
||||||
|
Chartofaccounts=Plan contable
|
||||||
|
Fiscalyear=Años fiscales
|
||||||
ErrorReservedTypeSystemSystemAuto=El uso del tipo 'system' y 'systemauto' está reservado. Puede utilizar 'user' como valor para añadir su propio registro
|
ErrorReservedTypeSystemSystemAuto=El uso del tipo 'system' y 'systemauto' está reservado. Puede utilizar 'user' como valor para añadir su propio registro
|
||||||
ErrorCodeCantContainZero=El código no puede contener el valor 0
|
ErrorCodeCantContainZero=El código no puede contener el valor 0
|
||||||
DisableJavascript=Deshabilitar Javascript y funciones Ajax (Recomendado para personas ciegas o navegadores de texto)
|
DisableJavascript=Deshabilitar Javascript y funciones Ajax (Recomendado para personas ciegas o navegadores de texto)
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
IdAgenda=ID de evento
|
IdAgenda=ID de evento
|
||||||
Actions=Eventos
|
Actions=Eventos
|
||||||
ActionsArea=Área de eventos (acciones y tareas)
|
ActionsArea=Área de eventos (acciones y tareas)
|
||||||
Agenda= Agenda
|
Agenda=Agenda
|
||||||
Agendas= Agendas
|
Agendas=Agendas
|
||||||
Calendar= Calendario
|
Calendar=Calendario
|
||||||
Calendars= Calendarios
|
Calendars=Calendarios
|
||||||
LocalAgenda=Calendario local
|
LocalAgenda=Calendario interno
|
||||||
AffectedTo=Asignada a
|
AffectedTo=Asignada a
|
||||||
DoneBy=Realizado por
|
DoneBy=Realizado por
|
||||||
Event=Evento
|
Event=Evento
|
||||||
@ -22,7 +22,7 @@ MenuToDoActions=Eventos incompletos
|
|||||||
MenuDoneActions=Eventos terminados
|
MenuDoneActions=Eventos terminados
|
||||||
MenuToDoMyActions=Mis eventos incompletos
|
MenuToDoMyActions=Mis eventos incompletos
|
||||||
MenuDoneMyActions=Mis eventos terminados
|
MenuDoneMyActions=Mis eventos terminados
|
||||||
ListOfEvents=Listado de eventos Dolibarr
|
ListOfEvents=Listado de eventos (calendario interno)
|
||||||
ActionsAskedBy=Eventos registrados por
|
ActionsAskedBy=Eventos registrados por
|
||||||
ActionsToDoBy=Eventos asignados a
|
ActionsToDoBy=Eventos asignados a
|
||||||
ActionsDoneBy=Eventos realizados por
|
ActionsDoneBy=Eventos realizados por
|
||||||
@ -88,3 +88,4 @@ ExtSiteUrlAgenda=Url de acceso al archivo .ical
|
|||||||
ExtSiteNoLabel=Sin descripción
|
ExtSiteNoLabel=Sin descripción
|
||||||
WorkingTimeRange=Rango temporal
|
WorkingTimeRange=Rango temporal
|
||||||
WorkingDaysRange=Rango diario
|
WorkingDaysRange=Rango diario
|
||||||
|
AddEvent=Crear evento
|
||||||
|
|||||||
@ -253,7 +253,6 @@ CivilityMR=Señor
|
|||||||
CivilityMLE=Señorita
|
CivilityMLE=Señorita
|
||||||
CivilityMTRE=Don
|
CivilityMTRE=Don
|
||||||
CivilityDR=Doctor
|
CivilityDR=Doctor
|
||||||
|
|
||||||
##### Currencies #####
|
##### Currencies #####
|
||||||
Currencyeuros=Euros
|
Currencyeuros=Euros
|
||||||
CurrencyAUD=Dólares Aus.
|
CurrencyAUD=Dólares Aus.
|
||||||
@ -290,10 +289,10 @@ CurrencyXOF=Francos CFA BCEAO
|
|||||||
CurrencySingXOF=Franco CFA BCEAO
|
CurrencySingXOF=Franco CFA BCEAO
|
||||||
CurrencyXPF=Francos CFP
|
CurrencyXPF=Francos CFP
|
||||||
CurrencySingXPF=Franco CFP
|
CurrencySingXPF=Franco CFP
|
||||||
|
|
||||||
CurrencyCentSingEUR=céntimo
|
CurrencyCentSingEUR=céntimo
|
||||||
|
CurrencyCentINR=paisa
|
||||||
|
CurrencyCentSingINR=paise
|
||||||
CurrencyThousandthSingTND=milésimo
|
CurrencyThousandthSingTND=milésimo
|
||||||
|
|
||||||
#### Input reasons #####
|
#### Input reasons #####
|
||||||
DemandReasonTypeSRC_INTE=Internet
|
DemandReasonTypeSRC_INTE=Internet
|
||||||
DemandReasonTypeSRC_CAMP_MAIL=Campaña correo
|
DemandReasonTypeSRC_CAMP_MAIL=Campaña correo
|
||||||
@ -306,7 +305,6 @@ DemandReasonTypeSRC_WOM=Boca a boca
|
|||||||
DemandReasonTypeSRC_PARTNER=Socio
|
DemandReasonTypeSRC_PARTNER=Socio
|
||||||
DemandReasonTypeSRC_EMPLOYEE=Empleado
|
DemandReasonTypeSRC_EMPLOYEE=Empleado
|
||||||
DemandReasonTypeSRC_SPONSORING=Patrocinador
|
DemandReasonTypeSRC_SPONSORING=Patrocinador
|
||||||
|
|
||||||
#### Paper formats ####
|
#### Paper formats ####
|
||||||
PaperFormatEU4A0=Formato 4A0
|
PaperFormatEU4A0=Formato 4A0
|
||||||
PaperFormatEU2A0=Formato 2A0
|
PaperFormatEU2A0=Formato 2A0
|
||||||
|
|||||||
@ -133,7 +133,6 @@ ErrorPHPNeedModule=Error, su PHP debe tener instalado el módulo <b>%s</b> para
|
|||||||
ErrorOpenIDSetupNotComplete=Ha configurado Dolibarr para aceptar la autentificación OpenID, pero la URL del servicio OpenID no se encuentra definida en la constante %s
|
ErrorOpenIDSetupNotComplete=Ha configurado Dolibarr para aceptar la autentificación OpenID, pero la URL del servicio OpenID no se encuentra definida en la constante %s
|
||||||
ErrorWarehouseMustDiffers=El almacén de origen y destino deben de ser diferentes
|
ErrorWarehouseMustDiffers=El almacén de origen y destino deben de ser diferentes
|
||||||
ErrorBadFormat=¡El formato es erróneo!
|
ErrorBadFormat=¡El formato es erróneo!
|
||||||
ErrorPaymentDateLowerThanInvoiceDate=La fecha de pago (%s) no puede ser anterior a la fecha (%s) de la factura %s.
|
|
||||||
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, este miembro aún no está enlazado a un tercero. Enlace el miembro a un tercero existente o cree un tercero nuevo antes de crear la suscripción con la factura.
|
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, este miembro aún no está enlazado a un tercero. Enlace el miembro a un tercero existente o cree un tercero nuevo antes de crear la suscripción con la factura.
|
||||||
ErrorThereIsSomeDeliveries=Error, hay entregas vinculadas a este envío. No se puede eliminar.
|
ErrorThereIsSomeDeliveries=Error, hay entregas vinculadas a este envío. No se puede eliminar.
|
||||||
ErrorCantDeletePaymentReconciliated=No se puede eliminar un pago que ha generado una transacción bancaria que se encuentra conciliada
|
ErrorCantDeletePaymentReconciliated=No se puede eliminar un pago que ha generado una transacción bancaria que se encuentra conciliada
|
||||||
@ -156,3 +155,4 @@ WarningUsingThisBoxSlowDown=Atención, el uso de este panel provoca serias ralen
|
|||||||
WarningClickToDialUserSetupNotComplete=La configuración de ClickToDial para su cuenta de usuario no está completa (vea la pestaña ClickToDial en su ficha de usuario)
|
WarningClickToDialUserSetupNotComplete=La configuración de ClickToDial para su cuenta de usuario no está completa (vea la pestaña ClickToDial en su ficha de usuario)
|
||||||
WarningNotRelevant=Operación irrelevante para este conjunto de datos
|
WarningNotRelevant=Operación irrelevante para este conjunto de datos
|
||||||
WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Funcionalidad desactivada cuando la configuración de visualización es optimizada para personas ciegas o navegadores de texto.
|
WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Funcionalidad desactivada cuando la configuración de visualización es optimizada para personas ciegas o navegadores de texto.
|
||||||
|
WarningPaymentDateLowerThanInvoiceDate=La fecha de pago (%s) es anterior a la fecha (%s) de la factura %s.
|
||||||
|
|||||||
@ -645,6 +645,7 @@ OptionalFieldsSetup=Configuración de los atributos opcionales
|
|||||||
URLPhoto=Url de la foto/logo
|
URLPhoto=Url de la foto/logo
|
||||||
SetLinkToThirdParty=Vincular a otro tercero
|
SetLinkToThirdParty=Vincular a otro tercero
|
||||||
CreateDraft=Crear borrador
|
CreateDraft=Crear borrador
|
||||||
|
SetToDraft=Volver a borrador
|
||||||
ClickToEdit=Clic para editar
|
ClickToEdit=Clic para editar
|
||||||
ObjectDeleted=Objeto %s eliminado
|
ObjectDeleted=Objeto %s eliminado
|
||||||
ByCountry=Par país
|
ByCountry=Par país
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
# Dolibarr language file - Source file is en_US - users
|
# Dolibarr language file - Source file is en_US - users
|
||||||
|
SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Código contable pago de salarios
|
||||||
|
SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Código contable cargas financieras
|
||||||
Salary=Salario
|
Salary=Salario
|
||||||
Salaries=Salarios
|
Salaries=Salarios
|
||||||
Employee=Empleado
|
Employee=Empleado
|
||||||
@ -6,3 +8,5 @@ NewSalaryPayment=Nuevo pago
|
|||||||
SalaryPayment=Pago de salario
|
SalaryPayment=Pago de salario
|
||||||
SalariesPayments=Pagos de salarios
|
SalariesPayments=Pagos de salarios
|
||||||
ShowSalaryPayment=Ver pago
|
ShowSalaryPayment=Ver pago
|
||||||
|
THM=Precio medio por hora
|
||||||
|
TJM=Precio medio por día
|
||||||
|
|||||||
@ -119,3 +119,4 @@ HierarchicView=Vista jerárquica
|
|||||||
UseTypeFieldToChange=Modificar el campo Tipo para cambiar
|
UseTypeFieldToChange=Modificar el campo Tipo para cambiar
|
||||||
OpenIDURL=Dirección OpenID
|
OpenIDURL=Dirección OpenID
|
||||||
LoginUsingOpenID=Usar OpenID para iniciar sesión
|
LoginUsingOpenID=Usar OpenID para iniciar sesión
|
||||||
|
WeeklyHours=Horas semanales
|
||||||
|
|||||||
@ -122,6 +122,7 @@ CustomerInvoicePayment=Règlement de facture client
|
|||||||
|
|
||||||
ThirdPartyAccount=Compte tiers
|
ThirdPartyAccount=Compte tiers
|
||||||
|
|
||||||
|
NewAccountingMvt=Nouveau mouvement
|
||||||
NumMvts=Numéro de mouvement
|
NumMvts=Numéro de mouvement
|
||||||
ListeMvts=Liste du mouvement
|
ListeMvts=Liste du mouvement
|
||||||
ErrorDebitCredit=Debit et Credit ne peuvent avoir une valeur en même temps
|
ErrorDebitCredit=Debit et Credit ne peuvent avoir une valeur en même temps
|
||||||
|
|||||||
@ -45,6 +45,8 @@ ErrorModuleRequireDolibarrVersion=Erreur, ce module requiert une version %s ou s
|
|||||||
ErrorDecimalLargerThanAreForbidden=Erreur, les précisions supérieures à <b>%s</b> ne sont pas prises en charge.
|
ErrorDecimalLargerThanAreForbidden=Erreur, les précisions supérieures à <b>%s</b> ne sont pas prises en charge.
|
||||||
DictionarySetup=Dictionnaires
|
DictionarySetup=Dictionnaires
|
||||||
Dictionary=Dictionnaires
|
Dictionary=Dictionnaires
|
||||||
|
Chartofaccounts=Chart of accounts
|
||||||
|
Fiscalyear=Fiscal years
|
||||||
ErrorReservedTypeSystemSystemAuto=Erreur, les valeurs 'system' et 'systemauto' sont réservées. Vous pouvez utiliser la valeur 'user' pour ajouter vos propres enregistrements
|
ErrorReservedTypeSystemSystemAuto=Erreur, les valeurs 'system' et 'systemauto' sont réservées. Vous pouvez utiliser la valeur 'user' pour ajouter vos propres enregistrements
|
||||||
ErrorCodeCantContainZero=Erreur, le code ne peut contenir la valeur 0
|
ErrorCodeCantContainZero=Erreur, le code ne peut contenir la valeur 0
|
||||||
DisableJavascript=Désactive les fonctions Javascript et Ajax (Recommandé pour les personnes aveugles ou navigateurs text).
|
DisableJavascript=Désactive les fonctions Javascript et Ajax (Recommandé pour les personnes aveugles ou navigateurs text).
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
IdAgenda=ID évènement
|
IdAgenda=ID évènement
|
||||||
Actions=Événements
|
Actions=Événements
|
||||||
ActionsArea=Espace événements (actions et tâches)
|
ActionsArea=Espace événements (actions et tâches)
|
||||||
Agenda= Agenda
|
Agenda=Agenda
|
||||||
Agendas= Agendas
|
Agendas=Agendas
|
||||||
Calendar= Calendrier
|
Calendar=Calendrier
|
||||||
Calendars= Calendriers
|
Calendars=Calendriers
|
||||||
LocalAgenda=Calendrier local
|
LocalAgenda=Calendrier interne
|
||||||
AffectedTo=Affecté à
|
AffectedTo=Affecté à
|
||||||
DoneBy=Réalisé par
|
DoneBy=Réalisé par
|
||||||
Event=Evénement
|
Event=Evénement
|
||||||
@ -88,3 +88,4 @@ ExtSiteUrlAgenda=URL d'accès au fichier ical
|
|||||||
ExtSiteNoLabel=Aucune description
|
ExtSiteNoLabel=Aucune description
|
||||||
WorkingTimeRange=Plage d'heures travaillées
|
WorkingTimeRange=Plage d'heures travaillées
|
||||||
WorkingDaysRange=Plage de jours travaillés
|
WorkingDaysRange=Plage de jours travaillés
|
||||||
|
AddEvent=Créer événement
|
||||||
|
|||||||
@ -253,7 +253,6 @@ CivilityMR=Monsieur
|
|||||||
CivilityMLE=Mademoiselle
|
CivilityMLE=Mademoiselle
|
||||||
CivilityMTRE=Maître
|
CivilityMTRE=Maître
|
||||||
CivilityDR=Docteur
|
CivilityDR=Docteur
|
||||||
|
|
||||||
##### Currencies #####
|
##### Currencies #####
|
||||||
Currencyeuros=Euros
|
Currencyeuros=Euros
|
||||||
CurrencyAUD=Dollars Aus.
|
CurrencyAUD=Dollars Aus.
|
||||||
@ -290,10 +289,10 @@ CurrencyXOF=Francs CFA BCEAO
|
|||||||
CurrencySingXOF=Franc CFA BCEAO
|
CurrencySingXOF=Franc CFA BCEAO
|
||||||
CurrencyXPF=Francs CFP
|
CurrencyXPF=Francs CFP
|
||||||
CurrencySingXPF=Franc CFP
|
CurrencySingXPF=Franc CFP
|
||||||
|
|
||||||
CurrencyCentSingEUR=centime
|
CurrencyCentSingEUR=centime
|
||||||
|
CurrencyCentINR=paisa
|
||||||
|
CurrencyCentSingINR=paise
|
||||||
CurrencyThousandthSingTND=millime
|
CurrencyThousandthSingTND=millime
|
||||||
|
|
||||||
#### Input reasons #####
|
#### Input reasons #####
|
||||||
DemandReasonTypeSRC_INTE=Internet
|
DemandReasonTypeSRC_INTE=Internet
|
||||||
DemandReasonTypeSRC_CAMP_MAIL=Campagne Publipostage
|
DemandReasonTypeSRC_CAMP_MAIL=Campagne Publipostage
|
||||||
@ -306,7 +305,6 @@ DemandReasonTypeSRC_WOM=Bouche à oreille
|
|||||||
DemandReasonTypeSRC_PARTNER=Partenaire
|
DemandReasonTypeSRC_PARTNER=Partenaire
|
||||||
DemandReasonTypeSRC_EMPLOYEE=Employé
|
DemandReasonTypeSRC_EMPLOYEE=Employé
|
||||||
DemandReasonTypeSRC_SPONSORING=Parrainage/Sponsoring
|
DemandReasonTypeSRC_SPONSORING=Parrainage/Sponsoring
|
||||||
|
|
||||||
#### Paper formats ####
|
#### Paper formats ####
|
||||||
PaperFormatEU4A0=Format 4A0
|
PaperFormatEU4A0=Format 4A0
|
||||||
PaperFormatEU2A0=Format 2A0
|
PaperFormatEU2A0=Format 2A0
|
||||||
|
|||||||
@ -37,4 +37,5 @@ IConfirmDonationReception=Le bénéficiaire reconnait avoir reçu au titre des d
|
|||||||
FrenchOptions=Options éligibles en France
|
FrenchOptions=Options éligibles en France
|
||||||
DONATION_ART200=Les dons ou versements reçus sont éligibles à l'article 200 du CGI
|
DONATION_ART200=Les dons ou versements reçus sont éligibles à l'article 200 du CGI
|
||||||
DONATION_ART238=Les dons ou versements reçus sont éligibles à l'article 238bis du CGI
|
DONATION_ART238=Les dons ou versements reçus sont éligibles à l'article 238bis du CGI
|
||||||
DONATION_ART885=Les dons ou versements reçus sont éligibles à l'article 885-0 V bis A du CGI
|
DONATION_ART885=Les dons ou versements reçus sont éligibles à l'article 885-0 V bis A du CGI
|
||||||
|
MinimumAmount=Le montant minimum du don est de %s
|
||||||
@ -133,7 +133,6 @@ ErrorPHPNeedModule=Erreur, votre PHP doit avoir le module <b>%s</b> installé po
|
|||||||
ErrorOpenIDSetupNotComplete=Vous avez configuré Dolibarr pour accepter l'authentication OpenID, mais l'URL du service OpenID n'est pas défini dans la constante %s
|
ErrorOpenIDSetupNotComplete=Vous avez configuré Dolibarr pour accepter l'authentication OpenID, mais l'URL du service OpenID n'est pas défini dans la constante %s
|
||||||
ErrorWarehouseMustDiffers=Les entrepôts source et destination doivent être différents
|
ErrorWarehouseMustDiffers=Les entrepôts source et destination doivent être différents
|
||||||
ErrorBadFormat=Mauvais format
|
ErrorBadFormat=Mauvais format
|
||||||
ErrorPaymentDateLowerThanInvoiceDate=La date de paiement (%s) ne peut être inférieure à la date de facturaction (%s) de la facture %s.
|
|
||||||
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Erreur, cet adhérent n'est lié à aucun tiers. Lier l'adhérent à un tiers existant ou créer un nouveau tiers pour le lier avant de créer l'adhésion avec facture.
|
ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Erreur, cet adhérent n'est lié à aucun tiers. Lier l'adhérent à un tiers existant ou créer un nouveau tiers pour le lier avant de créer l'adhésion avec facture.
|
||||||
ErrorThereIsSomeDeliveries=Erreur, il y a des bordereaux de réception liées à ces expéditions. La suppression est refusée.
|
ErrorThereIsSomeDeliveries=Erreur, il y a des bordereaux de réception liées à ces expéditions. La suppression est refusée.
|
||||||
|
|
||||||
@ -154,3 +153,4 @@ WarningUsingThisBoxSlowDown=Attention, l'utilisation de cette boite provoque de
|
|||||||
WarningClickToDialUserSetupNotComplete=La configuration ClickToDial pour votre compte utilisateur n'est pas complète (voir l'onglet ClickToDial sur votre fiche utilisateur)
|
WarningClickToDialUserSetupNotComplete=La configuration ClickToDial pour votre compte utilisateur n'est pas complète (voir l'onglet ClickToDial sur votre fiche utilisateur)
|
||||||
WarningNotRelevant=Opération non pertinente pour cet ensemble de données
|
WarningNotRelevant=Opération non pertinente pour cet ensemble de données
|
||||||
WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Fonction désactivé quand l'affichage est en mode optimisé pour les personnes aveugles ou les navigateurs textes.
|
WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Fonction désactivé quand l'affichage est en mode optimisé pour les personnes aveugles ou les navigateurs textes.
|
||||||
|
WarningPaymentDateLowerThanInvoiceDate=La date de paiement (%s) est inférieure à la date de facturaction (%s) de la facture %s.
|
||||||
|
|||||||
@ -645,7 +645,7 @@ OptionalFieldsSetup=Configuration des attributs complémentaires
|
|||||||
URLPhoto=URL de la photo/logo
|
URLPhoto=URL de la photo/logo
|
||||||
SetLinkToThirdParty=Lier vers un autre tiers
|
SetLinkToThirdParty=Lier vers un autre tiers
|
||||||
CreateDraft=Créer brouillon
|
CreateDraft=Créer brouillon
|
||||||
SetToDraft=Repasser en brouillon
|
SetToDraft=Back to draft
|
||||||
ClickToEdit=Cliquer ici pour éditer
|
ClickToEdit=Cliquer ici pour éditer
|
||||||
ObjectDeleted=Objet %s supprimé
|
ObjectDeleted=Objet %s supprimé
|
||||||
ByCountry=Par pays
|
ByCountry=Par pays
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user