Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/fourn/commande/dispatch.php htdocs/societe/class/societe.class.php htdocs/stripe/config.php
This commit is contained in:
commit
bcee0ef0ae
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -50,11 +50,11 @@ $main_option = array (
|
||||
|
||||
$configuration = AccountancyExport::getTypeConfig();
|
||||
|
||||
$listparam = $configuration[param];
|
||||
$listparam = $configuration['param'];
|
||||
|
||||
$listformat = $configuration[format];
|
||||
$listformat = $configuration['format'];
|
||||
|
||||
$listcr = $configuration[cr];
|
||||
$listcr = $configuration['cr'];
|
||||
|
||||
|
||||
$model_option = array (
|
||||
@ -117,7 +117,7 @@ if ($action == 'update') {
|
||||
if (! $error) {
|
||||
// reload
|
||||
$configuration = AccountancyExport::getTypeConfig();
|
||||
$listparam = $configuration[param];
|
||||
$listparam = $configuration['param'];
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
@ -142,27 +142,27 @@ print ' {'."\n";
|
||||
foreach ($listparam as $key => $param) {
|
||||
print ' if (jQuery("#ACCOUNTING_EXPORT_MODELCSV").val()=="'.$key.'")'."\n";
|
||||
print ' {'."\n";
|
||||
print ' //console.log("'.$param[label].'");'."\n";
|
||||
if (empty($param[ACCOUNTING_EXPORT_FORMAT])) {
|
||||
print ' //console.log("'.$param['label'].'");'."\n";
|
||||
if (empty($param['ACCOUNTING_EXPORT_FORMAT'])) {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$conf->global->ACCOUNTING_EXPORT_FORMAT.'");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").prop("disabled", true);'."\n";
|
||||
} else {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param[ACCOUNTING_EXPORT_FORMAT].'");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param['ACCOUNTING_EXPORT_FORMAT'].'");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").removeAttr("disabled");'."\n";
|
||||
}
|
||||
if (empty($param[ACCOUNTING_EXPORT_SEPARATORCSV])) {
|
||||
if (empty($param['ACCOUNTING_EXPORT_SEPARATORCSV'])) {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").prop("disabled", true);'."\n";
|
||||
} else {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("'.$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV.'");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").removeAttr("disabled");'."\n";
|
||||
}
|
||||
if (empty($param[ACCOUNTING_EXPORT_ENDLINE])) {
|
||||
if (empty($param['ACCOUNTING_EXPORT_ENDLINE'])) {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").prop("disabled", true);'."\n";
|
||||
} else {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").removeAttr("disabled");'."\n";
|
||||
}
|
||||
if (empty($param[ACCOUNTING_EXPORT_DATE])) {
|
||||
if (empty($param['ACCOUNTING_EXPORT_DATE'])) {
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_DATE").val("");'."\n";
|
||||
print ' jQuery("#ACCOUNTING_EXPORT_DATE").prop("disabled", true);'."\n";
|
||||
} else {
|
||||
@ -257,15 +257,15 @@ if ($num2) {
|
||||
print '<tr class="oddeven value">';
|
||||
|
||||
// Param
|
||||
$label = $key[label];
|
||||
$label = $key['label'];
|
||||
print '<td width="50%">' . $langs->trans($label) . '</td>';
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
if (is_array($key[param])) {
|
||||
print $form->selectarray($label, $key[param], $conf->global->$label, 0);
|
||||
if (is_array($key['param'])) {
|
||||
print $form->selectarray($label, $key['param'], $conf->global->$label, 0);
|
||||
} else {
|
||||
print '<input type="text" size="20" id="'. $label .'" name="' . $key[label] . '" value="' . $conf->global->$label . '">';
|
||||
print '<input type="text" size="20" id="'. $label .'" name="' . $key['label'] . '" value="' . $conf->global->$label . '">';
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
@ -209,7 +209,7 @@ if (empty($reshook))
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($object->errors, $object->error, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ if ($action == 'dolibarr2ldap')
|
||||
setEventMessages($langs->trans("MemberSynchronized"), null, 'mesgs');
|
||||
}
|
||||
else {
|
||||
setEventMessages($ldap->errors, $ldap->error, 'errors');
|
||||
setEventMessages($ldap->error, $ldap->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -160,7 +160,7 @@ print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("RuleForStockManagementDecrease")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print " <td align=\"right\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
$found=0;
|
||||
@ -262,7 +262,7 @@ print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("RuleForStockManagementIncrease")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print " <td align=\"right\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
$found=0;
|
||||
@ -341,7 +341,7 @@ print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("RuleForStockAvailability")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print " <td align=\"right\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
|
||||
@ -416,7 +416,7 @@ if ($virtualdiffersfromphysical)
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("RuleForStockReplenishment")." ".img_help('help',$langs->trans("VirtualDiffersFromPhysical"))."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print " <td align=\"right\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
@ -439,12 +439,12 @@ print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("Other")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print " <td align=\"right\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("UserWarehouseAutoCreate").'</td>';
|
||||
print '<td class="width100" align="right">';
|
||||
print '<td align="right">';
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_USERSTOCK_AUTOCREATE\">";
|
||||
@ -456,7 +456,8 @@ print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print $form->textwithpicto($langs->trans("StockSupportServices"), $langs->trans("StockSupportServicesDesc")).'</td>';
|
||||
print $form->textwithpicto($langs->trans("StockSupportServices"), $langs->trans("StockSupportServicesDesc"));
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -502,7 +503,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Inventory").'</td>'."\n";
|
||||
print '<td align="center" width="20"> </td>';
|
||||
print '<td align="center" width="100"> </td>'."\n";
|
||||
print '<td align="center"> </td>'."\n";
|
||||
|
||||
// Example with a yes / no select
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
@ -40,7 +40,7 @@ if (! empty($conf->accounting->enabled)) {
|
||||
}
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('compta', 'bills'));
|
||||
$langs->loadLangs(array('compta', 'bills', 'banks'));
|
||||
|
||||
$id=GETPOST('id','int');
|
||||
$action=GETPOST('action','aZ09');
|
||||
|
||||
@ -4984,7 +4984,7 @@ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisi
|
||||
*
|
||||
* @param int $idprod Id of product or 0 if not a predefined product
|
||||
* @param Societe $thirdparty_seller Thirdparty with a ->country_code defined (FR, US, IT, ...)
|
||||
* @param int $idprodfournprice Id product_fournisseur_price (for "supplier" order/invoice)
|
||||
* @param int $idprodfournprice Id product_fournisseur_price (for "supplier" proposal/order/invoice)
|
||||
* @return float|string Vat rate to use with format 5.0 or '5.0 (XXX)'
|
||||
* @see get_product_localtax_for_country
|
||||
*/
|
||||
@ -5005,7 +5005,7 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
|
||||
|
||||
if ($mysoc->country_code == $thirdparty_seller->country_code) // If selling country is ours
|
||||
{
|
||||
if ($idprodfournprice > 0) // We want vat for product for a "supplier" order or invoice
|
||||
if ($idprodfournprice > 0) // We want vat for product for a "supplier" object
|
||||
{
|
||||
$product->get_buyprice($idprodfournprice,0,0,0);
|
||||
$ret=$product->vatrate_supplier;
|
||||
@ -5030,7 +5030,7 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
|
||||
if (empty($conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS))
|
||||
{
|
||||
// If vat of product for the country not found or not defined, we return the first higher vat of country.
|
||||
$sql = "SELECT taux as vat_rate";
|
||||
$sql = "SELECT t.taux as vat_rate, t.code as default_vat_code";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c";
|
||||
$sql.= " WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$thirdparty_seller->country_code."'";
|
||||
$sql.= " ORDER BY t.taux DESC, t.code ASC, t.recuperableonly ASC";
|
||||
@ -5043,6 +5043,7 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
|
||||
if ($obj)
|
||||
{
|
||||
$ret=$obj->vat_rate;
|
||||
if ($obj->default_vat_code) $ret.=' ('.$obj->default_vat_code.')';
|
||||
}
|
||||
$db->free($sql);
|
||||
}
|
||||
|
||||
@ -393,6 +393,48 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
||||
// Web
|
||||
if ($sourcecompany->url) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($sourcecompany->url);
|
||||
}
|
||||
// Intra VAT
|
||||
if (! empty($conf->global->MAIN_TVAINTRA_IN_SOURCE_ADDRESS))
|
||||
{
|
||||
if ($sourcecompany->tva_intra) $stringaddress.=($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($sourcecompany->tva_intra);
|
||||
}
|
||||
// Professionnal Ids
|
||||
if (! empty($conf->global->MAIN_PROFID1_IN_SOURCE_ADDRESS) && ! empty($sourcecompany->idprof1))
|
||||
{
|
||||
$tmp=$outputlangs->transcountrynoentities("ProfId1",$sourcecompany->country_code);
|
||||
if (preg_match('/\((.+)\)/',$tmp,$reg)) $tmp=$reg[1];
|
||||
$stringaddress.=($stringaddress ? "\n" : '' ).$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof1);
|
||||
}
|
||||
if (! empty($conf->global->MAIN_PROFID2_IN_SOURCE_ADDRESS) && ! empty($sourcecompany->idprof2))
|
||||
{
|
||||
$tmp=$outputlangs->transcountrynoentities("ProfId2",$sourcecompany->country_code);
|
||||
if (preg_match('/\((.+)\)/',$tmp,$reg)) $tmp=$reg[1];
|
||||
$stringaddress.=($stringaddress ? "\n" : '' ).$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof2);
|
||||
}
|
||||
if (! empty($conf->global->MAIN_PROFID3_IN_SOURCE_ADDRESS) && ! empty($sourcecompany->idprof3))
|
||||
{
|
||||
$tmp=$outputlangs->transcountrynoentities("ProfId3",$sourcecompany->country_code);
|
||||
if (preg_match('/\((.+)\)/',$tmp,$reg)) $tmp=$reg[1];
|
||||
$stringaddress.=($stringaddress ? "\n" : '' ).$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof3);
|
||||
}
|
||||
if (! empty($conf->global->MAIN_PROFID4_IN_SOURCE_ADDRESS) && ! empty($sourcecompany->idprof4))
|
||||
{
|
||||
$tmp=$outputlangs->transcountrynoentities("ProfId4",$sourcecompany->country_code);
|
||||
if (preg_match('/\((.+)\)/',$tmp,$reg)) $tmp=$reg[1];
|
||||
$stringaddress.=($stringaddress ? "\n" : '' ).$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof4);
|
||||
}
|
||||
if (! empty($conf->global->MAIN_PROFID5_IN_SOURCE_ADDRESS) && ! empty($sourcecompany->idprof5))
|
||||
{
|
||||
$tmp=$outputlangs->transcountrynoentities("ProfId5",$sourcecompany->country_code);
|
||||
if (preg_match('/\((.+)\)/',$tmp,$reg)) $tmp=$reg[1];
|
||||
$stringaddress.=($stringaddress ? "\n" : '' ).$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof5);
|
||||
}
|
||||
if (! empty($conf->global->MAIN_PROFID6_IN_SOURCE_ADDRESS) && ! empty($sourcecompany->idprof6))
|
||||
{
|
||||
$tmp=$outputlangs->transcountrynoentities("ProfId6",$sourcecompany->country_code);
|
||||
if (preg_match('/\((.+)\)/',$tmp,$reg)) $tmp=$reg[1];
|
||||
$stringaddress.=($stringaddress ? "\n" : '' ).$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof6);
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode == 'target' || preg_match('/targetwithdetails/',$mode))
|
||||
|
||||
@ -317,7 +317,7 @@ class modSociete extends DolibarrModules
|
||||
$this->export_sql_end[$r] .=' AND (sc.fk_user = '.$user->id.' ';
|
||||
if (! empty($conf->global->SOCIETE_EXPORT_SUBORDINATES_CHILDS)) {
|
||||
$subordinatesids = $user->getAllChildIds();
|
||||
$this->export_sql_end[$r] .=count($subronidatesids)>0 ? ' OR (sc.fk_user IN ('.implode(',',$subronidatesids).')' : '';
|
||||
$this->export_sql_end[$r] .=count($subordinatesids)>0 ? ' OR (sc.fk_user IN ('.implode(',',$subordinatesids).')' : '';
|
||||
}
|
||||
$this->export_sql_end[$r] .=')';
|
||||
}
|
||||
@ -368,7 +368,7 @@ class modSociete extends DolibarrModules
|
||||
$this->export_sql_end[$r] .=' AND (sc.fk_user = '.$user->id.' ';
|
||||
if (! empty($conf->global->SOCIETE_EXPORT_SUBORDINATES_CHILDS)) {
|
||||
$subordinatesids = $user->getAllChildIds();
|
||||
$this->export_sql_end[$r] .=count($subronidatesids)>0 ? ' OR (sc.fk_user IN ('.implode(',',$subronidatesids).')' : '';
|
||||
$this->export_sql_end[$r] .=count($subordinatesids)>0 ? ' OR (sc.fk_user IN ('.implode(',',$subordinatesids).')' : '';
|
||||
}
|
||||
$this->export_sql_end[$r] .=')';
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ class InterfaceStripe
|
||||
$servicestatus = 1;
|
||||
}
|
||||
|
||||
// If customer is linked to Strip, we update/delete Stripe too
|
||||
// If customer is linked to Stripe, we update/delete Stripe too
|
||||
if ($action == 'COMPANY_MODIFY') {
|
||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||
|
||||
@ -173,7 +173,8 @@ class InterfaceStripe
|
||||
$stripeacc = $stripe->getStripeAccount($service); // No need of network access for this
|
||||
|
||||
$customer = $stripe->customerStripe($object, $stripeacc, $servicestatus);
|
||||
if ($customer) {
|
||||
if ($customer)
|
||||
{
|
||||
$customer->delete();
|
||||
}
|
||||
|
||||
@ -182,7 +183,7 @@ class InterfaceStripe
|
||||
$this->db->query($sql);
|
||||
}
|
||||
|
||||
// If payment mode is linked to Strip, we update/delete Stripe too
|
||||
// If payment mode is linked to Stripee, we update/delete Stripe too
|
||||
if ($action == 'COMPANYPAYMENTMODE_MODIFY' && $object->type == 'card') {
|
||||
|
||||
// For creation of credit card, we do not create in Stripe automatically
|
||||
|
||||
@ -513,9 +513,9 @@ if ($id > 0 || ! empty($ref)) {
|
||||
print '<td>' . $langs->trans("Description") . '</td>';
|
||||
if (! empty($conf->productbatch->enabled))
|
||||
{
|
||||
print '<td>' . $langs->trans("batch_number") . '</td>';
|
||||
print '<td>' . $langs->trans("EatByDate") . '</td>';
|
||||
print '<td>' . $langs->trans("SellByDate") . '</td>';
|
||||
print '<td class="dispatch_batch_number_title">'.$langs->trans("batch_number").'</td>';
|
||||
print '<td class="dispatch_dluo_title">'.$langs->trans("EatByDate").'</td>';
|
||||
print '<td class="dispatch_dlc_title">'.$langs->trans("SellByDate").'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -568,16 +568,21 @@ if ($id > 0 || ! empty($ref)) {
|
||||
|
||||
if (! empty($conf->productbatch->enabled)) {
|
||||
if ($objp->tobatch) {
|
||||
print '<td colspan="4">';
|
||||
print '<td>';
|
||||
print $linktoprod;
|
||||
print "</td>";
|
||||
print '<td class="dispatch_batch_number"></td>';
|
||||
print '<td class="dispatch_dluo"></td>';
|
||||
print '<td class="dispatch_dlc"></td>';
|
||||
} else {
|
||||
print '<td>';
|
||||
print $linktoprod;
|
||||
print "</td>";
|
||||
print '<td colspan="3">';
|
||||
print '<td class="dispatch_batch_number">';
|
||||
print $langs->trans("ProductDoesNotUseBatchSerial");
|
||||
print '</td>';
|
||||
print '<td class="dispatch_dluo"></td>';
|
||||
print '<td class="dispatch_dlc"></td>';
|
||||
}
|
||||
} else {
|
||||
print '<td colspan="4">';
|
||||
@ -639,6 +644,7 @@ if ($id > 0 || ! empty($ref)) {
|
||||
print '</td>';
|
||||
print '<td colspan="3"> </td>'; // Supplier ref + Qty ordered + qty already dispatched
|
||||
} else {
|
||||
|
||||
$type = 'dispatch';
|
||||
print '<td align="right">';
|
||||
print '</td>'; // Qty to dispatch
|
||||
@ -713,21 +719,27 @@ if ($id > 0 || ! empty($ref)) {
|
||||
|
||||
if ($nbproduct)
|
||||
{
|
||||
$checkboxlabel=$langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll'));
|
||||
$checkboxlabel = $langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll'));
|
||||
|
||||
print '<br><div class="center">';
|
||||
print $langs->trans("Comment") . ' : ';
|
||||
print '<input type="text" class="minwidth400" maxlength="128" name="comment" value="';
|
||||
print $_POST["comment"] ? GETPOST("comment") : $langs->trans("DispatchSupplierOrder", $object->ref);
|
||||
// print ' / '.$object->ref_supplier; // Not yet available
|
||||
print '" class="flat"><br>';
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
|
||||
// modified by hook
|
||||
if (empty($reshook))
|
||||
{
|
||||
print $langs->trans("Comment").' : ';
|
||||
print '<input type="text" class="minwidth400" maxlength="128" name="comment" value="';
|
||||
print $_POST["comment"] ? GETPOST("comment") : $langs->trans("DispatchSupplierOrder", $object->ref);
|
||||
// print ' / '.$object->ref_supplier; // Not yet available
|
||||
print '" class="flat"><br>';
|
||||
|
||||
print '<input type="checkbox" checked="checked" name="closeopenorder"> '.$checkboxlabel;
|
||||
print '<input type="checkbox" checked="checked" name="closeopenorder"> '.$checkboxlabel;
|
||||
|
||||
print '<br><input type="submit" class="button" value="' . $langs->trans("DispatchVerb") . '"';
|
||||
if (count($listwarehouses) <= 0)
|
||||
print ' disabled';
|
||||
print '>';
|
||||
print '<br><input type="submit" class="button" value="'.$langs->trans("DispatchVerb").'"';
|
||||
if (count($listwarehouses) <= 0)
|
||||
print ' disabled';
|
||||
print '>';
|
||||
}
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
@ -767,14 +779,14 @@ if ($id > 0 || ! empty($ref)) {
|
||||
print load_fiche_titre($langs->trans("ReceivingForSameOrder"));
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table id="dispatch_received_products" class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>' . $langs->trans("Product") . '</td>';
|
||||
if (! empty($conf->productbatch->enabled)) {
|
||||
print '<td>' . $langs->trans("batch_number") . '</td>';
|
||||
print '<td>' . $langs->trans("EatByDate") . '</td>';
|
||||
print '<td>' . $langs->trans("SellByDate") . '</td>';
|
||||
print '<td class="dispatch_batch_number_title">' . $langs->trans("batch_number") . '</td>';
|
||||
print '<td class="dispatch_dluo_title">' . $langs->trans("EatByDate") . '</td>';
|
||||
print '<td class="dispatch_dlc_title">' . $langs->trans("SellByDate") . '</td>';
|
||||
}
|
||||
print '<td align="right">' . $langs->trans("QtyDispatched") . '</td>';
|
||||
print '<td></td>';
|
||||
@ -797,9 +809,9 @@ if ($id > 0 || ! empty($ref)) {
|
||||
print "</td>\n";
|
||||
|
||||
if (! empty($conf->productbatch->enabled)) {
|
||||
print '<td>' . $objp->batch . '</td>';
|
||||
print '<td>' . dol_print_date($db->jdate($objp->eatby), 'day') . '</td>';
|
||||
print '<td>' . dol_print_date($db->jdate($objp->sellby), 'day') . '</td>';
|
||||
print '<td class="dispatch_batch_number">' . $objp->batch . '</td>';
|
||||
print '<td class="dispatch_dluo">' . dol_print_date($db->jdate($objp->eatby), 'day') . '</td>';
|
||||
print '<td class="dispatch_dlc">' . dol_print_date($db->jdate($objp->sellby), 'day') . '</td>';
|
||||
}
|
||||
|
||||
// Qty
|
||||
|
||||
@ -284,6 +284,13 @@ CREATE TABLE llx_ticket_extrafields
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
||||
create table llx_facture_rec_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
) ENGINE=innodb;
|
||||
|
||||
|
||||
-- Create dictionaries tables for ticket
|
||||
|
||||
@ -100,7 +100,7 @@ AgendaUrlOptions3=<b>logina=%s</b> to restrict output to actions owned by a user
|
||||
AgendaUrlOptionsNotAdmin=<b>logina=!%s</b> to restrict output to actions not owned by user <b>%s</b>.
|
||||
AgendaUrlOptions4=<b>logint=%s</b> to restrict output to actions assigned to user <b>%s</b> (owner and others).
|
||||
AgendaUrlOptionsProject=<b>project=__PROJECT_ID__</b> to restrict output to actions linked to project <b>__PROJECT_ID__</b>.
|
||||
AgendaUrlOptionsNotAutoEvent=<b>notactiontype=systemauto</b> to exclude automatic event.
|
||||
AgendaUrlOptionsNotAutoEvent=<b>notactiontype=systemauto</b> to exclude automatic events.
|
||||
AgendaShowBirthdayEvents=Show birthdays of contacts
|
||||
AgendaHideBirthdayEvents=Hide birthdays of contacts
|
||||
Busy=Busy
|
||||
|
||||
@ -181,6 +181,7 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers
|
||||
//case 'LINEORDER_SUPPLIER_DISPATCH':
|
||||
//case 'LINEORDER_SUPPLIER_CREATE':
|
||||
//case 'LINEORDER_SUPPLIER_UPDATE':
|
||||
//case 'LINEORDER_SUPPLIER_DELETE':
|
||||
|
||||
// Proposals
|
||||
//case 'PROPAL_CREATE':
|
||||
|
||||
@ -1679,10 +1679,13 @@ else
|
||||
print '</td><td colspan="2">';
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch('',$object->accountancy_code_sell,1);
|
||||
if (! empty($object->accountancy_code_sell))
|
||||
{
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch('',$object->accountancy_code_sell,1);
|
||||
|
||||
print $accountingaccount->getNomUrl(0,1,1,'',1);
|
||||
print $accountingaccount->getNomUrl(0,1,1,'',1);
|
||||
}
|
||||
} else {
|
||||
print $object->accountancy_code_sell;
|
||||
}
|
||||
@ -1698,10 +1701,13 @@ else
|
||||
print '</td><td colspan="2">';
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
$accountingaccount2 = new AccountingAccount($db);
|
||||
$accountingaccount2->fetch('',$object->accountancy_code_sell_intra,1);
|
||||
if (! empty($object->accountancy_code_sell_intra))
|
||||
{
|
||||
$accountingaccount2 = new AccountingAccount($db);
|
||||
$accountingaccount2->fetch('',$object->accountancy_code_sell_intra,1);
|
||||
|
||||
print $accountingaccount2->getNomUrl(0,1,1,'',1);
|
||||
print $accountingaccount2->getNomUrl(0,1,1,'',1);
|
||||
}
|
||||
} else {
|
||||
print $object->accountancy_code_sell_intra;
|
||||
}
|
||||
@ -1714,10 +1720,13 @@ else
|
||||
print '</td><td colspan="2">';
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
$accountingaccount3 = new AccountingAccount($db);
|
||||
$accountingaccount3->fetch('',$object->accountancy_code_sell_export,1);
|
||||
if (! empty($object->accountancy_code_sell_export))
|
||||
{
|
||||
$accountingaccount3 = new AccountingAccount($db);
|
||||
$accountingaccount3->fetch('',$object->accountancy_code_sell_export,1);
|
||||
|
||||
print $accountingaccount3->getNomUrl(0,1,1,'',1);
|
||||
print $accountingaccount3->getNomUrl(0,1,1,'',1);
|
||||
}
|
||||
} else {
|
||||
print $object->accountancy_code_sell_export;
|
||||
}
|
||||
@ -1730,10 +1739,13 @@ else
|
||||
print '</td><td colspan="2">';
|
||||
if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
$accountingaccount4 = new AccountingAccount($db);
|
||||
$accountingaccount4->fetch('',$object->accountancy_code_buy,1);
|
||||
if (! empty($object->accountancy_code_buy))
|
||||
{
|
||||
$accountingaccount4 = new AccountingAccount($db);
|
||||
$accountingaccount4->fetch('',$object->accountancy_code_buy,1);
|
||||
|
||||
print $accountingaccount4->getNomUrl(0,1,1,'',1);
|
||||
print $accountingaccount4->getNomUrl(0,1,1,'',1);
|
||||
}
|
||||
} else {
|
||||
print $object->accountancy_code_buy;
|
||||
}
|
||||
|
||||
@ -4430,8 +4430,6 @@ class Product extends CommonObject
|
||||
|
||||
$langs->load('products');
|
||||
|
||||
//$this->db->begin();
|
||||
|
||||
$label_type = 'label';
|
||||
|
||||
if ($type == 'short')
|
||||
|
||||
@ -31,9 +31,8 @@ define("NOLOGIN",1); // This means this output page does not require to be logg
|
||||
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
||||
|
||||
// For MultiCompany module.
|
||||
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
|
||||
// TODO This should be useless. Because entity must be retreive from object ref and not from url.
|
||||
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
|
||||
// Do not use GETPOST here, function is not defined and get of entity must be done before including main.inc.php
|
||||
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : (! empty($_GET['e']) ? (int) $_GET['e'] : (! empty($_POST['e']) ? (int) $_POST['e'] : 1))));
|
||||
if (is_numeric($entity)) define("DOLENTITY", $entity);
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user