Merge branch '3.6' into bug-1825
This commit is contained in:
commit
3a917a0d1f
40
ChangeLog
40
ChangeLog
@ -4,13 +4,13 @@ English Dolibarr ChangeLog
|
|||||||
|
|
||||||
***** ChangeLog for 3.6.3 compared to 3.6.2 *****
|
***** ChangeLog for 3.6.3 compared to 3.6.2 *****
|
||||||
- Fix: ref_ext was not saved when recording a customer order from web service
|
- Fix: ref_ext was not saved when recording a customer order from web service
|
||||||
- Fix: amarok is a bugged theme making dolidroid failed. We swith to eldy automatically with dolidroid.
|
- Fix: amarok is a bugged theme making dolidroid failed. We switch to eldy automatically with dolidroid.
|
||||||
- Fix: [ bug #1788 ] Duplicated doActions hook in product/fournisseurs.php
|
- Fix: [ bug #1788 ] Duplicated doActions hook in product/fournisseurs.php
|
||||||
- Fix: withdrawal create error if in the same month are deleted previus withdrawals.
|
- Fix: withdrawal create error if in the same month are deleted previous withdrawals.
|
||||||
- Fix: [ bug #1801 ] FAC_FORCE_DATE_VALIDATION constant alters supplier invoice date given to numeration modules
|
- Fix: [ bug #1801 ] FAC_FORCE_DATE_VALIDATION constant alters supplier invoice date given to numeration modules
|
||||||
- Fix: [ bug #1802 ] SQL error when updating a task with PostgreSQL database
|
- Fix: [ bug #1802 ] SQL error when updating a task with PostgreSQL database
|
||||||
- Fix: [ bug #1785 ] Start date is lost in Project > Linked objects
|
- Fix: [ bug #1785 ] Start date is lost in Project > Linked objects
|
||||||
- Fix: [ bug #1804 ] SQL error when sending email without addresee
|
- Fix: [ bug #1804 ] SQL error when sending email without address
|
||||||
- Fix: [ bug #1803 ] AJAX company contact input is not aligned
|
- Fix: [ bug #1803 ] AJAX company contact input is not aligned
|
||||||
- Fix: [ bug #1787 ] Incorrect behaviour of doActions hook
|
- Fix: [ bug #1787 ] Incorrect behaviour of doActions hook
|
||||||
- Fix: [ bug #1796 ] Unable to use numeration modules from an external module
|
- Fix: [ bug #1796 ] Unable to use numeration modules from an external module
|
||||||
@ -18,19 +18,23 @@ English Dolibarr ChangeLog
|
|||||||
- Fix: [ bug #1717 ] Sorting unpaid invoices by amount received brings due amount
|
- Fix: [ bug #1717 ] Sorting unpaid invoices by amount received brings due amount
|
||||||
- Fix: [ bug #1784 ] MOTD doesn't show up in Amarok theme
|
- Fix: [ bug #1784 ] MOTD doesn't show up in Amarok theme
|
||||||
- Fix: Tracking number not visible on shipment pdf
|
- Fix: Tracking number not visible on shipment pdf
|
||||||
- Fix: [ bug #1812 ] SQL Error message while sending emailing with PostgreSQL datatabase
|
- Fix: [ bug #1812 ] SQL Error message while sending emailing with PostgreSQL database
|
||||||
- Fix: [ bug #1819 ] SQL error when searching for an invoice payment
|
- Fix: [ bug #1819 ] SQL error when searching for an invoice payment
|
||||||
- Fix: [ bug #1827 ] Tax reports gives incorrect amounts when using external modules that create lines with special codes
|
- Fix: [ bug #1827 ] Tax reports gives incorrect amounts when using external modules that create lines with special codes
|
||||||
|
- Fix: [ bug #1822 ] SQL error in clientfourn.php report with PostgreSQL
|
||||||
|
- Fix: [ bug #1832 ] SQL error when adding a product with no price defined to an object
|
||||||
|
- Fix: [ bug #1826 ] Supplier payment types are not translated into fourn/facture/paiement.php
|
||||||
|
- Fix: [ bug #1830 ] Salaries payment only allows checking accounts
|
||||||
- Fix: [ bug #1825 ] External agenda: hide/show checkbox doesn't work
|
- Fix: [ bug #1825 ] External agenda: hide/show checkbox doesn't work
|
||||||
|
|
||||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||||
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice.
|
||||||
- Fix: bug 1588 : relative discount.
|
- Fix: bug 1588 : relative discount.
|
||||||
- Fix: label of input method not tranlated.
|
- Fix: label of input method not translated.
|
||||||
- Fix: box of customer and propsects were not correctly disabled.
|
- Fix: box of customer and prospects were not correctly disabled.
|
||||||
- Fix: [ bug #1618 ] PHP Error thrown when saving a barcode
|
- Fix: [ bug #1618 ] PHP Error thrown when saving a barcode
|
||||||
- Fix: Civility & birthdate wasn't save into adherent module.
|
- Fix: Civility & birthdate wasn't save into adherent module.
|
||||||
- Fix: webservice Thirdparty parameter lastname for invidual creation is now lastname and not ref
|
- Fix: webservice Thirdparty parameter lastname for individual creation is now lastname and not ref
|
||||||
- Fix: Chars - is no more allowed into value for code for extra fields.
|
- Fix: Chars - is no more allowed into value for code for extra fields.
|
||||||
- Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache
|
- Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache
|
||||||
- Fix: [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state
|
- Fix: [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state
|
||||||
@ -57,14 +61,14 @@ For users:
|
|||||||
- Fix: Iban was used instead of Bic into SEPA file.
|
- Fix: Iban was used instead of Bic into SEPA file.
|
||||||
- Fix: Must unaccent strings into SEPA file.
|
- Fix: Must unaccent strings into SEPA file.
|
||||||
- Fix: Extrafield feature select from table should try to translate multiple column when not needed
|
- Fix: Extrafield feature select from table should try to translate multiple column when not needed
|
||||||
- Fix: cents for indian ruppes are calle paisa and paise.
|
- Fix: cents for indian ruppes are called paisa and paise.
|
||||||
- Fix: Invoices payments may be older than invoices.
|
- Fix: Invoices payments may be older than invoices.
|
||||||
- Fix: Withdrawal total amount is double
|
- Fix: Withdrawal total amount is double
|
||||||
- Fix: [ bug #1593 ] Spanish Localtax IRPF not being calculated since 3.6.0 in supplier invoices when adding a line
|
- Fix: [ bug #1593 ] Spanish Localtax IRPF not being calculated since 3.6.0 in supplier invoices when adding a line
|
||||||
- Fix: Web service categorie WDSL declaration is correct
|
- Fix: Web service categorie WDSL declaration is correct
|
||||||
- Fix: ErrorBadValueForParamNotAString was displayed in virtual product if no base price defined
|
- Fix: ErrorBadValueForParamNotAString was displayed in virtual product if no base price defined
|
||||||
- Fix: Category creation failed and no message output
|
- Fix: Category creation failed and no message output
|
||||||
- Fix: Lanf for Payment Type
|
- Fix: Lang for Payment Type
|
||||||
- Fix: PHPCheckstyle 1.5.5
|
- Fix: PHPCheckstyle 1.5.5
|
||||||
|
|
||||||
***** ChangeLog for 3.6 compared to 3.5.* *****
|
***** ChangeLog for 3.6 compared to 3.5.* *****
|
||||||
@ -86,12 +90,12 @@ For users:
|
|||||||
- New: Improved Opensurvey module:
|
- New: Improved Opensurvey module:
|
||||||
Added options to disable comments and disable public votes.
|
Added options to disable comments and disable public votes.
|
||||||
Limit dates use calendar popup.
|
Limit dates use calendar popup.
|
||||||
Description of survey use wysiwig editor.
|
Description of survey use wysiwyg editor.
|
||||||
More information shown on result tab.
|
More information shown on result tab.
|
||||||
Renamed "survey" into "poll" (better translation).
|
Renamed "survey" into "poll" (better translation).
|
||||||
- New: Add filter on text and status into survey list. Can also sort on id, text and date end.
|
- New: Add filter on text and status into survey list. Can also sort on id, text and date end.
|
||||||
- New: The box "balance of bank accounts" show all opened accounts.
|
- New: The box "balance of bank accounts" show all opened accounts.
|
||||||
- New: Add option MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE to add sale represnative into public
|
- New: Add option MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE to add sale representative into public
|
||||||
note of generated documents.
|
note of generated documents.
|
||||||
- New: Add warning if supplier payment is higher that due amount.
|
- New: Add warning if supplier payment is higher that due amount.
|
||||||
- New: Increase length of url into bookmark module.
|
- New: Increase length of url into bookmark module.
|
||||||
@ -104,7 +108,7 @@ For users:
|
|||||||
- New: Add barcode fields into user database.
|
- New: Add barcode fields into user database.
|
||||||
- New: Add manager name (ceo, director, president...) into main company information page.
|
- New: Add manager name (ceo, director, president...) into main company information page.
|
||||||
- New: Add field url as product properties.
|
- New: Add field url as product properties.
|
||||||
- New: More options to create a credit note (can be filled autatically according to remain to pay).
|
- New: More options to create a credit note (can be filled automatically according to remain to pay).
|
||||||
- New: Can define custom fields for categories.
|
- New: Can define custom fields for categories.
|
||||||
- New: Prepare generation of SEPA files into module withdrawal.
|
- New: Prepare generation of SEPA files into module withdrawal.
|
||||||
- New: [ task #1164 ] Add "Ref. supplier" search box in supplier orders
|
- New: [ task #1164 ] Add "Ref. supplier" search box in supplier orders
|
||||||
@ -121,7 +125,7 @@ For users:
|
|||||||
- New: [ task #926 ] Add extrafield feature on order lines.
|
- New: [ task #926 ] Add extrafield feature on order lines.
|
||||||
- New: [ task #927 ] Add extrafield feature on Proposal lines.
|
- New: [ task #927 ] Add extrafield feature on Proposal lines.
|
||||||
- New: [ task #928 ] Add extrafield feature on invoice lines.
|
- New: [ task #928 ] Add extrafield feature on invoice lines.
|
||||||
- New: Paypal/paybox email sent after backcall of a payment is now a formated and translated
|
- New: Paypal/paybox email sent after backcall of a payment is now a formatted and translated
|
||||||
HTML content. For member subscription renewal, there is also a link to member.
|
HTML content. For member subscription renewal, there is also a link to member.
|
||||||
- New: When a subscription is recorded with invoice and payment:
|
- New: When a subscription is recorded with invoice and payment:
|
||||||
- the document (PDF) of invoice is also generated.
|
- the document (PDF) of invoice is also generated.
|
||||||
@ -172,11 +176,11 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
|
|||||||
So check that return value is 0 to keep default standard behaviour after hook or 1 to disable
|
So check that return value is 0 to keep default standard behaviour after hook or 1 to disable
|
||||||
default standard behaviour.
|
default standard behaviour.
|
||||||
- Properties "civilite_id" were renamed into "civility_id".
|
- Properties "civilite_id" were renamed into "civility_id".
|
||||||
- Remove add_photo_web() that is ot used anymore by core code.
|
- Remove add_photo_web() that is not used anymore by core code.
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.5.7 compared to 3.5.6 *****
|
***** ChangeLog for 3.5.7 compared to 3.5.6 *****
|
||||||
Fix: Paypal link were broken dur to SSL v3 closed.
|
Fix: Paypal link were broken due to SSL v3 closed.
|
||||||
Fix: [ bug #1769 ] Error when installing to a PostgreSQL DB that contains numbers
|
Fix: [ bug #1769 ] Error when installing to a PostgreSQL DB that contains numbers
|
||||||
Fix: [ bug #1752 ] Date filter of margins module, filters since 12H instead of 00H
|
Fix: [ bug #1752 ] Date filter of margins module, filters since 12H instead of 00H
|
||||||
Fix: [ bug #1757 ] Sorting breaks product/service statistics
|
Fix: [ bug #1757 ] Sorting breaks product/service statistics
|
||||||
@ -195,7 +199,7 @@ Fix: Bad days and month reported by function.
|
|||||||
Fix: Bad margin calculation.
|
Fix: Bad margin calculation.
|
||||||
|
|
||||||
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
|
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
|
||||||
Fix: Holiday module was broken. Initializaion of amount of holidays failed.
|
Fix: Holiday module was broken. Initialization of amount of holidays failed.
|
||||||
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
|
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
|
||||||
Fix: Fusion PDF button on unpaid invoice is no more displayed.
|
Fix: Fusion PDF button on unpaid invoice is no more displayed.
|
||||||
Fix: Unpaid invoice launch fusion PDF action even if it is only search (with enter keyboard input instead of lens click).
|
Fix: Unpaid invoice launch fusion PDF action even if it is only search (with enter keyboard input instead of lens click).
|
||||||
@ -230,7 +234,7 @@ Fix: When using option MAIN_MAIL_ALLOW_SENDMAIL_F, a mail was sent to sender.
|
|||||||
Fix: Question about warehouse must not be done when module stock is disabled.
|
Fix: Question about warehouse must not be done when module stock is disabled.
|
||||||
Fix: Option STOCK_SUPPORTS_SERVICES was not correctly implemented
|
Fix: Option STOCK_SUPPORTS_SERVICES was not correctly implemented
|
||||||
(missing test at some places).
|
(missing test at some places).
|
||||||
Fix: Renaming a project with uplaoded files failed.
|
Fix: Renaming a project with uploaded files failed.
|
||||||
Fix: [ bug #1476 ] Invoice creation form loses invoice date when there is a validation error.
|
Fix: [ bug #1476 ] Invoice creation form loses invoice date when there is a validation error.
|
||||||
Fix: [ bug #1431 ] Reception and Send supplier order box has a weird top margin.
|
Fix: [ bug #1431 ] Reception and Send supplier order box has a weird top margin.
|
||||||
Fix: [ bug #1428 ] "Nothing" is shown in the middle of the screen in a supplier order.
|
Fix: [ bug #1428 ] "Nothing" is shown in the middle of the screen in a supplier order.
|
||||||
@ -251,7 +255,7 @@ Fix: [ bug #1449 ] Trigger ORDER_CREATE, LINEORDER_DELETE, LINEORDER_UPDATE and
|
|||||||
Fix: [ bug #1450 ] Several Customer order's triggers do not report the error from the trigger handler.
|
Fix: [ bug #1450 ] Several Customer order's triggers do not report the error from the trigger handler.
|
||||||
Fix: [ bug #1451 ] Interrupted order clone through trigger, loads nonexistent order.
|
Fix: [ bug #1451 ] Interrupted order clone through trigger, loads nonexistent order.
|
||||||
Fix: [ bug #1454 ] Mention de bas de page erroné
|
Fix: [ bug #1454 ] Mention de bas de page erroné
|
||||||
Fix: Do not display dictionnay for non activated module
|
Fix: Do not display dictionary for non activated module
|
||||||
Fix: Link element from element project pages
|
Fix: Link element from element project pages
|
||||||
Fix: [ bug #1509 ] Expedition admin free text & watermark submit error
|
Fix: [ bug #1509 ] Expedition admin free text & watermark submit error
|
||||||
Fix: [ bug #1349 ] AJAX contact selector does not work fine in Project card
|
Fix: [ bug #1349 ] AJAX contact selector does not work fine in Project card
|
||||||
|
|||||||
@ -141,7 +141,9 @@ if (! $sortorder) $sortorder='DESC';
|
|||||||
$limit = $conf->liste_limit;
|
$limit = $conf->liste_limit;
|
||||||
|
|
||||||
|
|
||||||
$sql = 'SELECT s.rowid, s.nom, s.town, s.client, s.code_client,';
|
if (! $sall) $sql = 'SELECT';
|
||||||
|
else $sql = 'SELECT DISTINCT';
|
||||||
|
$sql.= ' s.rowid, s.nom, s.town, s.client, s.code_client,';
|
||||||
$sql.= ' p.rowid as propalid, p.note_private, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,';
|
$sql.= ' p.rowid as propalid, p.note_private, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,';
|
||||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
|
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
|
||||||
$sql.= ' u.login';
|
$sql.= ' u.login';
|
||||||
|
|||||||
@ -360,7 +360,7 @@ if ($result)
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='user') {
|
else if ($links[$key]['type']=='user') {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/user/fiche?id='.$links[$key]['url_id'].'">';
|
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$links[$key]['url_id'].'">';
|
||||||
print img_object($langs->trans('ShowUser'),'user').' ';
|
print img_object($langs->trans('ShowUser'),'user').' ';
|
||||||
print $langs->trans("User");
|
print $langs->trans("User");
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|||||||
@ -551,7 +551,7 @@ $sql.= " WHERE p.entity = ".$conf->entity;
|
|||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
||||||
|
|
||||||
$sql.= " GROUP BY u.rowid";
|
$sql.= " GROUP BY u.rowid, p.label, p.datep, p.fk_user";
|
||||||
$sql.= " ORDER BY u.firstname";
|
$sql.= " ORDER BY u.firstname";
|
||||||
|
|
||||||
dol_syslog("get payment salaries sql=".$sql);
|
dol_syslog("get payment salaries sql=".$sql);
|
||||||
|
|||||||
@ -248,7 +248,7 @@ if ($action == 'create')
|
|||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
|
||||||
$form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant
|
$form->select_comptes($_POST["accountid"],"accountid",0,'',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1054,11 +1054,11 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
|||||||
$default_timezone=@date_default_timezone_get();
|
$default_timezone=@date_default_timezone_get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($localtz)) {
|
if (empty($localtz)) {
|
||||||
$localtz = new DateTimeZone('UTC');
|
$localtz = new DateTimeZone('UTC');
|
||||||
}
|
}
|
||||||
|
|
||||||
$dt = new DateTime(null,$localtz);
|
$dt = new DateTime(null,$localtz);
|
||||||
$dt->setDate($year,$month,$day);
|
$dt->setDate($year,$month,$day);
|
||||||
$dt->setTime((int) $hour, (int) $minute, (int) $second);
|
$dt->setTime((int) $hour, (int) $minute, (int) $second);
|
||||||
@ -2952,7 +2952,7 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
|
|||||||
$sql = "SELECT t.localtax1, t.localtax2, t.localtax1_type, t.localtax2_type";
|
$sql = "SELECT t.localtax1, t.localtax2, t.localtax1_type, t.localtax2_type";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
|
||||||
$sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$thirdparty_seller->country_code."'";
|
$sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$thirdparty_seller->country_code."'";
|
||||||
$sql .= " AND t.taux = ".$tva." AND t.active = 1";
|
$sql .= " AND t.taux = ".((float) $tva)." AND t.active = 1";
|
||||||
|
|
||||||
dol_syslog("get_localtax sql=".$sql);
|
dol_syslog("get_localtax sql=".$sql);
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
@ -2988,7 +2988,7 @@ function getLocalTaxesFromRate($vatrate, $local, $thirdparty)
|
|||||||
$sql = "SELECT t.localtax1, t.localtax1_type, t.localtax2, t.localtax2_type, t.accountancy_code_sell, t.accountancy_code_buy";
|
$sql = "SELECT t.localtax1, t.localtax1_type, t.localtax2, t.localtax2_type, t.accountancy_code_sell, t.accountancy_code_buy";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
|
||||||
$sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$thirdparty->country_code."'";
|
$sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$thirdparty->country_code."'";
|
||||||
$sql .= " AND t.taux = ".$vatrate." AND t.active = 1";
|
$sql .= " AND t.taux = ".((float) $vatrate)." AND t.active = 1";
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -4305,6 +4305,8 @@ function picto_from_langcode($codelang)
|
|||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
|
if (empty($codelang)) return '';
|
||||||
|
|
||||||
if ($codelang == 'auto')
|
if ($codelang == 'auto')
|
||||||
{
|
{
|
||||||
return img_picto_common($langs->trans('AutoDetectLang'), 'flags/int.png');
|
return img_picto_common($langs->trans('AutoDetectLang'), 'flags/int.png');
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -447,7 +448,7 @@ if (empty($action))
|
|||||||
|
|
||||||
$sql = 'SELECT p.rowid as pid, p.datep as dp, p.amount as pamount, p.num_paiement,';
|
$sql = 'SELECT p.rowid as pid, p.datep as dp, p.amount as pamount, p.num_paiement,';
|
||||||
$sql.= ' s.rowid as socid, s.nom,';
|
$sql.= ' s.rowid as socid, s.nom,';
|
||||||
$sql.= ' c.libelle as paiement_type,';
|
$sql.= ' c.code as paiement_type, c.libelle as paiement_libelle,';
|
||||||
$sql.= ' ba.rowid as bid, ba.label,';
|
$sql.= ' ba.rowid as bid, ba.label,';
|
||||||
if (!$user->rights->societe->client->voir) $sql .= ' sc.fk_soc, sc.fk_user,';
|
if (!$user->rights->societe->client->voir) $sql .= ' sc.fk_soc, sc.fk_user,';
|
||||||
$sql.= ' SUM(f.amount)';
|
$sql.= ' SUM(f.amount)';
|
||||||
@ -486,7 +487,7 @@ if (empty($action))
|
|||||||
{
|
{
|
||||||
$sql .= " AND s.nom LIKE '%".$db->escape($search_company)."%'";
|
$sql .= " AND s.nom LIKE '%".$db->escape($search_company)."%'";
|
||||||
}
|
}
|
||||||
$sql.= " GROUP BY p.rowid, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, c.libelle, ba.rowid, ba.label";
|
$sql.= " GROUP BY p.rowid, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, c.code, c.libelle, ba.rowid, ba.label";
|
||||||
if (!$user->rights->societe->client->voir) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->societe->client->voir) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
$sql.= $db->plimit($limit+1, $offset);
|
||||||
@ -558,7 +559,9 @@ if (empty($action))
|
|||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td>'.dol_trunc($objp->paiement_type.' '.$objp->num_paiement,32)."</td>\n";
|
$payment_type = $langs->trans("PaymentType".$objp->paiement_type)!=("PaymentType".$objp->paiement_type)?$langs->trans("PaymentType".$objp->paiement_type):$objp->paiement_libelle;
|
||||||
|
|
||||||
|
print '<td>'.$payment_type.' '.dol_trunc($objp->num_paiement,32)."</td>\n";
|
||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.dol_trunc($objp->label,24).'</a>';
|
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.dol_trunc($objp->label,24).'</a>';
|
||||||
|
|||||||
@ -640,7 +640,7 @@ function createOrder($authentication,$order)
|
|||||||
$newobject->statut=0; // We start with status draft
|
$newobject->statut=0; // We start with status draft
|
||||||
$newobject->facturee=$order['facturee'];
|
$newobject->facturee=$order['facturee'];
|
||||||
$newobject->fk_project=$order['project_id'];
|
$newobject->fk_project=$order['project_id'];
|
||||||
$newObject->fk_delivery_address=$order['fk_delivery_address'];
|
$newobject->fk_delivery_address=$order['fk_delivery_address'];
|
||||||
$newobject->cond_reglement_id=$order['cond_reglement_id'];
|
$newobject->cond_reglement_id=$order['cond_reglement_id'];
|
||||||
$newobject->demand_reason_id=$order['demand_reason_id'];
|
$newobject->demand_reason_id=$order['demand_reason_id'];
|
||||||
$newobject->date_creation=$now;
|
$newobject->date_creation=$now;
|
||||||
|
|||||||
@ -452,6 +452,12 @@ function createProductOrService($authentication,$product)
|
|||||||
$error++; $errorcode='KO'; $errorlabel="You must choose between price or price_net to provide price.";
|
$error++; $errorcode='KO'; $errorlabel="You must choose between price or price_net to provide price.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($product['barcode'] && !$product['barcode_type'])
|
||||||
|
{
|
||||||
|
$errror++; $errorcode='KO' ; $errorlabel="You must set a barcode type when setting a barcode.";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
@ -473,6 +479,12 @@ function createProductOrService($authentication,$product)
|
|||||||
$newobject->price_base_type=$product['price_base_type'];
|
$newobject->price_base_type=$product['price_base_type'];
|
||||||
$newobject->date_creation=$now;
|
$newobject->date_creation=$now;
|
||||||
|
|
||||||
|
if ($product['barcode'])
|
||||||
|
{
|
||||||
|
$newobject->barcode = $product['barcode'];
|
||||||
|
$newobject->barcode_type = $product['barcode_type'];
|
||||||
|
}
|
||||||
|
|
||||||
$newobject->stock_reel=$product['stock_real'];
|
$newobject->stock_reel=$product['stock_real'];
|
||||||
$newobject->pmp=$product['pmp'];
|
$newobject->pmp=$product['pmp'];
|
||||||
$newobject->seuil_stock_alert=$product['stock_alert'];
|
$newobject->seuil_stock_alert=$product['stock_alert'];
|
||||||
@ -562,6 +574,11 @@ function updateProductOrService($authentication,$product)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($product['barcode'] && !$product['barcode_type'])
|
||||||
|
{
|
||||||
|
$errror++; $errorcode='KO' ; $errorlabel="You must set a barcode type when setting a barcode.";
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
@ -584,6 +601,12 @@ function updateProductOrService($authentication,$product)
|
|||||||
$newobject->price_base_type=$product['price_base_type'];
|
$newobject->price_base_type=$product['price_base_type'];
|
||||||
$newobject->date_creation=$now;
|
$newobject->date_creation=$now;
|
||||||
|
|
||||||
|
if ($product['barcode'])
|
||||||
|
{
|
||||||
|
$newobject->barcode = $product['barcode'];
|
||||||
|
$newobject->barcode_type = $product['barcode_type'];
|
||||||
|
}
|
||||||
|
|
||||||
$newobject->stock_reel=$product['stock_real'];
|
$newobject->stock_reel=$product['stock_real'];
|
||||||
$newobject->pmp=$product['pmp'];
|
$newobject->pmp=$product['pmp'];
|
||||||
$newobject->seuil_stock_alert=$product['stock_alert'];
|
$newobject->seuil_stock_alert=$product['stock_alert'];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user