mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-09 09:22:36 +01:00
Compare commits
114 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c639e82062 | ||
|
|
e6ab6bdb8e | ||
|
|
7a0206adce | ||
|
|
0ce7cad48c | ||
|
|
7673a73a65 | ||
|
|
8377d6967a | ||
|
|
0cab08b2f3 | ||
|
|
f0a3bca4c2 | ||
|
|
4a52d3c1b1 | ||
|
|
84a152dc2e | ||
|
|
01854b3259 | ||
|
|
3bbedf1795 | ||
|
|
87a102f5c8 | ||
|
|
600dbced7e | ||
|
|
8d829dca32 | ||
|
|
fe78996026 | ||
|
|
375e61de2e | ||
|
|
5777c16b72 | ||
|
|
fdf9617e42 | ||
|
|
d499fafdb9 | ||
|
|
60debe31c4 | ||
|
|
cbff03ca08 | ||
|
|
316b7453e4 | ||
|
|
80d2445540 | ||
|
|
ad82135879 | ||
|
|
75bcb7e53f | ||
|
|
f566b38296 | ||
|
|
fa088eb6cc | ||
|
|
b0cf9bd0be | ||
|
|
9b797c1831 | ||
|
|
e1ea2215a3 | ||
|
|
0543a31920 | ||
|
|
fb34f25701 | ||
|
|
69ac75bef8 | ||
|
|
38ed83d05f | ||
|
|
c06c2d0464 | ||
|
|
64ff12c009 | ||
|
|
c46f9350a5 | ||
|
|
bd69830cbd | ||
|
|
29b8919a40 | ||
|
|
d192ed9676 | ||
|
|
6f4cfc86e8 | ||
|
|
9b85a70013 | ||
|
|
5d585fa04a | ||
|
|
f08d52b0e8 | ||
|
|
727db56576 | ||
|
|
0251728e28 | ||
|
|
84f5b72d2b | ||
|
|
87fad70f4a | ||
|
|
62dd936b08 | ||
|
|
9fa2afb44b | ||
|
|
4e4efc97f0 | ||
|
|
c76af687ed | ||
|
|
fd9f51df88 | ||
|
|
4e9a378f0d | ||
|
|
9f1fa7e212 | ||
|
|
252f00dfe7 | ||
|
|
3f8e9bd181 | ||
|
|
384c89dcef | ||
|
|
279e7028fb | ||
|
|
f9485bd25b | ||
|
|
b27989d5d4 | ||
|
|
c675f88dda | ||
|
|
e886c89e06 | ||
|
|
53c9cb38ef | ||
|
|
00f0aff6f0 | ||
|
|
0e343ae3b2 | ||
|
|
6cce2860c2 | ||
|
|
8f5d9597f8 | ||
|
|
c208fccf35 | ||
|
|
afbee44993 | ||
|
|
3fdd59bf0a | ||
|
|
41354ca00d | ||
|
|
d24f5538f9 | ||
|
|
f3ef9b868f | ||
|
|
bf262c2cae | ||
|
|
9dd4a23365 | ||
|
|
c9d8e041d5 | ||
|
|
78cb31e55f | ||
|
|
406b271275 | ||
|
|
e22fb3c538 | ||
|
|
fd29bb34be | ||
|
|
4201e8b032 | ||
|
|
076f2ed9d1 | ||
|
|
72c31c0fa9 | ||
|
|
4da8fb901b | ||
|
|
1907e5da54 | ||
|
|
34adc60d26 | ||
|
|
9c28894ec3 | ||
|
|
74fb718b77 | ||
|
|
a96b92a618 | ||
|
|
e209fb23a2 | ||
|
|
fecd213bb8 | ||
|
|
bb0de1dcad | ||
|
|
766b8535ae | ||
|
|
4f5e207f08 | ||
|
|
0b7305d21a | ||
|
|
453ed8a05e | ||
|
|
0f27edad5d | ||
|
|
6f128907fe | ||
|
|
1454d942ef | ||
|
|
2d35124c71 | ||
|
|
90b78702e5 | ||
|
|
c125ba0d66 | ||
|
|
f9973d13b4 | ||
|
|
8dd843ab8f | ||
|
|
8251807408 | ||
|
|
30ccd28d01 | ||
|
|
cb31ab3e2b | ||
|
|
3818bff86a | ||
|
|
e80f29c271 | ||
|
|
8fd9d2a7ce | ||
|
|
4e19500cce | ||
|
|
a0fb27bd80 |
@@ -8,6 +8,7 @@ You may also experience troubles with Mysql 5.5.41 with error "Lost connection"
|
||||
Upgrading to any other version or database system is abolutely required BEFORE trying to
|
||||
make a Dolibarr upgrade.
|
||||
|
||||
|
||||
***** ChangeLog for 3.7.2 compared to 3.7.1 *****
|
||||
FIX [ bug #2855 ] Wrong translation key in localtax report page
|
||||
FIX [ bug #1852 ] JS error when editing a customer order line
|
||||
@@ -126,7 +127,7 @@ For users:
|
||||
Use accesskey on form search.
|
||||
- New: Intervention documents are now available 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 __THIRDPARTY_NAME__ into email topic or content template.
|
||||
- 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: Enable supplier price log table.
|
||||
@@ -246,6 +247,12 @@ Dolibarr better:
|
||||
warehouse module and your Point Of Sale module setup if you use one.
|
||||
- Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it.
|
||||
|
||||
***** ChangeLog for 3.6.5 compared to 3.6.4 *****
|
||||
- Fix: [ bug #1776 ] Undefined $deliverycompany variable in pdf_build_address
|
||||
- Fix: [ bug #1794 ] Error when cloning Proposal gives error in a malformed page
|
||||
|
||||
***** ChangeLog for 3.6.4 compared to 3.6.3 *****
|
||||
- Fix: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask
|
||||
|
||||
***** ChangeLog for 3.6.3 compared to 3.6.2 *****
|
||||
- Fix: ref_ext was not saved when recording a customer order from web service
|
||||
|
||||
@@ -15,7 +15,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
|
||||
# Require all granted
|
||||
# </IfVersion>
|
||||
# <IfVersion < 2.3>
|
||||
# Order allow, deny
|
||||
# Order allow,deny
|
||||
# Allow from all
|
||||
# </IfVersion>
|
||||
#
|
||||
@@ -27,7 +27,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order allow, deny
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
|
||||
|
||||
@@ -457,6 +457,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
|
||||
# Removed known external modules to avoir any error when packaging on test env
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom/*`; # For custom we want to keep dir
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
|
||||
@@ -470,8 +471,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
|
||||
3
htdocs/.gitignore
vendored
3
htdocs/.gitignore
vendored
@@ -11,3 +11,6 @@
|
||||
/teclib*
|
||||
/test.php
|
||||
/ultimatepdf*
|
||||
/lead
|
||||
/dolimed*
|
||||
/allscreens*
|
||||
@@ -1,7 +1,7 @@
|
||||
<?PHP
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/customer/card.php
|
||||
* \ingroup Accounting Expert
|
||||
* \ingroup Accountancy
|
||||
* \brief Card customer ventilation
|
||||
*/
|
||||
|
||||
@@ -84,7 +84,11 @@ if (! empty($id)) {
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON l.fk_code_ventilation = aa.rowid";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = l.fk_facture";
|
||||
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
|
||||
$sql .= " WHERE f.fk_statut > 0";
|
||||
$sql .= " AND l.rowid = " . $id;
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND f.entity = '" . $conf->entity . "'";
|
||||
}
|
||||
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND f.entity = '" . $conf->entity . "'";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/customer/list.php
|
||||
* \ingroup Accounting Expert
|
||||
* \ingroup Accountancy
|
||||
* \brief Ventilation page from customers invoices
|
||||
*/
|
||||
|
||||
@@ -121,7 +121,7 @@ if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
|
||||
|
||||
$offset = $limit * $page;
|
||||
|
||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ht, l.rowid, l.fk_code_ventilation,";
|
||||
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ht, l.rowid, l.fk_code_ventilation, l.product_type,";
|
||||
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell";
|
||||
$sql .= " , aa.rowid as aarowid";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
|
||||
@@ -129,7 +129,9 @@ $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_fac
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_sell = aa.account_number";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
|
||||
$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation <= 0";
|
||||
$sql .= " WHERE f.fk_statut > 0";
|
||||
$sql. = " AND fk_code_ventilation <= 0";
|
||||
$sql. = " AND product_type <= 2";
|
||||
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_sell ='')";
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND f.entity = '" . $conf->entity . "'";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
/**
|
||||
* \file htdocs/accountancy/supplier/card.php
|
||||
* \ingroup Accounting Expert
|
||||
* \ingroup Accountancy
|
||||
* \brief Card supplier ventilation
|
||||
*/
|
||||
|
||||
@@ -85,7 +85,8 @@ if ($_GET["id"]) {
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON l.fk_code_ventilation = aa.rowid";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn ";
|
||||
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
|
||||
$sql .= " WHERE f.fk_statut > 0";
|
||||
$sql .= " AND l.rowid = " . $id;
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND f.entity = '" . $conf->entity . "'";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>s
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/accountancy/supplier/list.php
|
||||
* \ingroup Accounting Expert
|
||||
* \ingroup Accountancy
|
||||
* \brief Ventilation page from suppliers invoices
|
||||
*/
|
||||
|
||||
@@ -124,16 +124,17 @@ if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
|
||||
|
||||
$offset = $limit * $page;
|
||||
|
||||
$sql = "SELECT f.ref, f.rowid as facid, f.ref_supplier, l.fk_product, l.description, l.total_ht as price, l.rowid, l.fk_code_ventilation, ";
|
||||
$sql = "SELECT f.ref, f.rowid as facid, f.ref_supplier, l.fk_product, l.description, l.total_ht as price, l.rowid, l.fk_code_ventilation, l.product_type,";
|
||||
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON p.accountancy_code_buy = aa.account_number";
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
|
||||
$sql .= " WHERE f.fk_statut > 0 AND fk_code_ventilation <= 0";
|
||||
$sql .= " WHERE f.fk_statut > 0";
|
||||
$sql .= " AND fk_code_ventilation <= 0";
|
||||
$sql. = " AND product_type <= 2";
|
||||
$sql .= " AND (accsys.rowid='".$conf->global->CHARTOFACCOUNTS."' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_buy ='')";
|
||||
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND f.entity = '" . $conf->entity . "'";
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].' id="tramount"><td>';
|
||||
print $langs->trans("DefaultAmount");
|
||||
print '</td><td align="right">';
|
||||
print '<input type="text" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" size="5" value="'.(! empty($conf->global->MEMBER_NEWFORM_AMOUNT)?$conf->global->MEMBER_NEWFORM_AMOUNT:'').'">';;
|
||||
print '<input type="text" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" size="5" value="'.(! empty($conf->global->MEMBER_NEWFORM_AMOUNT)?$conf->global->MEMBER_NEWFORM_AMOUNT:'').'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Can edit
|
||||
@@ -197,7 +197,7 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
|
||||
print '<tr '.$bc[$var].' id="tremail"><td>';
|
||||
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
|
||||
print '</td><td align="right">';
|
||||
print '<input type="text" id="MEMBER_PAYONLINE_SENDEMAIL" name="MEMBER_PAYONLINE_SENDEMAIL" size="24" value="'.(! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL)?$conf->global->MEMBER_PAYONLINE_SENDEMAIL:'').'">';;
|
||||
print '<input type="text" id="MEMBER_PAYONLINE_SENDEMAIL" name="MEMBER_PAYONLINE_SENDEMAIL" size="24" value="'.(! empty($conf->global->MEMBER_PAYONLINE_SENDEMAIL)?$conf->global->MEMBER_PAYONLINE_SENDEMAIL:'').'">';
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ if (empty($reshook))
|
||||
}
|
||||
$lastname=$_POST["lastname"];
|
||||
$firstname=$_POST["firstname"];
|
||||
$morphy=$morphy=$_POST["morphy"];;
|
||||
$morphy=$morphy=$_POST["morphy"];
|
||||
if ($morphy != 'mor' && empty($lastname)) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
|
||||
@@ -678,7 +678,16 @@ if ($rowid > 0)
|
||||
print '<br><br><table class="border" width="100%">';
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($adht->array_options['options_'.$key])?$adht->array_options['options_'.$key]:''));
|
||||
if (isset($_POST["options_" . $key])) {
|
||||
if (is_array($_POST["options_" . $key])) {
|
||||
// $_POST["options"] is an array but following code expects a comma separated string
|
||||
$value = implode(",", $_POST["options_" . $key]);
|
||||
} else {
|
||||
$value = $_POST["options_" . $key];
|
||||
}
|
||||
} else {
|
||||
$value = $adht->array_options["options_" . $key];
|
||||
}
|
||||
print '<tr><td width="30%">'.$label.'</td><td>';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
|
||||
@@ -913,7 +913,7 @@ if ($id)
|
||||
print "</tr>";
|
||||
|
||||
$colspan=count($fieldlist)+2;
|
||||
if ($id == 4) $colspan++;;
|
||||
if ($id == 4) $colspan++;
|
||||
|
||||
if (! empty($alabelisused)) // Si un des champs est un libelle
|
||||
{
|
||||
|
||||
@@ -203,7 +203,6 @@ else if ($action == 'set_FICHINTER_FREE_TEXT')
|
||||
else if ($action == 'set_FICHINTER_DRAFT_WATERMARK')
|
||||
{
|
||||
$draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha');
|
||||
|
||||
$res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
@@ -538,7 +537,7 @@ print '<input size="50" class="flat" type="text" name="FICHINTER_DRAFT_WATERMARK
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '</form>';
|
||||
// print products on fichinter
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
@@ -164,7 +164,7 @@ if (! empty($conf->service->enabled))
|
||||
$var=! $var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("CashdeskShowServices");
|
||||
print '<td colspan="2">';;
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ else if ($id || $ref)
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print $form->showrefnav($member,'id');
|
||||
print $form->showrefnav($member,'id','','1','rowid','ref','','&type=3');
|
||||
print '</td></tr>';
|
||||
|
||||
// Login
|
||||
|
||||
@@ -1164,7 +1164,7 @@ class Categorie extends CommonObject
|
||||
{
|
||||
$cats = array();
|
||||
|
||||
$typeid=-1; $table='';;
|
||||
$typeid=-1; $table='';
|
||||
if ($type == '0' || $type == 'product') { $typeid=0; $table='product'; $type='product'; }
|
||||
else if ($type == '1' || $type == 'supplier') { $typeid=1; $table='societe'; $type='fournisseur'; }
|
||||
else if ($type == '2' || $type == 'customer') { $typeid=2; $table='societe'; $type='societe'; }
|
||||
|
||||
@@ -88,7 +88,7 @@ $hookmanager->initHooks(array('actioncard','globalcard'));
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$listUserAssignedUpdated = false;
|
||||
// Remove user to assigned list
|
||||
if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')
|
||||
{
|
||||
@@ -106,6 +106,8 @@ if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0')
|
||||
$donotclearsession=1;
|
||||
if ($action == 'add') $action = 'create';
|
||||
if ($action == 'update') $action = 'edit';
|
||||
|
||||
$listUserAssignedUpdated = true;
|
||||
}
|
||||
|
||||
// Add user to assigned list
|
||||
@@ -125,6 +127,8 @@ if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser'))
|
||||
$donotclearsession=1;
|
||||
if ($action == 'add') $action = 'create';
|
||||
if ($action == 'update') $action = 'edit';
|
||||
|
||||
$listUserAssignedUpdated = true;
|
||||
}
|
||||
|
||||
// Add event
|
||||
@@ -803,6 +807,28 @@ if ($id > 0)
|
||||
$result4=$object->fetch_userassigned();
|
||||
$result5=$object->fetch_optionals($id,$extralabels);
|
||||
|
||||
if($listUserAssignedUpdated || $donotclearsession) {
|
||||
|
||||
$datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]);
|
||||
$datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]);
|
||||
|
||||
$object->fk_action = dol_getIdFromCode($db, GETPOST("actioncode"), 'c_actioncomm');
|
||||
$object->label = GETPOST("label");
|
||||
$object->datep = $datep;
|
||||
$object->datef = $datef;
|
||||
$object->percentage = $percentage;
|
||||
$object->priority = GETPOST("priority");
|
||||
$object->fulldayevent= GETPOST("fullday")?1:0;
|
||||
$object->location = GETPOST('location');
|
||||
$object->socid = GETPOST("socid");
|
||||
$object->contactid = GETPOST("contactid",'int');
|
||||
//$object->societe->id = $_POST["socid"]; // deprecated
|
||||
//$object->contact->id = $_POST["contactid"]; // deprecated
|
||||
$object->fk_project = GETPOST("projectid",'int');
|
||||
|
||||
$object->note = GETPOST("note");
|
||||
}
|
||||
|
||||
if ($result1 < 0 || $result2 < 0 || $result3 < 0 || $result4 < 0 || $result5 < 0)
|
||||
{
|
||||
dol_print_error($db,$object->error);
|
||||
@@ -1202,7 +1228,16 @@ if ($id > 0)
|
||||
print '<br><br><table class="border" width="100%">';
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:''));
|
||||
if (isset($_POST["options_" . $key])) {
|
||||
if (is_array($_POST["options_" . $key])) {
|
||||
// $_POST["options"] is an array but following code expects a comma separated string
|
||||
$value = implode(",", $_POST["options_" . $key]);
|
||||
} else {
|
||||
$value = $_POST["options_" . $key];
|
||||
}
|
||||
} else {
|
||||
$value = $object->array_options["options_" . $key];
|
||||
}
|
||||
print '<tr><td width="30%">'.$label.'</td><td>';
|
||||
print $extrafields->showOutputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
|
||||
@@ -542,7 +542,19 @@ class ActionComm extends CommonObject
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
if (! $error) {
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources";
|
||||
$sql.= " WHERE fk_actioncomm=".$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
$res=$this->db->query($sql);
|
||||
if ($res < 0) {
|
||||
$this->error=$this->db->lasterror();
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// Removed extrafields
|
||||
if (! $error) {
|
||||
$result=$this->deleteExtraFields();
|
||||
|
||||
@@ -828,25 +828,25 @@ if ($id > 0)
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->creer)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->creer && $object->status==1)
|
||||
{
|
||||
$langs->load("propal");
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$object->id.'&action=create">'.$langs->trans("AddProp").'</a></div>';
|
||||
}
|
||||
|
||||
if (! empty($conf->commande->enabled) && $user->rights->commande->creer)
|
||||
if (! empty($conf->commande->enabled) && $user->rights->commande->creer && $object->status==1)
|
||||
{
|
||||
$langs->load("orders");
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/card.php?socid='.$object->id.'&action=create">'.$langs->trans("AddOrder").'</a></div>';
|
||||
}
|
||||
|
||||
if ($user->rights->contrat->creer)
|
||||
if ($user->rights->contrat->creer && $object->status==1)
|
||||
{
|
||||
$langs->load("contracts");
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?socid='.$object->id.'&action=create">'.$langs->trans("AddContract").'</a></div>';
|
||||
}
|
||||
|
||||
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer)
|
||||
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer && $object->status==1)
|
||||
{
|
||||
$langs->load("fichinter");
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card.php?socid='.$object->id.'&action=create">'.$langs->trans("AddIntervention").'</a></div>';
|
||||
@@ -855,7 +855,7 @@ if ($id > 0)
|
||||
// Add invoice
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
if (! empty($conf->deplacement->enabled))
|
||||
if (! empty($conf->deplacement->enabled) && $object->status==1)
|
||||
{
|
||||
$langs->load("trips");
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/deplacement/card.php?socid='.$object->id.'&action=create">'.$langs->trans("AddTrip").'</a></div>';
|
||||
@@ -863,7 +863,7 @@ if ($id > 0)
|
||||
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
if ($user->rights->facture->creer)
|
||||
if ($user->rights->facture->creer && $object->status==1)
|
||||
{
|
||||
$langs->load("bills");
|
||||
$langs->load("orders");
|
||||
|
||||
@@ -166,8 +166,7 @@ if ($result)
|
||||
print '<td align="right" class="nowrap">';
|
||||
if ($filteremail)
|
||||
{
|
||||
if ($obj->sendstatut==-1) print $langs->trans("MailingStatusError").' '.img_error();
|
||||
if ($obj->sendstatut==1) print $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut6');
|
||||
print $email::libStatutDest($obj->sendstatut,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -115,7 +115,7 @@ if (empty($reshook))
|
||||
// Action clone object
|
||||
if ($action == 'confirm_clone' && $confirm == 'yes')
|
||||
{
|
||||
if (1 == 0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers'))
|
||||
if (! GETPOST('socid', 3))
|
||||
{
|
||||
setEventMessage($langs->trans("NoCloneOptionsSpecified"), 'errors');
|
||||
}
|
||||
@@ -127,7 +127,7 @@ if (empty($reshook))
|
||||
header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result);
|
||||
exit();
|
||||
} else {
|
||||
setEventMessage($object->error, 'errors');
|
||||
if (count($object->errors) > 0) setEventMessage($object->errors, 'errors');
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
@@ -1267,7 +1267,7 @@ if ($action == 'create')
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 2 OR s.client = 3', 1);
|
||||
print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 1);
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
@@ -2255,7 +2255,7 @@ if ($action == 'create')
|
||||
$formmail->substit['__PROPREF__'] = $object->ref;
|
||||
$formmail->substit['__SIGNATURE__'] = $user->signature;
|
||||
$formmail->substit['__REFCLIENT__'] = $object->ref_client;
|
||||
$formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name;
|
||||
$formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name;
|
||||
$formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
|
||||
$formmail->substit['__PERSONALIZED__'] = '';
|
||||
$formmail->substit['__CONTACTCIVNAME__'] = '';
|
||||
|
||||
@@ -368,7 +368,7 @@ class Propal extends CommonObject
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty,$mysoc);
|
||||
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, '', $localtaxes_type);
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
$total_ttc = $tabprice[2];
|
||||
@@ -961,7 +961,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
global $db, $user,$langs,$conf,$hookmanager;
|
||||
|
||||
dol_include_once('/projet/class.project.class.php');
|
||||
dol_include_once('/projet/class/project.class.php');
|
||||
|
||||
$this->context['createfromclone']='createfromclone';
|
||||
|
||||
@@ -974,44 +974,42 @@ class Propal extends CommonObject
|
||||
foreach($this->lines as $line)
|
||||
$line->fetch_optionals($line->rowid);
|
||||
|
||||
// Load source object
|
||||
$objFrom = dol_clone($this);
|
||||
// Load dest object
|
||||
$clonedObj = clone $this;
|
||||
|
||||
$objsoc=new Societe($this->db);
|
||||
|
||||
// Change socid if needed
|
||||
if (! empty($socid) && $socid != $this->socid)
|
||||
if (! empty($socid) && $socid != $clonedObj->socid)
|
||||
{
|
||||
if ($objsoc->fetch($socid) > 0)
|
||||
{
|
||||
$this->socid = $objsoc->id;
|
||||
$this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
|
||||
$this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
|
||||
|
||||
$project = new Project($db);
|
||||
|
||||
if($objFrom->fk_project > 0 && $project->fetch($objFrom->fk_project)) {
|
||||
if($project->socid <= 0) $this->fk_project = $objFrom->fk_project;
|
||||
else $this->fk_project = '';
|
||||
$clonedObj->socid = $objsoc->id;
|
||||
$clonedObj->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
|
||||
$clonedObj->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
|
||||
$clonedObj->fk_delivery_address = '';
|
||||
|
||||
$project = new Project($db);
|
||||
if ($this->fk_project > 0 && $project->fetch($this->fk_project)) {
|
||||
if ($project->socid <= 0) $clonedObj->fk_project = $this->fk_project;
|
||||
else $clonedObj->fk_project = '';
|
||||
} else {
|
||||
$this->fk_project = '';
|
||||
$clonedObj->fk_project = '';
|
||||
}
|
||||
|
||||
$this->fk_delivery_address = '';
|
||||
}
|
||||
|
||||
// reset ref_client
|
||||
$this->ref_client = '';
|
||||
$clonedObj->ref_client = '';
|
||||
|
||||
// TODO Change product price if multi-prices
|
||||
}
|
||||
else
|
||||
{
|
||||
$objsoc->fetch($this->socid);
|
||||
$objsoc->fetch($clonedObj->socid);
|
||||
}
|
||||
|
||||
$this->id=0;
|
||||
$this->statut=0;
|
||||
$clonedObj->id=0;
|
||||
$clonedObj->statut=0;
|
||||
|
||||
if (empty($conf->global->PROPALE_ADDON) || ! is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
|
||||
{
|
||||
@@ -1020,32 +1018,32 @@ class Propal extends CommonObject
|
||||
}
|
||||
|
||||
// Clear fields
|
||||
$this->user_author = $user->id;
|
||||
$this->user_valid = '';
|
||||
$this->date = $now;
|
||||
$this->datep = $now; // deprecated
|
||||
$this->fin_validite = $this->date + ($this->duree_validite * 24 * 3600);
|
||||
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $this->ref_client = '';
|
||||
$clonedObj->user_author = $user->id;
|
||||
$clonedObj->user_valid = '';
|
||||
$clonedObj->date = $now;
|
||||
$clonedObj->datep = $now; // deprecated
|
||||
$clonedObj->fin_validite = $clonedObj->date + ($clonedObj->duree_validite * 24 * 3600);
|
||||
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $clonedObj->ref_client = '';
|
||||
|
||||
// Set ref
|
||||
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.'.php';
|
||||
$obj = $conf->global->PROPALE_ADDON;
|
||||
$modPropale = new $obj;
|
||||
$this->ref = $modPropale->getNextValue($objsoc,$this);
|
||||
$clonedObj->ref = $modPropale->getNextValue($objsoc,$clonedObj);
|
||||
|
||||
// Create clone
|
||||
$result=$this->create($user);
|
||||
$result=$clonedObj->create($user);
|
||||
if ($result < 0) $error++;
|
||||
else
|
||||
{
|
||||
// copy internal contacts
|
||||
if ($this->copy_linked_contact($objFrom, 'internal') < 0)
|
||||
if ($clonedObj->copy_linked_contact($this, 'internal') < 0)
|
||||
$error++;
|
||||
|
||||
// copy external contacts if same company
|
||||
elseif ($objFrom->socid == $this->socid)
|
||||
elseif ($this->socid == $clonedObj->socid)
|
||||
{
|
||||
if ($this->copy_linked_contact($objFrom, 'external') < 0)
|
||||
if ($clonedObj->copy_linked_contact($this, 'external') < 0)
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@@ -1055,9 +1053,9 @@ class Propal extends CommonObject
|
||||
// Hook of thirdparty module
|
||||
if (is_object($hookmanager))
|
||||
{
|
||||
$parameters=array('objFrom'=>$objFrom);
|
||||
$parameters=array('objFrom'=>$this,'clonedObj'=>$clonedObj);
|
||||
$action='';
|
||||
$reshook=$hookmanager->executeHooks('createFrom',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook=$hookmanager->executeHooks('createFrom',$parameters,$clonedObj,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) $error++;
|
||||
}
|
||||
|
||||
@@ -1073,7 +1071,7 @@ class Propal extends CommonObject
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->id;
|
||||
return $clonedObj->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ class PropaleStats extends Stats
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $socid Id third party for filter
|
||||
* @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user.
|
||||
* @param int $userid Id user for filter (creation user)
|
||||
*/
|
||||
function __construct($db, $socid=0, $userid=0)
|
||||
|
||||
@@ -2345,7 +2345,7 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
$formmail->substit ['__ORDERREF__'] = $object->ref;
|
||||
$formmail->substit ['__SIGNATURE__'] = $user->signature;
|
||||
$formmail->substit ['__REFCLIENT__'] = $object->ref_client;
|
||||
$formmail->substit ['__THIRPARTY_NAME__'] = $object->thirdparty->name;
|
||||
$formmail->substit ['__THIRDPARTY_NAME__'] = $object->thirdparty->name;
|
||||
$formmail->substit ['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
|
||||
$formmail->substit ['__PERSONALIZED__'] = '';
|
||||
$formmail->substit ['__CONTACTCIVNAME__'] = '';
|
||||
|
||||
@@ -393,7 +393,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$mouvP = new MouvementStock($this->db);
|
||||
// We increment stock of product (and sub-products)
|
||||
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderBackToDraftInDolibarr",$this->ref));
|
||||
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("OrderBackToDraftInDolibarr",$this->ref));
|
||||
if ($result < 0) { $error++; }
|
||||
}
|
||||
}
|
||||
@@ -576,7 +576,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
$mouvP = new MouvementStock($this->db);
|
||||
// We increment stock of product (and sub-products)
|
||||
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderCanceledInDolibarr",$this->ref));
|
||||
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("OrderCanceledInDolibarr",$this->ref)); // price is 0, we don't want WAP to be changed
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
@@ -920,6 +920,7 @@ class Commande extends CommonOrder
|
||||
// Clear fields
|
||||
$this->user_author_id = $user->id;
|
||||
$this->user_valid = '';
|
||||
$this->date = dol_now();
|
||||
$this->date_creation = '';
|
||||
$this->date_validation = '';
|
||||
$this->ref_client = '';
|
||||
@@ -1042,7 +1043,7 @@ class Commande extends CommonOrder
|
||||
$this->ref_client = $object->ref_client;
|
||||
$this->note_private = $object->note_private;
|
||||
$this->note_public = $object->note_public;
|
||||
|
||||
|
||||
$this->origin = $object->element;
|
||||
$this->origin_id = $object->id;
|
||||
|
||||
@@ -1132,7 +1133,7 @@ class Commande extends CommonOrder
|
||||
{
|
||||
global $mysoc, $conf, $langs;
|
||||
|
||||
dol_syslog(get_class($this)."::addline commandeid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end, type=$type", LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::addline commandeid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end, type=$type special_code=$special_code", LOG_DEBUG);
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class CommandeStats extends Stats
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $socid Id third party for filter
|
||||
* @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user.
|
||||
* @param string $mode Option ('customer', 'supplier')
|
||||
* @param int $userid Id user for filter (creation user)
|
||||
*/
|
||||
|
||||
@@ -343,7 +343,7 @@ else
|
||||
elseif ($links[$key]['type']=='payment_supplier')
|
||||
{
|
||||
$paymentsupplierstatic->id=$links[$key]['url_id'];
|
||||
$paymentsupplierstatic->ref=$langs->trans("Payment");;
|
||||
$paymentsupplierstatic->ref=$langs->trans("Payment");
|
||||
print ' '.$paymentsupplierstatic->getNomUrl(1);
|
||||
$newline=0;
|
||||
}
|
||||
|
||||
@@ -1855,7 +1855,7 @@ if ($action == 'create')
|
||||
else
|
||||
{
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1);
|
||||
print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 3) AND status=1', 1);
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
@@ -3627,7 +3627,7 @@ if ($action == 'create')
|
||||
$formmail->substit['__FACREF__'] = $object->ref;
|
||||
$formmail->substit['__SIGNATURE__'] = $user->signature;
|
||||
$formmail->substit['__REFCLIENT__'] = $object->ref_client;
|
||||
$formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name;
|
||||
$formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name;
|
||||
$formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
|
||||
$formmail->substit['__PERSONALIZED__'] = '';
|
||||
$formmail->substit['__CONTACTCIVNAME__'] = '';
|
||||
|
||||
@@ -1761,7 +1761,7 @@ class Facture extends CommonInvoice
|
||||
$mouvP = new MouvementStock($this->db);
|
||||
$mouvP->origin = &$this;
|
||||
// We decrease stock for product
|
||||
if ($this->type == self::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarr",$num));
|
||||
if ($this->type == self::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("InvoiceValidatedInDolibarr",$num));
|
||||
else $result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarr",$num));
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
|
||||
@@ -45,7 +45,7 @@ class FactureStats extends Stats
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $socid Id third party for filter
|
||||
* @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user.
|
||||
* @param string $mode Option ('customer', 'supplier')
|
||||
* @param int $userid Id user for filter (creation user)
|
||||
*/
|
||||
@@ -168,7 +168,7 @@ class FactureStats extends Stats
|
||||
|
||||
$sql = "SELECT date_format(datef,'%m') as dm, AVG(f.".$this->field.")";
|
||||
$sql.= " FROM ".$this->from;
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
|
||||
$sql.= " AND ".$this->where;
|
||||
$sql.= " GROUP BY dm";
|
||||
@@ -188,7 +188,7 @@ class FactureStats extends Stats
|
||||
|
||||
$sql = "SELECT date_format(datef,'%Y') as year, COUNT(*) as nb, SUM(f.".$this->field.") as total, AVG(f.".$this->field.") as avg";
|
||||
$sql.= " FROM ".$this->from;
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE ".$this->where;
|
||||
$sql.= " GROUP BY year";
|
||||
$sql.= $this->db->order('year','DESC');
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@@ -104,7 +105,7 @@ if ($_GET["action"] == 'delete')
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php');
|
||||
header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php?localTaxType='.$localtax->ltt);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -547,7 +547,7 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
|
||||
* Salaries
|
||||
*/
|
||||
|
||||
if ($conf->salaries->enabled)
|
||||
if (! empty($conf->salaries->enabled))
|
||||
{
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$column = 'p.datev';
|
||||
@@ -621,13 +621,16 @@ if ($conf->salaries->enabled)
|
||||
* Donation
|
||||
*/
|
||||
|
||||
if ($conf->donation->enabled)
|
||||
if (! empty($conf->don->enabled))
|
||||
{
|
||||
print '<tr><td colspan="4">'.$langs->trans("Donation").'</td></tr>';
|
||||
$sql = "SELECT p.societe as name, 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 ($modecompta == 'CREANCES-DETTES')
|
||||
$sql.= " AND fk_statut in (1,2)";
|
||||
else
|
||||
$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, dm";
|
||||
|
||||
@@ -474,85 +474,93 @@ $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$acti
|
||||
/*
|
||||
* Salaries
|
||||
*/
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$column = 'p.datev';
|
||||
} else {
|
||||
$column = 'p.datep';
|
||||
}
|
||||
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
$sql = "SELECT p.label as nom, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " GROUP BY p.label, dm";
|
||||
|
||||
dol_syslog("get social salaries payments");
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
if (! empty($conf->salaries->enabled))
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$var=false;
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
if (! isset($decaiss[$obj->dm])) $decaiss[$obj->dm]=0;
|
||||
$decaiss[$obj->dm] += $obj->amount;
|
||||
|
||||
if (! isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm]=0;
|
||||
$decaiss_ttc[$obj->dm] += $obj->amount;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$column = 'p.datev';
|
||||
} else {
|
||||
$column = 'p.datep';
|
||||
}
|
||||
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
$sql = "SELECT p.label as nom, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " GROUP BY p.label, 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($decaiss[$obj->dm])) $decaiss[$obj->dm]=0;
|
||||
$decaiss[$obj->dm] += $obj->amount;
|
||||
|
||||
if (! isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm]=0;
|
||||
$decaiss_ttc[$obj->dm] += $obj->amount;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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)
|
||||
* Donation get dunning paiement
|
||||
*/
|
||||
if (! empty($conf->don->enabled))
|
||||
{
|
||||
$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);
|
||||
$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;
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
$sql.= " AND fk_statut in (1,2)";
|
||||
else
|
||||
$sql.= " AND fk_statut=2";
|
||||
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
||||
|
||||
dol_syslog("get donation 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);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -298,7 +298,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++)
|
||||
if ($annee_decalage != $year_end) print '<td width="15"> </td>';
|
||||
}
|
||||
|
||||
$total_ht[$annee]+=!empty($cum_ht[$case]) ? $cum_ht[$case] : 0;;
|
||||
$total_ht[$annee]+=!empty($cum_ht[$case]) ? $cum_ht[$case] : 0;
|
||||
$total[$annee]+=$cum[$case];
|
||||
}
|
||||
|
||||
|
||||
@@ -1284,7 +1284,7 @@ class Contrat extends CommonObject
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
|
||||
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,'', $localtaxes_type);
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,$mysoc, $localtaxes_type);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
$total_ttc = $tabprice[2];
|
||||
@@ -1420,7 +1420,7 @@ class Contrat extends CommonObject
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc);
|
||||
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtax1tx, $localtax2tx, 0, $price_base_type, $info_bits, 1, '', $localtaxes_type);
|
||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtax1tx, $localtax2tx, 0, $price_base_type, $info_bits, 1, $mysoc, $localtaxes_type);
|
||||
$total_ht = $tabprice[0];
|
||||
$total_tva = $tabprice[1];
|
||||
$total_ttc = $tabprice[2];
|
||||
@@ -2333,7 +2333,7 @@ class ContratLigne extends CommonObject
|
||||
*/
|
||||
function update($user, $notrigger=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf, $langs, $mysoc;
|
||||
|
||||
$error=0;
|
||||
|
||||
@@ -2370,7 +2370,9 @@ class ContratLigne extends CommonObject
|
||||
// qty, pu, remise_percent et txtva
|
||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
|
||||
$tabprice=calcul_price_total($this->qty, $this->price_ht, $this->remise_percent, $this->tva_tx, $this->localtax1_tx, $this->localtax2_tx, 0, 'HT', 0, 1);
|
||||
$localtaxes_type = getLocalTaxesFromRate($this->txtva, 0, $this->societe, $mysoc);
|
||||
|
||||
$tabprice=calcul_price_total($this->qty, $this->price_ht, $this->remise_percent, $this->tva_tx, $this->localtax1_tx, $this->localtax2_tx, 0, 'HT', 0, 1, $mysoc, $localtaxes_type);
|
||||
$this->total_ht = $tabprice[0];
|
||||
$this->total_tva = $tabprice[1];
|
||||
$this->total_ttc = $tabprice[2];
|
||||
|
||||
@@ -3564,16 +3564,16 @@ abstract class CommonObject
|
||||
else return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to show lines of extrafields with output datas
|
||||
*
|
||||
* @param object $extrafields Extrafield Object
|
||||
* @param string $mode Show output (view) or input (edit) for extrafield
|
||||
* @param array $params Optionnal parameters
|
||||
* @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
/**
|
||||
* Function to show lines of extrafields with output datas
|
||||
*
|
||||
* @param Extrafields $extrafields Extrafield Object
|
||||
* @param string $mode Show output (view) or input (edit) for extrafield
|
||||
* @param array $params Optional parameters
|
||||
* @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function showOptionals($extrafields, $mode='view', $params=0, $keyprefix='')
|
||||
{
|
||||
global $_POST, $conf;
|
||||
@@ -3601,7 +3601,16 @@ abstract class CommonObject
|
||||
$value=$this->array_options["options_".$key];
|
||||
break;
|
||||
case "edit":
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$this->array_options["options_".$key]);
|
||||
if (isset($_POST["options_" . $key])) {
|
||||
if (is_array($_POST["options_" . $key])) {
|
||||
// $_POST["options"] is an array but following code expects a comma separated string
|
||||
$value = implode(",", $_POST["options_" . $key]);
|
||||
} else {
|
||||
$value = $_POST["options_" . $key];
|
||||
}
|
||||
} else {
|
||||
$value = $this->array_options["options_" . $key];
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ($extrafields->attribute_type[$key] == 'separate')
|
||||
|
||||
@@ -762,7 +762,9 @@ class ExtraFields
|
||||
{
|
||||
$sqlwhere.= ' WHERE '.$InfoFieldList[4];
|
||||
}
|
||||
}else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$sqlwhere.= ' WHERE 1';
|
||||
}
|
||||
if (in_array($InfoFieldList[0],array('tablewithentity'))) $sqlwhere.= ' AND entity = '.$conf->entity; // Some tables may have field, some other not. For the moment we disable it.
|
||||
@@ -1155,7 +1157,7 @@ class ExtraFields
|
||||
else if (in_array($key_type,array('checkbox')))
|
||||
{
|
||||
$value_arr=GETPOST("options_".$key.$keyprefix);
|
||||
$value_key=implode($value_arr,',');
|
||||
$value_key=implode(',', $value_arr);
|
||||
}
|
||||
else if (in_array($key_type,array('price','double')))
|
||||
{
|
||||
|
||||
@@ -143,7 +143,7 @@ class Notify
|
||||
*/
|
||||
function send($action, $object)
|
||||
{
|
||||
global $conf,$langs,$mysoc,$dolibarr_main_url_root;
|
||||
global $user,$conf,$langs,$mysoc,$dolibarr_main_url_root;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@@ -1041,6 +1042,9 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio
|
||||
// Define $destpath (path to file including filename) and $destfile (only filename)
|
||||
$destpath=$upload_dir . "/" . $_FILES[$varfiles]['name'];
|
||||
$destfile=$_FILES[$varfiles]['name'];
|
||||
|
||||
$savingdocmask = dol_sanitizeFileName($savingdocmask);
|
||||
|
||||
if ($savingdocmask)
|
||||
{
|
||||
$destpath=$upload_dir . "/" . preg_replace('/__file__/',$_FILES[$varfiles]['name'],$savingdocmask);
|
||||
|
||||
@@ -231,7 +231,7 @@ function dol_getshmop($memoryid)
|
||||
global $shmkeys,$shmoffset;
|
||||
|
||||
if (empty($shmkeys[$memoryid]) || ! function_exists("shmop_open")) return 0;
|
||||
$shmkey=dol_getshmopaddress($memoryid);;
|
||||
$shmkey=dol_getshmopaddress($memoryid);
|
||||
//print 'dol_getshmop memoryid='.$memoryid." shmkey=".$shmkey."<br>\n";
|
||||
$handle=@shmop_open($shmkey,'a',0,0);
|
||||
if ($handle)
|
||||
|
||||
@@ -304,7 +304,6 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
||||
|
||||
if ($mode == 'source' && ! is_object($sourcecompany)) return -1;
|
||||
if ($mode == 'target' && ! is_object($targetcompany)) return -1;
|
||||
if ($mode == 'delivery' && ! is_object($deliverycompany)) return -1;
|
||||
|
||||
if (! empty($sourcecompany->state_id) && empty($sourcecompany->departement)) $sourcecompany->departement=getState($sourcecompany->state_id); //TODO: Deprecated
|
||||
if (! empty($sourcecompany->state_id) && empty($sourcecompany->state)) $sourcecompany->state=getState($sourcecompany->state_id);
|
||||
|
||||
@@ -121,17 +121,17 @@ function task_prepare_head($object)
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/task.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/task.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$head[$h][2] = 'task_task';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/contact.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
|
||||
$head[$h][1] = $langs->trans("TaskRessourceLinks");
|
||||
$head[$h][2] = 'task_contact';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
|
||||
$head[$h][1] = $langs->trans("TimeSpent");
|
||||
$head[$h][2] = 'task_time';
|
||||
$h++;
|
||||
@@ -147,14 +147,14 @@ function task_prepare_head($object)
|
||||
$nbNote = 0;
|
||||
if(!empty($object->note_private)) $nbNote++;
|
||||
if(!empty($object->note_public)) $nbNote++;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/note.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/note.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
|
||||
$head[$h][1] = $langs->trans('Notes');
|
||||
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
|
||||
$head[$h][2] = 'task_notes';
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');
|
||||
$filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->project->ref) . '/' .dol_sanitizeFileName($object->ref);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
$listoffiles=dol_dir_list($filesdir,'files',1,'','thumbs');
|
||||
|
||||
@@ -494,7 +494,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
$sql.= " AND f.fk_statut in (1,2)"; // Paid (partially or completely)
|
||||
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)";
|
||||
$sql.= " AND f.rowid = d.".$fk_facture;;
|
||||
$sql.= " AND f.rowid = d.".$fk_facture;
|
||||
$sql.= " AND pf.".$fk_facture2." = f.rowid";
|
||||
$sql.= " AND pa.rowid = pf.".$fk_payment;
|
||||
if ($y && $m)
|
||||
|
||||
@@ -376,7 +376,7 @@ class ImportCsv extends ModeleImports
|
||||
if ($obj) $tablewithentity_cache[$tablename]=1; // table contains entity field
|
||||
else $tablewithentity_cache[$tablename]=0; // table does not contains entity field
|
||||
}
|
||||
else dol_print_error($this->db);;
|
||||
else dol_print_error($this->db);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -75,6 +75,7 @@ class mailing_contacts1 extends MailingTargets
|
||||
$statssql[0].= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
||||
$statssql[0].= " AND c.email != ''"; // Note that null != '' is false
|
||||
$statssql[0].= " AND c.no_email = 0";
|
||||
$statssql[0].= " AND c.statut = 1";
|
||||
|
||||
return $statssql;
|
||||
}
|
||||
@@ -98,6 +99,7 @@ class mailing_contacts1 extends MailingTargets
|
||||
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " AND c.email != ''"; // Note that null != '' is false
|
||||
$sql.= " AND c.no_email = 0";
|
||||
$sql.= " AND c.statut = 1";
|
||||
|
||||
// La requete doit retourner un champ "nb" pour etre comprise
|
||||
// par parent::getNbOfRecipients
|
||||
@@ -204,6 +206,7 @@ class mailing_contacts1 extends MailingTargets
|
||||
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " AND c.email <> ''";
|
||||
$sql.= " AND c.no_email = 0";
|
||||
$sql.= " AND c.statut = 1";
|
||||
$sql.= " AND c.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
||||
foreach($filtersarray as $key)
|
||||
{
|
||||
|
||||
@@ -86,6 +86,7 @@ class mailing_contacts2 extends MailingTargets
|
||||
$sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " AND sp.email <> ''"; // Note that null != '' is false
|
||||
$sql.= " AND sp.no_email = 0";
|
||||
$sql.= " AND sp.statut = 1";
|
||||
//$sql.= " AND sp.poste != ''";
|
||||
$sql.= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
||||
if ($filtersarray[0]<>'all') $sql.= " AND sp.poste ='".$this->db->escape($filtersarray[0])."'";
|
||||
@@ -168,6 +169,7 @@ class mailing_contacts2 extends MailingTargets
|
||||
$sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " AND sp.email != ''"; // Note that null != '' is false
|
||||
$sql.= " AND sp.no_email = 0";
|
||||
$sql.= " AND sp.statut = 1";
|
||||
//$sql.= " AND sp.poste != ''";
|
||||
// La requete doit retourner un champ "nb" pour etre comprise
|
||||
// par parent::getNbOfRecipients
|
||||
@@ -191,6 +193,7 @@ class mailing_contacts2 extends MailingTargets
|
||||
$sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " AND sp.email != ''"; // Note that null != '' is false
|
||||
$sql.= " AND sp.no_email = 0";
|
||||
$sql.= " AND sp.statut = 1";
|
||||
$sql.= " AND (sp.poste IS NOT NULL AND sp.poste != '')";
|
||||
$sql.= " GROUP BY sp.poste";
|
||||
$sql.= " ORDER BY sp.poste";
|
||||
|
||||
@@ -85,6 +85,7 @@ class mailing_contacts3 extends MailingTargets
|
||||
if ($filtersarray[0] <> 'all') $sql.= ", ".MAIN_DB_PREFIX."categorie_societe as cs";
|
||||
$sql.= " WHERE sp.email <> ''"; // Note that null != '' is false
|
||||
$sql.= " AND sp.no_email = 0";
|
||||
$sql.= " AND sp.statut = 1";
|
||||
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
||||
if ($filtersarray[0] <> 'all') $sql.= " AND cs.fk_categorie = c.rowid";
|
||||
@@ -173,6 +174,7 @@ class mailing_contacts3 extends MailingTargets
|
||||
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " AND c.email != ''"; // Note that null != '' is false
|
||||
$sql.= " AND c.no_email = 0";
|
||||
$sql.= " AND c.statut = 1";
|
||||
/*
|
||||
$sql = "SELECT count(distinct(sp.email)) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,";
|
||||
@@ -208,6 +210,7 @@ class mailing_contacts3 extends MailingTargets
|
||||
$sql.= " ".MAIN_DB_PREFIX."categorie_societe as cs";
|
||||
$sql.= " WHERE sp.email != ''"; // Note that null != '' is false
|
||||
$sql.= " AND sp.no_email = 0";
|
||||
$sql.= " AND sp.statut = 1";
|
||||
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " AND cs.fk_categorie = c.rowid";
|
||||
$sql.= " AND cs.fk_societe = sp.fk_soc";
|
||||
|
||||
@@ -85,6 +85,7 @@ class mailing_contacts4 extends MailingTargets
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = sp.fk_soc";
|
||||
$sql.= " WHERE sp.email != ''"; // Note that null != '' is false
|
||||
$sql.= " AND sp.no_email = 0";
|
||||
$sql.= " AND sp.statut = 1";
|
||||
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
||||
if ($filtersarray[0] <> 'all') $sql.= " AND c.label = '".$this->db->escape($filtersarray[0])."'";
|
||||
$sql.= " ORDER BY sp.lastname, sp.firstname";
|
||||
@@ -173,6 +174,7 @@ class mailing_contacts4 extends MailingTargets
|
||||
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " AND c.email != ''"; // Note that null != '' is false
|
||||
$sql.= " AND c.no_email = 0";
|
||||
$sql.= " AND c.statut = 1";
|
||||
/*
|
||||
$sql = "SELECT count(distinct(sp.email)) as nb";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,";
|
||||
@@ -208,6 +210,7 @@ class mailing_contacts4 extends MailingTargets
|
||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
|
||||
$sql.= " WHERE sp.email != ''"; // Note that null != '' is false
|
||||
$sql.= " AND sp.no_email = 0";
|
||||
$sql.= " AND sp.statut = 1";
|
||||
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " GROUP BY c.label";
|
||||
$sql.= " ORDER BY c.label";
|
||||
|
||||
@@ -136,7 +136,7 @@ class modContrat extends DolibarrModules
|
||||
$r=1;
|
||||
|
||||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->export_label[$r]='ContractAndServices'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->export_label[$r]='ContractsAndServices'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->export_icon[$r]='contract';
|
||||
$this->export_permission[$r]=array(array("contrat","export"));
|
||||
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode',
|
||||
|
||||
@@ -416,7 +416,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$project= new Project($this->db);
|
||||
$project->fetch($object->fk_project);
|
||||
|
||||
$dir = $conf->projet->dir_output. "/" . $project->ref. "/";;
|
||||
$dir = $conf->projet->dir_output. "/" . $project->ref. "/";
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref;
|
||||
$file = $dir . "/" . $objectref . ".odt";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@@ -48,7 +49,7 @@ if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX))
|
||||
//var_dump($modulepart);
|
||||
if (in_array($modulepart,array('facture_fournisseur','commande_fournisseur','facture','commande','propal','ficheinter','contract','project','project_task')))
|
||||
{
|
||||
$savingdocmask=$object->ref.'-__file__';
|
||||
$savingdocmask=dol_sanitizeFileName($object->ref).'-__file__';
|
||||
}
|
||||
/*if (in_array($modulepart,array('member')))
|
||||
{
|
||||
|
||||
@@ -451,7 +451,7 @@ jQuery(document).ready(function() {
|
||||
<?php if (! empty($usemargins) && $user->rights->margins->creer) { ?>
|
||||
|
||||
/* Code for margin */
|
||||
$("#fournprice_predef options").remove();
|
||||
$("#fournprice_predef").find("option").remove();
|
||||
$("#fournprice_predef").hide();
|
||||
$("#buying_price").val("").show();
|
||||
$.post('<?php echo DOL_URL_ROOT; ?>/fourn/ajax/getSupplierPrices.php', { 'idprod': $(this).val() }, function(data) {
|
||||
|
||||
@@ -61,6 +61,10 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
$newobject = new Commande($this->db);
|
||||
|
||||
$newobject->context['createfrompropal'] = 'createfrompropal';
|
||||
$newobject->context['origin'] = $object->element;
|
||||
$newobject->context['origin_id'] = $object->id;
|
||||
|
||||
$ret=$newobject->createFromProposal($object);
|
||||
if ($ret < 0) { $this->error=$newobject->error; $this->errors[]=$newobject->error; }
|
||||
return $ret;
|
||||
@@ -76,6 +80,10 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$newobject = new Facture($this->db);
|
||||
|
||||
$newobject->context['createfromorder'] = 'createfromorder';
|
||||
$newobject->context['origin'] = $object->element;
|
||||
$newobject->context['origin_id'] = $object->id;
|
||||
|
||||
$ret=$newobject->createFromOrder($object);
|
||||
if ($ret < 0) { $this->error=$newobject->error; $this->errors[]=$newobject->error; }
|
||||
return $ret;
|
||||
|
||||
@@ -980,7 +980,7 @@ class Expedition extends CommonObject
|
||||
$mouvS->origin = &$this;
|
||||
// We decrement stock of product (and sub-products)
|
||||
// We use warehouse selected for each line
|
||||
$result=$mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, $obj->subprice, $langs->trans("ShipmentDeletedInDolibarr",$this->ref));
|
||||
$result=$mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ShipmentDeletedInDolibarr",$this->ref));
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
|
||||
@@ -112,7 +112,7 @@ $field=GETPOST("field");
|
||||
$objexport=new Export($db);
|
||||
$objexport->load_arrays($user,$datatoexport);
|
||||
|
||||
$objmodelexport=new ModeleExports();
|
||||
$objmodelexport=new ModeleExports($db);
|
||||
$form = new Form($db);
|
||||
$htmlother = new FormOther($db);
|
||||
$formfile = new FormFile($db);
|
||||
|
||||
@@ -867,6 +867,7 @@ else if ($action == 'update_extras')
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
setEventMessage($object->error,'errors');
|
||||
}
|
||||
}
|
||||
else if ($reshook < 0) $error++;
|
||||
|
||||
@@ -1981,7 +1981,7 @@ elseif (! empty($object->id))
|
||||
// Tableau des substitutions
|
||||
$formmail->substit['__ORDERREF__']=$object->ref;
|
||||
$formmail->substit['__ORDERSUPPLIERREF__']=$object->ref_supplier;
|
||||
$formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name;
|
||||
$formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name;
|
||||
$formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
|
||||
$formmail->substit['__SIGNATURE__']=$user->signature;
|
||||
$formmail->substit['__PERSONALIZED__']='';
|
||||
|
||||
@@ -44,7 +44,7 @@ $langs->load('orders');
|
||||
$langs->load('deliveries');
|
||||
$langs->load('companies');
|
||||
|
||||
if (! $user->rights->facture->creer)
|
||||
if (! $user->rights->fournisseur->facture->creer)
|
||||
accessforbidden();
|
||||
|
||||
$id = (GETPOST('id') ? GETPOST('id', 'int') : GETPOST("facid")); // For backward compatibility
|
||||
|
||||
@@ -5,11 +5,8 @@
|
||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
<<<<<<< HEAD
|
||||
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
|
||||
=======
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
>>>>>>> refs/remotes/origin/3.6
|
||||
*
|
||||
* 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
|
||||
@@ -46,6 +43,7 @@ $confirm = GETPOST('confirm');
|
||||
|
||||
$facid=GETPOST('facid','int');
|
||||
$socid=GETPOST('socid','int');
|
||||
$accountid = GETPOST('accountid');
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
@@ -200,7 +198,7 @@ if (empty($reshook))
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$result=$paiement->addPaymentToBank($user,'payment_supplier','(SupplierInvoicePayment)',$_POST['accountid'],'','');
|
||||
$result=$paiement->addPaymentToBank($user,'payment_supplier','(SupplierInvoicePayment)',$accountid,'','');
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessage($paiement->error, 'errors');
|
||||
@@ -304,7 +302,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Account').'</td><td>';
|
||||
$form->select_comptes(empty($_POST['accountid'])?'':$_POST['accountid'],'accountid',0,'',2);
|
||||
$form->select_comptes(empty($accountid)?'':$accountid,'accountid',0,'',2);
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
|
||||
@@ -3818,8 +3818,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
|
||||
if ($moduletoreload == 'MAIN_MODULE_SERVICE') // Permission has changed into 2.7
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Service");
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php';
|
||||
if ($res) {
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php';
|
||||
$mod=new modService($db);
|
||||
//$mod->remove('noboxes');
|
||||
$mod->init('newboxdefonly');
|
||||
@@ -3828,8 +3828,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
|
||||
if ($moduletoreload == 'MAIN_MODULE_COMMANDE') // Permission has changed into 2.9
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Commande");
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php';
|
||||
if ($res) {
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php';
|
||||
$mod=new modCommande($db);
|
||||
//$mod->remove('noboxes');
|
||||
$mod->init('newboxdefonly');
|
||||
@@ -3838,8 +3838,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
|
||||
if ($moduletoreload == 'MAIN_MODULE_FACTURE') // Permission has changed into 2.9
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Facture");
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php';
|
||||
if ($res) {
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php';
|
||||
$mod=new modFacture($db);
|
||||
//$mod->remove('noboxes');
|
||||
$mod->init('newboxdefonly');
|
||||
@@ -3878,8 +3878,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
|
||||
if ($moduletoreload == 'MAIN_MODULE_ECM') // Permission has changed into 3.0 and 3.1
|
||||
{
|
||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module ECM");
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php';
|
||||
if ($res) {
|
||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php';
|
||||
$mod=new modECM($db);
|
||||
$mod->remove('noboxes'); // We need to remove because a permission id has been removed
|
||||
$mod->init('newboxdefonly');
|
||||
|
||||
@@ -1170,6 +1170,7 @@ ContractsNumberingModules=Contracts numbering modules
|
||||
TemplatePDFContracts=Contracts documents models
|
||||
FreeLegalTextOnContracts=Free text on contracts
|
||||
WatermarkOnDraftContractCards=Watermark on draft contracts (none if empty)
|
||||
ContractsAndServices=List of contracts and services
|
||||
##### Members #####
|
||||
MembersSetup=Members module setup
|
||||
MemberMainOptions=Main options
|
||||
|
||||
@@ -138,9 +138,9 @@ AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by third
|
||||
SeeReportInInputOutputMode=See report <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b> for a calculation on actual payments made
|
||||
SeeReportInDueDebtMode=See report <b>%sClaims-Debts%s</b> said <b>commitment accounting</b> for a calculation on issued invoices
|
||||
RulesAmountWithTaxIncluded=- Amounts shown are with all taxes included
|
||||
RulesResultDue=- It includes outstanding invoices, expenses and VAT whether they are paid or not. <br>- It is based on the validation date of invoices and VAT and on the due date for expenses.
|
||||
RulesResultInOut=- It includes the real payments made on invoices, expenses and VAT. <br>- It is based on the payment dates of the invoices, expenses and VAT.
|
||||
RulesCADue=- It includes the client's due invoices whether they are paid or not. <br>- It is based on the validation date of these invoices. <br>
|
||||
RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.<br>- It is based on the validation date of invoices and VAT and on the due date for expenses. For salaries defined with Salary module, the value date of payment is used.
|
||||
RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT and salaries. <br>- It is based on the payment dates of the invoices, expenses, VAT and salaries. The donation date for donation.
|
||||
RulesCADue=- It includes the client's due invoices whether they are paid or not. <br>- It is based on the validation date of these invoices.<br>
|
||||
RulesCAIn=- It includes all the effective payments of invoices received from clients.<br>- It is based on the payment date of these invoices<br>
|
||||
DepositsAreNotIncluded=- Deposit invoices are nor included
|
||||
DepositsAreIncluded=- Deposit invoices are included
|
||||
|
||||
@@ -138,8 +138,8 @@ AnnualByCompaniesInputOutputMode=Bilan des recettes et dépenses, détail par ti
|
||||
SeeReportInInputOutputMode=Cliquer sur <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b> pour un calcul sur les paiements effectivement réalisés
|
||||
SeeReportInDueDebtMode=Cliquer sur <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b> pour un calcul sur les factures émises
|
||||
RulesAmountWithTaxIncluded=- Les montants affichés sont les montants taxe incluse
|
||||
RulesResultDue=- Il inclut les factures, charges et tva dues, qu'elles soient payées ou non.<br>- Il se base sur la date de validation pour les factures et la tva et sur la date d'échéance pour les charges.
|
||||
RulesResultInOut=- Il inclut les règlements effectivement réalisés pour les factures, les charges et la TVA.<br>- Il se base sur la date de règlement de ces factures, charges et TVA.
|
||||
RulesResultDue=- Il inclut les factures, charges, tva dues, et dons qu'ils soient payées ou non.<br>- Il se base sur la date de validation pour les factures et la tva et sur la date d'échéance pour les charges. Pour les salaires saisis depuis le module Salaires, la date de valeur du paiement est utilisée.
|
||||
RulesResultInOut=- Il inclut les règlements effectivement réalisés pour les factures, les charges, TVA et salaires.<br>- Il se base sur la date de règlement de ces factures, charges, TVA ou salaires. La date de don pour les dons.
|
||||
RulesCADue=- Il inclut les factures clients dues, qu'elles soient payées ou non.<br>- Il se base sur la date de validation de ces factures.<br>
|
||||
RulesCAIn=- Il inclut les règlements effectivement reçus des factures clients.<br>- Il se base sur la date de règlement de ces factures<br>
|
||||
DepositsAreNotIncluded=- Les factures d'acomptes ne sont pas incluses
|
||||
|
||||
@@ -383,7 +383,7 @@ if ($action == 'create')
|
||||
*/
|
||||
print '<td align="center">';
|
||||
$quantite_livree = $commande->livraisons[$line->id];
|
||||
print $quantite_livree;;
|
||||
print $quantite_livree;
|
||||
print '</td>';
|
||||
|
||||
$quantite_commandee = $line->qty;
|
||||
|
||||
@@ -367,7 +367,7 @@ if ($comments) {
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("NoCommentYet").'<br>';;
|
||||
print $langs->trans("NoCommentYet").'<br>';
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
|
||||
@@ -252,7 +252,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$productstatic->type=$value["fk_product_type"];
|
||||
$productstatic->ref=$value['label'];
|
||||
print '<tr>';
|
||||
print '<td>'.$productstatic->getNomUrl(1,'composition').'</td>';;
|
||||
print '<td>'.$productstatic->getNomUrl(1,'composition').'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
@@ -401,7 +401,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$productstatic->type=$value["fk_product_type"];
|
||||
$productstatic->ref=$value['label'];
|
||||
print '<tr>';
|
||||
print '<td>'.$productstatic->getNomUrl(1,'composition').'</td>';;
|
||||
print '<td>'.$productstatic->getNomUrl(1,'composition').'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
@@ -299,7 +299,7 @@ if ($result)
|
||||
if (empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
{
|
||||
print '<td align="right">';
|
||||
if ($objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC");
|
||||
if (isset($objp->price_base_type) && $objp->price_base_type == 'TTC') print price($objp->price_ttc).' '.$langs->trans("TTC");
|
||||
else print price($objp->price).' '.$langs->trans("HT");
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@@ -118,8 +118,8 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</div>';
|
||||
|
||||
|
||||
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client, c.rowid, c.total_ht as total_ht, c.ref,";
|
||||
$sql.= " c.date_commande, c.fk_statut as statut, c.facture, c.rowid as commandeid, d.qty";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, s.code_client, c.rowid, c.total_ht as total_ht, c.ref,";
|
||||
$sql.= " c.date_commande, c.fk_statut as statut, c.facture, c.rowid as commandeid, SUM(d.qty) as qty";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."commande as c";
|
||||
@@ -131,6 +131,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= " AND d.fk_product =".$product->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND c.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY c.rowid ";
|
||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client,";
|
||||
$sql.= " c.rowid, c.total_ht as total_ht, c.ref,";
|
||||
$sql.= " c.date_commande, c.fk_statut as statut, c.rowid as commandeid, d.qty";
|
||||
$sql.= " c.date_commande, c.fk_statut as statut, c.rowid as commandeid, SUM(d.qty) as qty";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as c";
|
||||
@@ -124,6 +124,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= " AND d.fk_product =".$product->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND c.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY c.rowid ";
|
||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -124,9 +124,9 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
|
||||
if ($user->rights->facture->lire) {
|
||||
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client,";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, s.code_client,";
|
||||
$sql.= " f.facnumber, f.total as total_ht,";
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty";
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, SUM(d.qty) as qty";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
|
||||
@@ -138,6 +138,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= " AND d.fk_product =".$product->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND f.fk_soc = $socid";
|
||||
$sql.= " GROUP BY f.rowid ";
|
||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -122,8 +122,8 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</div>';
|
||||
|
||||
|
||||
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client, f.ref, f.total_ht as total_ht,";
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, s.code_client, f.ref, f.total_ht as total_ht,";
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, SUM(d.qty) as qty";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||
@@ -135,6 +135,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= " AND d.fk_product =".$product->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY f.rowid ";
|
||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -113,8 +113,8 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</div>';
|
||||
|
||||
|
||||
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, p.total_ht as amount,";
|
||||
$sql.= "p.datep, p.fk_statut as statut, d.qty";
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, p.total_ht as amount,";
|
||||
$sql.= "p.datep, p.fk_statut as statut, SUM(d.qty) as qty";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ",".MAIN_DB_PREFIX."propal as p";
|
||||
@@ -126,6 +126,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= " AND d.fk_product =".$product->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if ($socid) $sql.= " AND p.fk_soc = ".$socid;
|
||||
$sql.= " GROUP BY p.rowid ";
|
||||
$sql.= " ORDER BY $sortfield $sortorder ";
|
||||
$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -135,14 +135,14 @@ class Entrepot extends CommonObject
|
||||
*/
|
||||
function update($id, $user)
|
||||
{
|
||||
$this->libelle=$this->db->escape(trim($this->libelle));
|
||||
$this->description=$this->db->escape(trim($this->description));
|
||||
$this->libelle=trim($this->libelle);
|
||||
$this->description=trim($this->description);
|
||||
|
||||
$this->lieu=$this->db->escape(trim($this->lieu));
|
||||
$this->lieu=trim($this->lieu);
|
||||
|
||||
$this->address=$this->db->escape(trim($this->address));
|
||||
$this->zip=$this->zip?trim($this->zip):trim($this->zip);
|
||||
$this->town=$this->town?trim($this->town):trim($this->town);
|
||||
$this->address=trim($this->address);
|
||||
$this->zip=trim($this->zip);
|
||||
$this->town=trim($this->town);
|
||||
$this->country_id=($this->country_id > 0 ? $this->country_id : $this->country_id);
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."entrepot ";
|
||||
|
||||
@@ -682,9 +682,10 @@ if ( (! empty($conf->productbatch->enabled)) && $product->hasbatch()) {
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
$sql = "SELECT e.rowid, e.label, ps.reel, ps.pmp, ps.rowid as product_stock_id";
|
||||
$sql = "SELECT e.rowid, e.label, ps.reel, p.pmp, ps.rowid as product_stock_id";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."product_stock as ps";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = ps.fk_product";
|
||||
$sql.= " WHERE ps.reel != 0";
|
||||
$sql.= " AND ps.fk_entrepot = e.rowid";
|
||||
$sql.= " AND e.entity IN (".getEntity('stock',1).')';
|
||||
|
||||
@@ -31,7 +31,7 @@ $langs->load("stocks");
|
||||
// Security check
|
||||
$result=restrictedArea($user,'stock');
|
||||
|
||||
$sref=GETPOST("sref");;
|
||||
$sref=GETPOST("sref");
|
||||
$snom=GETPOST("snom");
|
||||
$sall=GETPOST("sall");
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$colwidth=30;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||
|
||||
dol_fiche_end();;
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
|
||||
@@ -304,7 +304,6 @@ if ($action == 'add')
|
||||
$urlback=DOL_MAIN_URL_ROOT.'/public/paybox/newpayment.php?from=membernewform&source=membersubscription&ref='.$adh->ref;
|
||||
if (price2num(GETPOST('amount'))) $urlback.='&amount='.price2num(GETPOST('amount'));
|
||||
if (GETPOST('email')) $urlback.='&email='.urlencode(GETPOST('email'));
|
||||
if (! empty($entity)) $urlback.='&entity='.$entity;
|
||||
}
|
||||
else if ($conf->global->MEMBER_NEWFORM_PAYONLINE == 'paypal')
|
||||
{
|
||||
@@ -315,7 +314,7 @@ if ($action == 'add')
|
||||
{
|
||||
$urlback.='&securekey='.dol_hash($conf->global->PAYPAL_SECURITY_TOKEN . 'membersubscription' . $adh->ref, 2);
|
||||
}
|
||||
if (! empty($entity)) $urlback.='&entity='.$entity;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -324,6 +323,7 @@ if ($action == 'add')
|
||||
}
|
||||
}
|
||||
|
||||
if (! empty($entity)) $urlback.='&entity='.$entity;
|
||||
dol_syslog("member ".$adh->ref." was created, we redirect to ".$urlback);
|
||||
Header("Location: ".$urlback);
|
||||
exit;
|
||||
|
||||
@@ -107,7 +107,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
<tr>
|
||||
<td><?php echo $langs->trans('EMail'); ?></td>
|
||||
<td><?php echo $this->control->tpl['email'];; ?></td>
|
||||
<td><?php echo $this->control->tpl['email']; ?></td>
|
||||
<td><?php echo $langs->trans('Web'); ?></td>
|
||||
<td><?php echo $this->control->tpl['url']; ?></td>
|
||||
</tr>
|
||||
|
||||
@@ -106,7 +106,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
<tr>
|
||||
<td><?php echo $langs->trans('EMail'); ?></td>
|
||||
<td><?php echo $this->control->tpl['email'];; ?></td>
|
||||
<td><?php echo $this->control->tpl['email']; ?></td>
|
||||
<td><?php echo $langs->trans('Web'); ?></td>
|
||||
<td><?php echo $this->control->tpl['url']; ?></td>
|
||||
</tr>
|
||||
|
||||
@@ -401,7 +401,14 @@ if ($socid && $action != 'edit' && $action != "create")
|
||||
}
|
||||
|
||||
if (count($rib_list) == 0) {
|
||||
print '<tr '.$bc[0].'><td colspan="7" align="center">'.$langs->trans("NoBANRecord").'</td></tr>';
|
||||
|
||||
if (! empty($conf->prelevement->enabled)) {
|
||||
$colspan = 8;
|
||||
} else {
|
||||
$colspan = 7;
|
||||
}
|
||||
|
||||
print '<tr '.$bc[0].'><td colspan="'.$colspan.'" align="center">'.$langs->trans("NoBANRecord").'</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
1
htdocs/theme/.gitignore
vendored
1
htdocs/theme/.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
/bootstrap
|
||||
/oblyon
|
||||
/allscreens/
|
||||
|
||||
@@ -160,6 +160,6 @@ echo '</pre>';
|
||||
echo '<h4>SOAP Message</h4>';
|
||||
echo '<pre>' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '</pre>';
|
||||
|
||||
echo '</body>'."\n";;
|
||||
echo '</html>'."\n";;
|
||||
echo '</body>'."\n";
|
||||
echo '</html>'."\n";
|
||||
?>
|
||||
|
||||
@@ -92,6 +92,6 @@ echo '<h4>SOAP Message</h4>';
|
||||
echo '<pre>' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '</pre>';
|
||||
|
||||
|
||||
echo '</body>'."\n";;
|
||||
echo '</html>'."\n";;
|
||||
echo '</body>'."\n";
|
||||
echo '</html>'."\n";
|
||||
?>
|
||||
|
||||
@@ -136,6 +136,6 @@ echo '</pre>';
|
||||
echo '<h4>SOAP Message</h4>';
|
||||
echo '<pre>' . htmlspecialchars($soapclient2->response, ENT_QUOTES) . '</pre>';
|
||||
|
||||
echo '</body>'."\n";;
|
||||
echo '</html>'."\n";;
|
||||
echo '</body>'."\n";
|
||||
echo '</html>'."\n";
|
||||
?>
|
||||
|
||||
@@ -99,6 +99,6 @@ echo '</pre>';
|
||||
echo '<h4>SOAP Message</h4>';
|
||||
echo '<pre>' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '</pre>';
|
||||
|
||||
echo '</body>'."\n";;
|
||||
echo '</html>'."\n";;
|
||||
echo '</body>'."\n";
|
||||
echo '</html>'."\n";
|
||||
?>
|
||||
|
||||
@@ -177,6 +177,6 @@ echo '</pre>';
|
||||
echo '<h4>SOAP Message</h4>';
|
||||
echo '<pre>' . htmlspecialchars($soapclient3->response, ENT_QUOTES) . '</pre>';
|
||||
|
||||
echo '</body>'."\n";;
|
||||
echo '</html>'."\n";;
|
||||
echo '</body>'."\n";
|
||||
echo '</html>'."\n";
|
||||
?>
|
||||
|
||||
@@ -223,6 +223,6 @@ echo '</pre>';
|
||||
echo '<h4>SOAP Message</h4>';
|
||||
echo '<pre>' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '</pre>';
|
||||
|
||||
echo '</body>'."\n";;
|
||||
echo '</html>'."\n";;
|
||||
echo '</body>'."\n";
|
||||
echo '</html>'."\n";
|
||||
?>
|
||||
|
||||
@@ -116,7 +116,7 @@ if ($resql)
|
||||
$oldemail = $obj->email;
|
||||
$olduid = $obj->uid;
|
||||
$oldlang = $obj->lang;
|
||||
$oldsalerepresentative=dolGetFirstLastname($obj->firstname, $obj->lastname);;
|
||||
$oldsalerepresentative=dolGetFirstLastname($obj->firstname, $obj->lastname);
|
||||
$message = '';
|
||||
$total = 0;
|
||||
$foundtoprocess = 0;
|
||||
|
||||
@@ -120,7 +120,7 @@ if ($resql)
|
||||
$oldemail = $obj->email;
|
||||
$olduid = $obj->uid;
|
||||
$oldlang = $obj->lang;
|
||||
$oldsalerepresentative=dolGetFirstLastname($obj->firstname, $obj->lastname);;
|
||||
$oldsalerepresentative=dolGetFirstLastname($obj->firstname, $obj->lastname);
|
||||
$message = '';
|
||||
$total = 0;
|
||||
$foundtoprocess = 0;
|
||||
|
||||
Reference in New Issue
Block a user