diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 87fce1f60877b39c041cc59bf54be89081080cc8..b86023aa49a11d5524fb55fad1eda231033e569b 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2015 Frederic France <frederic.france@free.fr> + * Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es> * * 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 @@ -377,7 +378,8 @@ if ($mode == 'template' && $user->admin) if ($ret > 0) { setEventMessages($printer->error, $printer->errors, 'errors'); } else { - for ($line=0; $line < count($printer->listprinterstemplates); $line++) { + $max = count($printer->listprinterstemplates); + for ($line=0; $line < $max; $line++) { $var = !$var; print '<tr '.$bc[$var].'>'; if ($action=='edittemplate' && $printer->listprinterstemplates[$line]['rowid']==$templateid) { @@ -422,7 +424,8 @@ if ($mode == 'template' && $user->admin) print '<th>'.$langs->trans("Tag").'</th>'; print '<th>'.$langs->trans("Description").'</th>'; print "</tr>\n"; - for ($tag=0; $tag < count($printer->tags); $tag++) { + $max = count($printer->tags); + for ($tag=0; $tag < $max; $tag++) { $var = !$var; print '<tr '.$bc[$var].'>'; print '<td><'.$printer->tags[$tag].'></td><td>'.$langs->trans(strtoupper($printer->tags[$tag])).'</td>'; diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index 1968caf25448831b8f1f2e8d305f74c1cb43efc8..98e931db9f8d290a1922e1e896047c66f11ad296 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -46,7 +46,16 @@ foreach($linkedObjectBlock as $key => $objectlink) echo price($objectlink->total_ht); } ?></td> <td align="right"><?php echo $objectlink->getLibStatut(3); ?></td> - <td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td> + <td align="right"> + <?php + // For now, shipments must stay linked to order, so link is not deletable + if($object->element != 'shipping') { + ?> + <a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a> + <?php + } + ?> + </td> </tr> <?php } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index a94448f5c12b0cce991b0e2ef8a0b88359fac5b7..9dd01b7162c22d2f0362eb83f5b2961936a4b4cb 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -863,7 +863,7 @@ if (empty($reshook)) } } - // Standard invoice or Deposit invoice created from a Predefined invoice + // Standard invoice or Deposit invoice created from a Predefined template invoice if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT) && GETPOST('fac_rec') > 0) { $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 3ef9d716bfb991d565179dddc6f690fdcd56f86b..f1cae70fec5536e07eb2c8d66418ca36d248b12a 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -962,6 +962,7 @@ class FactureRec extends CommonInvoice if ($this->db->query($sql)) { $this->date_when = $date; + if ($increment_nb_gen_done>0) $_facrec->nb_gen_done++; return 1; } else diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 6e46ead1da5dca386b5d5bf7f9df83b72c973f8c..10251d631f73be9e8ee85bc37f0284ebb7910b4c 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -309,13 +309,12 @@ class Facture extends CommonInvoice $forceduedate = $this->calculate_date_lim_reglement(); - // Update date and number of last generation of recurring template invoice, before inserting new invoice + // For recurrn invoices, update date and number of last generation of recurring template invoice, before inserting new invoice if ($_facrec->frequency > 0) { - $_facrec->nb_gen_done++; $next_date = $_facrec->getNextDate(); // Calculate next date $_facrec->setValueFrom('date_last_gen', $now, '', null, 'date'); - $_facrec->setValueFrom('nb_gen_done', $_facrec->nb_gen_done + 1); + //$_facrec->setValueFrom('nb_gen_done', $_facrec->nb_gen_done + 1); // Not required, +1 already included into setNextDate when second param is 1. $_facrec->setNextDate($next_date,1); } } diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index b826e4f266d7aa1d7a51134418fee460b436567e..8118cbea1ac229f367b5e4dc34e16af52b80601c 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -1256,8 +1256,13 @@ else print '<br>'; + // Frequencry/Recurring section if ($object->frequency > 0) { + if (empty($conf->cron->enabled)) + { + print info_admin($langs->trans("EnableAndSetupModuleCron", $langs->transnoentitiesnoconv("Module2300Name"))); + } print '<table class="border" width="100%">'; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 68eb424022645f6dd62157efa9a433bfaaa4dbfe..c6651b4810d3ca8ef8dcb86654da99bca574e2a0 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -182,7 +182,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter") || GETPOST("button_removefilter.x")) // Both test are required to be compatible with all browsers { $search_user=''; $search_sale=''; diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index d09c478d63dc00cabdd91e35ec0aad5f917c73e8..276eb5ed8fa68cbacd257b77c9e2c7fbf2500d21 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -41,12 +41,20 @@ foreach($linkedObjectBlock as $key => $objectlink) <td></td> <td align="center"><?php echo dol_print_date($objectlink->date_delivery,'day'); ?></td> <td align="right"><?php - /*if ($user->rights->expedition->lire) { + if ($user->rights->expedition->lire) { $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); - }*/ ?></td> + } ?></td> <td align="right"><?php echo $objectlink->getLibStatut(3); ?></td> - <td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td> + <td align="right"> + <?php + // For now, shipments must stay linked to order, so link is not deletable + if($object->element != 'commande') { + ?> + <a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td> + <?php + } + ?> </tr> <?php } diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 86bd4a9fd63171976e3222c26bf7ec0572fae435..a54a983f514be5cd50e38164457e284ba1d5858b 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -494,7 +494,7 @@ if (empty($reshook)) $desc=GETPOST('np_desc'); $date_intervention = dol_mktime(GETPOST('dihour','int'), GETPOST('dimin','int'), 0, GETPOST('dimonth','int'), GETPOST('diday','int'), GETPOST('diyear','int')); - $duration = empty($conf->global->FICHINTER_WITHOUT_DURATION)?0:convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int')); + $duration = empty($conf->global->FICHINTER_WITHOUT_DURATION)?convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int')) : 0; // Extrafields @@ -1553,7 +1553,7 @@ else if ($id > 0 || ! empty($ref)) $selectmode = 'select'; if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) $selectmode = 'text'; - $form->select_duration('duration', $objp->duree, $selectmode); + $form->select_duration('duration', $objp->duree, 0, $selectmode); } print '</td>'; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 428109622750e7bf6aa40f681dae50e4fb586887..7481574ddd9134bd13f078ef619870d5936c7a57 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -82,10 +82,9 @@ $year = GETPOST("year","int"); $day_lim = GETPOST('day_lim','int'); $month_lim = GETPOST('month_lim','int'); $year_lim = GETPOST('year_lim','int'); -$filter = GETPOST("filtre"); $optioncss = GETPOST('optioncss','alpha'); -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test must be present to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter") || GETPOST("button_removefilter.x")) // All test must be present to be compatible with all browsers { $search_all=""; $search_ref=""; @@ -225,7 +224,7 @@ if ($search_amount_all_tax != '') $sql .= natural_search('fac.total_ttc', $search_amount_all_tax, 1); } -if ($search_status != '' && $search_status>=0) +if ($search_status != '' && $search_status >= 0) { $sql.= " AND fac.fk_statut = ".$search_status; } @@ -273,7 +272,6 @@ if ($resql) if ($search_company) $param.='&search_company='.urlencode($search_company); if ($search_amount_no_tax) $param.='&search_amount_no_tax='.urlencode($search_amount_no_tax); if ($search_amount_all_tax) $param.='&search_amount_all_tax='.urlencode($search_amount_all_tax); - if ($filter && $filter != -1) $param.='&filtre='.urlencode($filter); if ($optioncss != '') $param.='&optioncss='.$optioncss; if ($search_status >= 0) $param.="&search_status=".$search_status; @@ -347,7 +345,7 @@ if ($resql) print '<input class="flat" type="text" size="6" name="search_amount_all_tax" value="'.$search_amount_all_tax.'">'; print '</td><td class="liste_titre" align="right">'; $liststatus=array('0'=>$langs->trans("Draft"),'1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid")); - print $form->selectarray('filtre', $liststatus, $search_status, 1); + print $form->selectarray('search_status', $liststatus, $search_status, 1); print '</td>'; print '<td class="liste_titre" align="right">'; $searchpitco=$form->showFilterAndCheckAddButtons(0); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index c57c01dfc36845ad3114b9beb897fad8f21d666a..53a3081aa4e164e8565ef3ea7034a2272e66bed1 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -429,6 +429,7 @@ NoDetails=No more details in footer DisplayCompanyInfo=Display company address DisplayCompanyManager=Display manager names DisplayCompanyInfoAndManagers=Display company and manager names +EnableAndSetupModuleCron=If you want to have this recurring invoice beeing generated automatically, module *%s* must be enabled and correctly setup. Otherwise, generation of invoices must be done manually from this template with button *Create*. Note that even if you enabled automatic generation, you can still safely launch manual generation. Duplicates generation for same period are not possible. # Modules Module0Name=Users & groups diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 8ba28807bca8d816e06ef4bfce3cde2833d18fce..e4c38a8d5493ba219849a7d1bf37ba5947f20580 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -127,7 +127,7 @@ ConfirmValidateCheckReceipt=Are you sure you want to validate this check receipt DeleteCheckReceipt=Delete this check receipt ? ConfirmDeleteCheckReceipt=Are you sure you want to delete this check receipt ? BankChecks=Bank checks -BankChecksToReceipt=Checks waiting for deposit +BankChecksToReceipt=Checks awaiting deposit ShowCheckReceipt=Show check deposit receipt NumberOfCheques=Nb of check DeleteTransaction=Delete transaction diff --git a/htdocs/langs/en_US/bookmarks.lang b/htdocs/langs/en_US/bookmarks.lang index 7acb946bb6276c72aff19286cf339d1dbe014e47..19e383b2b3e7ca532ccfe98c02c0c55c040fdd9e 100644 --- a/htdocs/langs/en_US/bookmarks.lang +++ b/htdocs/langs/en_US/bookmarks.lang @@ -14,6 +14,6 @@ BehaviourOnClick=Behaviour when a URL is clicked CreateBookmark=Create bookmark SetHereATitleForLink=Set a title for the bookmark UseAnExternalHttpLinkOrRelativeDolibarrLink=Use an external http URL or a relative Dolibarr URL -ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Choose if a page opened by link must appear on current or new window +ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Choose if linked page must open in new window or not BookmarksManagement=Bookmarks management ListOfBookmarks=List of bookmarks diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index a584802048df1157f0802abc4e9e0b88d8d59989..bbb03afa4f20a954b402599e2f3d0ac5d4537d44 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - boxes BoxLastRssInfos=Rss information BoxLastProducts=Latest %s products/services -BoxProductsAlertStock=Products in stock alert +BoxProductsAlertStock=Stock alerts for products BoxLastProductsInContract=Latest %s contracted products/services BoxLastSupplierBills=Latest supplier invoices BoxLastCustomerBills=Latest customer invoices @@ -44,7 +44,7 @@ BoxTitleLastModifiedSupplierBills=Latest %s modified supplier invoices BoxTitleLastModifiedProspects=Latest %s modified prospects BoxTitleLastProductsInContract=Latest %s products/services in a contract BoxTitleLastModifiedMembers=Latest %s members -BoxTitleLastFicheInter=Latest %s modified intervention +BoxTitleLastFicheInter=Latest %s modified interventions BoxTitleOldestUnpaidCustomerBills=Oldest %s unpaid customer invoices BoxTitleOldestUnpaidSupplierBills=Oldest %s unpaid supplier invoices BoxTitleCurrentAccounts=Open accounts balances diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 23edfae8b051480db1f54fd379c19e544be1c070..b54f59dcfc29341a36ab5593abc2905eccbe959f 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -125,7 +125,7 @@ LastCheckReceiptShort=Latest %s check receipts NewCheckReceipt=New discount NewCheckDeposit=New check deposit NewCheckDepositOn=Create receipt for deposit on account: %s -NoWaitingChecks=No checks waiting for deposit. +NoWaitingChecks=No checks awaiting deposit. DateChequeReceived=Check reception date NbOfCheques=Nb of checks PaySocialContribution=Pay a social/fiscal tax diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index e252903f0828b0b177924014903b9d92d278173b..f581b76deda2268aaf4301182cd409e4279de02e 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -594,7 +594,7 @@ Priority=Priority SendByMail=Send by EMail MailSentBy=Email sent by TextUsedInTheMessageBody=Email body -SendAcknowledgementByMail=Send Ack. by email +SendAcknowledgementByMail=Send confirmation email EMail=E-mail NoEMail=No email NoMobilePhone=No mobile phone diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 84fa74643fa19494ad03c0c4a5f7a19b14ec5013..a9fd3b993e4d1d17582018048efaf9b2db3101aa 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -30,9 +30,9 @@ ConfirmDeleteATask=Are you sure you want to delete this task ? OfficerProject=Officer project LastProjects=Latest %s projects AllProjects=All projects -OpenedProjects=Opened projects -OpenedTasks=Opened tasks -OpportunitiesStatusForOpenedProjects=Opportunities amount of opened projects by status +OpenedProjects=Open projects +OpenedTasks=Open tasks +OpportunitiesStatusForOpenedProjects=Opportunities amount of open projects by status OpportunitiesStatusForProjects=Opportunities amount of projects by status ProjectsList=List of projects ShowProject=Show project @@ -182,14 +182,14 @@ ManageOpportunitiesStatus=Use projects to follow leads/opportinuties ProjectNbProjectByMonth=Nb of created projects by month ProjectOppAmountOfProjectsByMonth=Amount of opportunities by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of opportunities by month -ProjectOpenedProjectByOppStatus=Opened project/lead by opportunity status +ProjectOpenedProjectByOppStatus=Open project/lead by opportunity status ProjectsStatistics=Statistics on projects/leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label. -OpenedProjectsByThirdparties=Opened projects by thirdparties +OpenedProjectsByThirdparties=Open projects by thirdparties OnlyOpportunitiesShort=Only opportunities -OpenedOpportunitiesShort=Opened opportunities +OpenedOpportunitiesShort=Open opportunities NotAnOpportunityShort=Not an opportunity OpportunityTotalAmount=Opportunities total amount OpportunityPonderatedAmount=Opportunities weighted amount diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 6b1a28eae17d7b61c204acea77d8d30543a253d5..c1ba6f731591eada6e310d0ae8a720c96af0ae0a 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -116,7 +116,7 @@ WarehouseForStockDecrease=The warehouse <b>%s</b> will be used for stock decreas WarehouseForStockIncrease=The warehouse <b>%s</b> will be used for stock increase ForThisWarehouse=For this warehouse ReplenishmentStatusDesc=This is a list of all products with a stock lower than desired stock (or lower than alert value if checkbox "alert only" is checked). Using the checkbox, you can create supplier orders to fill the difference. -ReplenishmentOrdersDesc=This is a list of all opened supplier orders including predefined products. Only opened orders with predefined products, so orders that may affect stocks, are visible here. +ReplenishmentOrdersDesc=This is a list of all open supplier orders including predefined products. Only open orders with predefined products, so orders that may affect stocks, are visible here. Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) @@ -143,4 +143,4 @@ ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (<strong>%s</stro OpenAll=Open for all actions OpenInternal=Open for internal actions OpenShipping=Open for shippings -OpenDispatch=Open for dispatch \ No newline at end of file +OpenDispatch=Open for dispatch