diff --git a/.tx/config b/.tx/config index 6cad9c72c20..84e8e9f842f 100644 --- a/.tx/config +++ b/.tx/config @@ -7,7 +7,6 @@ file_filter = htdocs/langs//admin.lang source_file = htdocs/langs/en_US/admin.lang source_lang = en_US type = MOZILLAPROPERTIES -lang_map = uz_UZ: uz [dolibarr.agenda] file_filter = htdocs/langs//agenda.lang diff --git a/ChangeLog b/ChangeLog index 4cc9085b733..ba9eef93f64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -130,8 +130,13 @@ parameter. All methods addline in this case were modified to remove this paramet ***** ChangeLog for 3.4.2 compared to 3.4.1 ***** +Fix: field's problem into company's page (RIB) +Fix: Document cerfa doesn't contained firstname & lastname from donator Fix: Bad rounding on margin calculations and display. Fix: Option drop table into backup was broken. +Fix: [ bug #1105 ] Searching Boxes other search option +Fix: wrong buy price update +Fix :[ bug #1142 ] Set paiement on invoice (PGSql) ***** ChangeLog for 3.4.1 compared to 3.4.0 ***** Fix: Display buying price on line edit when no supplier price is defined diff --git a/build/debian/changelog b/build/debian/changelog index af586b8cee3..7adfece4309 100644 --- a/build/debian/changelog +++ b/build/debian/changelog @@ -14,6 +14,20 @@ dolibarr (3.4.1-3) unstable; urgency=low dolibarr (3.4.0-3) unstable; urgency=low + [ Laurent Destailleur (eldy) ] + * Maintenance release. + + -- Laurent Destailleur (eldy) Mon, 22 Apr 2013 12:00:00 +0100 + +dolibarr (3.4.1) unstable; urgency=low + + [ Laurent Destailleur (eldy) ] + * Maintenance release. + + -- Laurent Destailleur (eldy) Mon, 22 Apr 2013 12:00:00 +0100 + +dolibarr (3.4.0) unstable; urgency=low + [ Laurent Destailleur (eldy) ] * New upstream release. diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 06b458811ab..288cda7101d 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -154,14 +154,14 @@ class autoTranslator if (isset($this->_translatedFiles[$file]) && count($this->_translatedFiles[$file])>0) { $fp = fopen($destPath, 'a'); - fwrite($fp, "\r\n"); - fwrite($fp, "\r\n"); - fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\r\n"); - fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\r\n"); + fwrite($fp, "\n"); + fwrite($fp, "\n"); + fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n"); + fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n"); foreach( $this->_translatedFiles[$file] as $line) { - fwrite($fp, $line . "\r\n"); + fwrite($fp, $line . "\n"); } - fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\r\n"); + fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n"); fclose($fp); } return; @@ -177,11 +177,11 @@ class autoTranslator private function createTranslationFile($path,$my_destlang) { $fp = fopen($path, 'w+'); - fwrite($fp, "/*\r\n"); - fwrite($fp, " * Language code: {$my_destlang}\r\n"); - fwrite($fp, " * Automatic generated via autotranslator.php tool\r\n"); - fwrite($fp, " * Generation date " . $this->_time. "\r\n"); - fwrite($fp, " */\r\n"); + fwrite($fp, "/*\n"); + fwrite($fp, " * Language code: {$my_destlang}\n"); + fwrite($fp, " * Automatic generated via autotranslator.php tool\n"); + fwrite($fp, " * Generation date " . $this->_time. "\n"); + fwrite($fp, " */\n"); fclose($fp); return; } diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index d6e97de921e..6534ac09ac3 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -263,7 +263,7 @@ print '
'; /* - * Edition des variables globales non rattachées à un theme specifique + * Editing global variables not related to a specific theme */ $constantes=array( 'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT', @@ -295,4 +295,4 @@ dol_fiche_end(); llxFooter(); $db->close(); -?> \ No newline at end of file +?> diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 1e084406ae0..29ee792c738 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -202,7 +202,7 @@ if ($id > 0) print ''; print ''; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 8c2871426a4..447e065219e 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -634,13 +634,33 @@ else if ($action == "setabsolutediscount" && $user->rights->propal->creer) } // Add line -else if ($action == "addline" && $user->rights->propal->creer) +else if (($action == 'addline' || $action == 'addline_predef') && $user->rights->propal->creer) { - $idprod=GETPOST('idprod', 'int'); - $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); - $price_ht = GETPOST('price_ht'); - $tva_tx = (GETPOST('tva_tx')?GETPOST('tva_tx'):0); - $predef=((! empty($idprod) && $conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + // Set if we used free entry or predefined product + if (GETPOST('addline_libre')) + { + $predef=''; + $idprod=0; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + if (GETPOST('addline_predefined')) + { + $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):'')); + $price_ht = ''; + $tva_tx = ''; + } + if (GETPOST('usenewaddlineform')) { + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); //Extrafields $extrafieldsline = new ExtraFields($db); @@ -673,7 +693,7 @@ else if ($action == "addline" && $user->rights->propal->creer) $error++; } - if (! $error && (GETPOST('qty') >= 0) && (! empty($product_desc) || ! empty($idprod))) + if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { $pu_ht=0; $pu_ttc=0; @@ -791,8 +811,8 @@ else if ($action == "addline" && $user->rights->propal->creer) } // Margin - $fournprice=(GETPOST('fournprice')?GETPOST('fournprice'):''); - $buyingprice=(GETPOST('buying_price')?GETPOST('buying_price'):''); + $fournprice=(GETPOST('fournprice'.$predef)?GETPOST('fournprice'.$predef):''); + $buyingprice=(GETPOST('buying_price'.$predef)?GETPOST('buying_price'.$predef):''); $date_start=dol_mktime(0, 0, 0, GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_end=dol_mktime(0, 0, 0, GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); @@ -804,7 +824,7 @@ else if ($action == "addline" && $user->rights->propal->creer) $info_bits=0; if ($tva_npr) $info_bits |= 0x01; - if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) + if (! empty($price_min) && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))) { $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); @@ -815,12 +835,12 @@ else if ($action == "addline" && $user->rights->propal->creer) $result=$object->addline( $desc, $pu_ht, - GETPOST('qty'), + $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, - GETPOST('remise_percent'), + $remise_percent, $price_base_type, $pu_ttc, $info_bits, @@ -854,7 +874,6 @@ else if ($action == "addline" && $user->rights->propal->creer) unset($_POST['qty']); unset($_POST['type']); - unset($_POST['idprod']); unset($_POST['remise_percent']); unset($_POST['price_ht']); unset($_POST['price_ttc']); @@ -866,10 +885,16 @@ else if ($action == "addline" && $user->rights->propal->creer) unset($_POST['buying_price']); unset($_POST['np_marginRate']); unset($_POST['np_markRate']); - - // old method - unset($_POST['np_desc']); unset($_POST['dp_desc']); + + unset($_POST['idprod']); + unset($_POST['qty_predef']); + unset($_POST['remise_percent_predef']); + unset($_POST['fournprice_predef']); + unset($_POST['buying_price_predef']); + unset($_POST['np_marginRate_predef']); + unset($_POST['np_markRate_predef']); + unset($_POST['np_desc']); } else { @@ -1162,7 +1187,7 @@ else if ($action == 'update_extras') $ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute')); if($ret < 0) $error++; - if (! $error) + if (! $error) { // Actions on extra fields (by external module or standard code) // FIXME le hook fait double emploi avec le trigger !! @@ -1179,7 +1204,7 @@ else if ($action == 'update_extras') } else if ($reshook < 0) $error++; } - + if ($error) $action = 'edit_extras'; } @@ -1924,11 +1949,11 @@ else print ''; print ''; print ''; - + print $extrafields->showInputField($key,$value); - + print ''; - + print ''; } else @@ -2003,15 +2028,25 @@ else * Lines */ + // Show object lines + $result = $object->getLinesArray(); + + + print ' + + + + + '; + + if (! empty($conf->use_javascript_ajax) && $object->statut == 0) { include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; } - print '
'.$langs->trans("ThirdPartyName").''; - $object->next_prev_filter="te.client in (1,3)"; + $object->next_prev_filter="te.client in (1,2,3)"; print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','',''); print '
'; + print '
'; - // Show object lines - $result = $object->getLinesArray(); if (! empty($object->lines)) $ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1); @@ -2047,8 +2082,9 @@ else print '
'; - print ''; - print "\n"; + print "\n"; + + dol_fiche_end(); if ($action == 'statut') { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 0e390697a80..de67b9c78de 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -355,9 +355,9 @@ class Propal 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. - + $localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc); - + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, '', $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; @@ -510,9 +510,9 @@ class Propal 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. - + $localtaxes_type=getLocalTaxesFromRate($txtva,0,$mysoc); - + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type,'', $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; @@ -551,7 +551,7 @@ class Propal extends CommonObject $this->line->localtax1_tx = $txlocaltax1; $this->line->localtax2_tx = $txlocaltax2; $this->line->localtax1_type = $localtaxes_type[0]; - $this->line->localtax2_type = $localtaxes_type[2]; + $this->line->localtax2_type = $localtaxes_type[2]; $this->line->remise_percent = $remise_percent; $this->line->subprice = $pu; $this->line->info_bits = $info_bits; @@ -1318,7 +1318,7 @@ class Propal extends CommonObject } // Fin appel triggers } - + if (! $error) { // Rename directory if dir was a temporary ref @@ -1333,17 +1333,17 @@ class Propal extends CommonObject if (file_exists($dirsource)) { dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); - + if (@rename($dirsource, $dirdest)) { - + dol_syslog("Rename ok"); // Deleting old PDF in new rep dol_delete_file($conf->propal->dir_output.'/'.$snumfa.'/'.$facref.'*.*'); } } } - + $this->brouillon=0; $this->statut = 1; $this->user_valid_id=$user->id; @@ -1710,7 +1710,7 @@ class Propal extends CommonObject { if ($statut == 2) { - // Classe la société rattachée comme client + // The connected company is classified as a client $soc=new Societe($this->db); $soc->id = $this->socid; $result=$soc->set_as_client(); diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 6e05813f7f3..123e42696ac 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -22,7 +22,7 @@ /** * \file htdocs/comm/propal/document.php * \ingroup propale - * \brief Page de gestion des documents attaches a une proposition commerciale + * \brief Management page of documents attached to a business proposal */ require '../../main.inc.php'; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 804bd388526..27503790375 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -269,7 +269,7 @@ class Commande extends CommonOrder if (preg_match('/^[\(]?PROV/i', $this->ref)) { // On renomme repertoire ($this->ref = ancienne ref, $numfa = nouvelle ref) - // afin de ne pas perdre les fichiers attaches + // in order not to lose the attachments $comref = dol_sanitizeFileName($this->ref); $snum = dol_sanitizeFileName($num); $dirsource = $conf->commande->dir_output.'/'.$comref; diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 596759d44af..17e041adaf5 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -22,7 +22,7 @@ /** * \file htdocs/commande/document.php * \ingroup order - * \brief Documents setup page attached to an order + * \brief Management page of documents attached to an order */ require '../main.inc.php'; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 697d47c78bf..d40d8bf5a7c 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -323,7 +323,7 @@ else if ($action == 'add' && $user->rights->commande->creer) $lines[$i]->fetch_optionals($lines[$i]->rowid); $array_option=$lines[$i]->array_options; } - + $result = $object->addline( $desc, $lines[$i]->subprice, @@ -564,18 +564,37 @@ else if ($action == 'setnote_private' && $user->rights->commande->creer) if ($result < 0) dol_print_error($db,$object->error); } -/* - * Ajout d'une ligne produit dans la commande -*/ +// Add a new line else if ($action == 'addline' && $user->rights->commande->creer) { $langs->load('errors'); $error = false; - $idprod=GETPOST('idprod', 'int'); - $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); - $price_ht = GETPOST('price_ht'); - $tva_tx = (GETPOST('tva_tx')?GETPOST('tva_tx'):0); + // Set if we used free entry or predefined product + if (GETPOST('addline_libre')) + { + $predef=''; + $idprod=0; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + if (GETPOST('addline_predefined')) + { + $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):'')); + $price_ht = ''; + $tva_tx = ''; + } + if (GETPOST('usenewaddlineform')) { + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); //Extrafields $extrafieldsline = new ExtraFields($db); @@ -591,7 +610,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) } } - if ((empty($idprod) || GETPOST('usenewaddlineform')) && ($price_ht < 0) && (GETPOST('qty') < 0)) + if ((empty($idprod) || GETPOST('usenewaddlineform')) && ($price_ht < 0) && ($qty < 0)) { setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors'); $error = true; @@ -606,7 +625,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); $error++; } - if (! GETPOST('qty') && GETPOST('qty') == '') + if ($qty == '') { setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors'); $error = true; @@ -617,10 +636,9 @@ else if ($action == 'addline' && $user->rights->commande->creer) $error = true; } - if (! $error && (GETPOST('qty') >= 0) && (! empty($product_desc) || ! empty($idprod))) + if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { // Clean parameters - $predef=((! empty($idprod) && $conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); $date_start=dol_mktime(0, 0, 0, GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_end=dol_mktime(0, 0, 0, GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); @@ -737,8 +755,8 @@ else if ($action == 'addline' && $user->rights->commande->creer) } // Margin - $fournprice=(GETPOST('fournprice')?GETPOST('fournprice'):''); - $buyingprice=(GETPOST('buying_price')?GETPOST('buying_price'):''); + $fournprice=(GETPOST('fournprice'.$predef)?GETPOST('fournprice'.$predef):''); + $buyingprice=(GETPOST('buying_price'.$predef)?GETPOST('buying_price'.$predef):''); // Local Taxes $localtax1_tx= get_localtax($tva_tx, 1, $object->client); @@ -749,7 +767,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) $info_bits=0; if ($tva_npr) $info_bits |= 0x01; - if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) + if (! empty($price_min) && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))) { $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); @@ -760,12 +778,12 @@ else if ($action == 'addline' && $user->rights->commande->creer) $result = $object->addline( $desc, $pu_ht, - GETPOST('qty'), + $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, - GETPOST('remise_percent'), + $remise_percent, $info_bits, 0, $price_base_type, @@ -803,7 +821,6 @@ else if ($action == 'addline' && $user->rights->commande->creer) unset($_POST['qty']); unset($_POST['type']); - unset($_POST['idprod']); unset($_POST['remise_percent']); unset($_POST['price_ht']); unset($_POST['price_ttc']); @@ -815,10 +832,16 @@ else if ($action == 'addline' && $user->rights->commande->creer) unset($_POST['buying_price']); unset($_POST['np_marginRate']); unset($_POST['np_markRate']); - - // old method - unset($_POST['np_desc']); unset($_POST['dp_desc']); + + unset($_POST['idprod']); + unset($_POST['qty_predef']); + unset($_POST['remise_percent_predef']); + unset($_POST['fournprice_predef']); + unset($_POST['buying_price_predef']); + unset($_POST['np_marginRate_predef']); + unset($_POST['np_markRate_predef']); + unset($_POST['np_desc']); } else { @@ -1182,7 +1205,7 @@ else if ($action == 'update_extras') $ret = $extrafields->setOptionalsFromPost($extralabels,$object,GETPOST('attribute')); if($ret < 0) $error++; - if (! $error) + if (! $error) { // Actions on extra fields (by external module or standard code) // FIXME le hook fait double emploi avec le trigger !! @@ -1199,7 +1222,7 @@ else if ($action == 'update_extras') } else if ($reshook < 0) $error++; } - + if ($error) $action = 'edit_extras'; } @@ -1449,7 +1472,7 @@ if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->righ /* * View -*/ + */ llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); @@ -1460,9 +1483,9 @@ $formorder = new FormOrder($db); /********************************************************************* * -* Mode creation -* -*********************************************************************/ + * Mode creation + * + *********************************************************************/ if ($action == 'create' && $user->rights->commande->creer) { print_fiche_titre($langs->trans('CreateOrder')); @@ -1506,7 +1529,7 @@ if ($action == 'create' && $user->rights->commande->creer) $objectsrc->fetch($originid); if (empty($objectsrc->lines) && method_exists($objectsrc,'fetch_lines')) $objectsrc->fetch_lines(); $objectsrc->fetch_thirdparty(); - + //Replicate extrafields $objectsrc->fetch_optionals($originid); $object->array_options=$objectsrc->array_options; @@ -2311,25 +2334,34 @@ else /* * Lines - */ + */ $result = $object->getLinesArray(); - $numlines = count($object->lines); + + print '
+ + + + + '; + if (! empty($conf->use_javascript_ajax) && $object->statut == 0) { include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; } - print ''; + print '
'; // Show object lines if (! empty($object->lines)) $ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1); + $numlines = count($object->lines); + /* * Form to add new line - */ + */ if ($object->statut == 0 && $user->rights->commande->creer) { if ($action != 'editline') @@ -2359,7 +2391,10 @@ else } } print '
'; - print ''; + + print "
\n"; + + dol_fiche_end(); /* diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 909417d0e71..21d68d42663 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -65,28 +65,26 @@ llxHeader('',$langs->trans("TaxAndDividendsArea")); $title=$langs->trans("TaxAndDividendsArea"); if ($_GET["mode"] == 'sconly') $title=$langs->trans("SocialContributionsPayments"); -print_fiche_titre($title,($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":"")); +$param=''; +if (GETPOST("mode") == 'sconly') $param='&mode=sconly'; +if ($sortfield) $param.='&sortfield='.$sortfield; +if ($sortorder) $param.='&sortorder='.$sortorder; -if ($_GET["mode"] != 'sconly') +print_fiche_titre($title, ($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":"")); + +if ($year) $param.='&year='.$year; + +// Social contributions only +if (GETPOST("mode") != 'sconly') { print $langs->trans("DescTaxAndDividendsArea").'
'; print "
"; -} - -// Social contributions -if ($_GET["mode"] != 'sconly') -{ - print_titre($langs->trans("SocialContributionsPayments")); -} - -if ($_GET["mode"] == 'sconly') -{ - $param='&mode=sconly'; + print_fiche_titre($langs->trans("SocialContributionsPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); } print ''; -print ""; +print ''; print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"cs.date_ech","",$param,'width="120"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"c.libelle","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"cs.fk_type","",$param,'',$sortfield,$sortorder); @@ -110,10 +108,10 @@ if ($year > 0) // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance, // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire $sql .= " (cs.periode IS NOT NULL AND cs.periode between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; - $sql .= "OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; + $sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; $sql .= ")"; } -$sql.= $db->order($sortfield,$sortorder); +if (! preg_match('/^pv/',$sortfield)) $sql.= $db->order($sortfield,$sortorder); //$sql.= $db->plimit($limit+1,$offset); //print $sql; @@ -184,18 +182,18 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') $tva = new Tva($db); - print_titre($langs->trans("VATPayments")); + print_fiche_titre($langs->trans("VATPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); - $sql = "SELECT f.rowid, f.amount, f.label, f.datev as dm"; - $sql.= " FROM ".MAIN_DB_PREFIX."tva as f "; - $sql.= " WHERE f.entity = ".$conf->entity; + $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm"; + $sql.= " FROM ".MAIN_DB_PREFIX."tva as pv"; + $sql.= " WHERE pv.entity = ".$conf->entity; if ($year > 0) { // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance, // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire - $sql.= " AND f.datev between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; + $sql.= " AND pv.datev between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } - $sql.= " ORDER BY dm DESC"; + if (preg_match('/^pv/',$sortfield)) $sql.= $db->order($sortfield,$sortorder); $result = $db->query($sql); if ($result) @@ -205,12 +203,12 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') $total = 0 ; print '
'; print ''; - print ''; - print ""; - print '"; - print '"; - print '"; - print '"; + print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"pv.datev","",$param,'width="120"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"pv.label","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"pv.rowid","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"pv.datev","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"pv.amount","",$param,'align="right"',$sortfield,$sortorder); print "\n"; $var=1; while ($i < $num) @@ -227,12 +225,13 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') print '"; + // Ref payment $tva_static->id=$obj->rowid; $tva_static->ref=$obj->rowid; - print '\n"; + print '\n"; print '\n"; - print ""; + print '"; print "\n"; $i++; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 7e1eb0d7445..293796c77a5 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1128,10 +1128,31 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $langs->load('errors'); $error = 0; - $idprod=GETPOST('idprod', 'int'); - $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); - $price_ht = GETPOST('price_ht'); - $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + // Set if we used free entry or predefined product + if (GETPOST('addline_libre')) + { + $predef=''; + $idprod=0; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + if (GETPOST('addline_predefined')) + { + $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):'')); + $price_ht = ''; + $tva_tx = ''; + } + if (GETPOST('usenewaddlineform')) { + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); //Extrafields $extrafieldsline = new ExtraFields($db); @@ -1146,7 +1167,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- } } - if ((empty($idprod) || GETPOST('usenewaddlineform')) && ($price_ht < 0) && (GETPOST('qty') < 0)) + if ((empty($idprod) || GETPOST('usenewaddlineform')) && ($price_ht < 0) && ($qty < 0)) { setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors'); $error++; @@ -1161,7 +1182,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); $error++; } - if (! GETPOST('qty') && GETPOST('qty') == '') + if ($qty == '') { setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors'); $error++; @@ -1172,7 +1193,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $error++; } - if (! $error && (GETPOST('qty') >= 0) && (! empty($product_desc) || ! empty($idprod))) + if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { $ret=$object->fetch($id); if ($ret < 0) @@ -1183,7 +1204,6 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $ret=$object->fetch_thirdparty(); // Clean parameters - $predef=((! empty($idprod) && $conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); $date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); @@ -1304,8 +1324,8 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- } // Margin - $fournprice=(GETPOST('fournprice')?GETPOST('fournprice'):''); - $buyingprice=(GETPOST('buying_price')?GETPOST('buying_price'):''); + $fournprice=(GETPOST('fournprice'.$predef)?GETPOST('fournprice'.$predef):''); + $buyingprice=(GETPOST('buying_price'.$predef)?GETPOST('buying_price'.$predef):''); // Local Taxes $localtax1_tx= get_localtax($tva_tx, 1, $object->client); @@ -1314,7 +1334,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $info_bits=0; if ($tva_npr) $info_bits |= 0x01; - if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) + if (! empty($price_min) && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))) { $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); @@ -1325,12 +1345,12 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $result = $object->addline( $desc, $pu_ht, - GETPOST('qty'), + $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, - GETPOST('remise_percent'), + $remise_percent, $date_start, $date_end, 0, @@ -1370,7 +1390,6 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- unset($_POST['qty']); unset($_POST['type']); - unset($_POST['idprod']); unset($_POST['remise_percent']); unset($_POST['price_ht']); unset($_POST['price_ttc']); @@ -1382,10 +1401,16 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- unset($_POST['buying_price']); unset($_POST['np_marginRate']); unset($_POST['np_markRate']); - - // old method - unset($_POST['np_desc']); unset($_POST['dp_desc']); + + unset($_POST['idprod']); + unset($_POST['qty_predef']); + unset($_POST['remise_percent_predef']); + unset($_POST['fournprice_predef']); + unset($_POST['buying_price_predef']); + unset($_POST['np_marginRate_predef']); + unset($_POST['np_markRate_predef']); + unset($_POST['np_desc']); } else { @@ -1397,7 +1422,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- } } -else if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save'] == $langs->trans('Save')) +elseif ($action == 'updateligne' && $user->rights->facture->creer && $_POST['save'] == $langs->trans('Save')) { if (! $object->fetch($id) > 0) dol_print_error($db); $object->fetch_thirdparty(); @@ -2388,9 +2413,9 @@ if ($action == 'create') print ''; $newclassname=$classname; - if ($newclassname == 'Propal') $newclassname = 'CommercialProposal'; - elseif ($newclassname == 'Commande') $newclassname = 'Order'; - elseif ($newclassname == 'Expedition') $newclassname = 'Sending'; + if ($newclassname == 'Propal') $newclassname = 'CommercialProposal'; + elseif ($newclassname == 'Commande') $newclassname = 'Order'; + elseif ($newclassname == 'Expedition') $newclassname = 'Sending'; print ''; print ''; @@ -2491,1463 +2516,1468 @@ else if ($id > 0 || ! empty($ref)) { /* * Show object in view mode - */ + */ $result=$object->fetch($id,$ref); + if ($result <= 0) { dol_print_error($db, $object->error); exit; } // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); - if ($result > 0) + if ($user->societe_id>0 && $user->societe_id!=$object->socid) accessforbidden('',0); + + $result=$object->fetch_thirdparty(); + + $soc = new Societe($db); + $soc->fetch($object->socid); + $selleruserevenustamp=$mysoc->useRevenueStamp(); + + $totalpaye = $object->getSommePaiement(); + $totalcreditnotes = $object->getSumCreditNotesUsed(); + $totaldeposits = $object->getSumDepositsUsed(); + //print "totalpaye=".$totalpaye." totalcreditnotes=".$totalcreditnotes." totaldeposts=".$totaldeposits." selleruserrevenuestamp=".$selleruserevenustamp; + + // We can also use bcadd to avoid pb with floating points + // For example print 239.2 - 229.3 - 9.9; does not return 0. + //$resteapayer=bcadd($object->total_ttc,$totalpaye,$conf->global->MAIN_MAX_DECIMALS_TOT); + //$resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT); + $resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits,'MT'); + + if ($object->paye) $resteapayer=0; + $resteapayeraffiche=$resteapayer; + + if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - if ($user->societe_id>0 && $user->societe_id!=$object->socid) accessforbidden('',0); + $filterabsolutediscount="fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + $filtercreditnote="fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + } + else + { + $filterabsolutediscount="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')"; + $filtercreditnote="fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'"; + } - $result=$object->fetch_thirdparty(); + $absolute_discount=$soc->getAvailableDiscounts('',$filterabsolutediscount); + $absolute_creditnote=$soc->getAvailableDiscounts('',$filtercreditnote); + $absolute_discount=price2num($absolute_discount,'MT'); + $absolute_creditnote=price2num($absolute_creditnote,'MT'); - $soc = new Societe($db); - $soc->fetch($object->socid); - $selleruserevenustamp=$mysoc->useRevenueStamp(); + $author = new User($db); + if ($object->user_author) + { + $author->fetch($object->user_author); + } - $totalpaye = $object->getSommePaiement(); - $totalcreditnotes = $object->getSumCreditNotesUsed(); - $totaldeposits = $object->getSumDepositsUsed(); - //print "totalpaye=".$totalpaye." totalcreditnotes=".$totalcreditnotes." totaldeposts=".$totaldeposits." selleruserrevenuestamp=".$selleruserevenustamp; + $objectidnext=$object->getIdReplacingInvoice(); - // We can also use bcadd to avoid pb with floating points - // For example print 239.2 - 229.3 - 9.9; does not return 0. - //$resteapayer=bcadd($object->total_ttc,$totalpaye,$conf->global->MAIN_MAX_DECIMALS_TOT); - //$resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT); - $resteapayer = price2num($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits,'MT'); + $head = facture_prepare_head($object); - if ($object->paye) $resteapayer=0; - $resteapayeraffiche=$resteapayer; + dol_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer'), 0, 'bill'); - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) + $formconfirm=''; + + // Confirmation de la conversion de l'avoir en reduc + if ($action == 'converttoreduc') + { + $text=$langs->trans('ConfirmConvertToReduc'); + $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('ConvertToReduc'),$text,'confirm_converttoreduc','',"yes",2); + } + + // Confirmation to delete invoice + if ($action == 'delete') + { + $text=$langs->trans('ConfirmDeleteBill',$object->ref); + $formquestion=array(); + + $qualified_for_stock_change=0; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { - $filterabsolutediscount="fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice - $filtercreditnote="fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice + $qualified_for_stock_change=$object->hasProductsOrServices(2); } else { - $filterabsolutediscount="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')"; - $filtercreditnote="fk_facture_source IS NOT NULL AND description <> '(DEPOSIT)'"; + $qualified_for_stock_change=$object->hasProductsOrServices(1); } - $absolute_discount=$soc->getAvailableDiscounts('',$filterabsolutediscount); - $absolute_creditnote=$soc->getAvailableDiscounts('',$filtercreditnote); - $absolute_discount=price2num($absolute_discount,'MT'); - $absolute_creditnote=price2num($absolute_creditnote,'MT'); - - $author = new User($db); - if ($object->user_author) + if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change && $object->statut>=1) { - $author->fetch($object->user_author); + $langs->load("stocks"); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct=new FormProduct($db); + $label=$object->type==2?$langs->trans("SelectWarehouseForStockDecrease"):$langs->trans("SelectWarehouseForStockIncrease"); + $formquestion=array( + //'text' => $langs->trans("ConfirmClone"), + //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1,0,0,$langs->trans("NoStockAction")))); + $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete',$formquestion,"yes",1); + }else { + $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete','','',1); } + } - $objectidnext=$object->getIdReplacingInvoice(); - - $head = facture_prepare_head($object); - - dol_fiche_head($head, 'compta', $langs->trans('InvoiceCustomer'), 0, 'bill'); - - $formconfirm=''; - - // Confirmation de la conversion de l'avoir en reduc - if ($action == 'converttoreduc') + // Confirmation de la validation + if ($action == 'valid') + { + // on verifie si l'objet est en numerotation provisoire + $objectref = substr($object->ref, 1, 4); + if ($objectref == 'PROV') { - $text=$langs->trans('ConfirmConvertToReduc'); - $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('ConvertToReduc'),$text,'confirm_converttoreduc','',"yes",2); - } - - // Confirmation to delete invoice - if ($action == 'delete') - { - $text=$langs->trans('ConfirmDeleteBill',$object->ref); - $formquestion=array(); - - $qualified_for_stock_change=0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) + $savdate=$object->date; + if (! empty($conf->global->FAC_FORCE_DATE_VALIDATION)) { - $qualified_for_stock_change=$object->hasProductsOrServices(2); - } - else - { - $qualified_for_stock_change=$object->hasProductsOrServices(1); + $object->date=dol_now(); + $object->date_lim_reglement=$object->calculate_date_lim_reglement(); } + $numref = $object->getNextNumRef($soc); + //$object->date=$savdate; + } + else + { + $numref = $object->ref; + } - if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change && $object->statut>=1) - { - $langs->load("stocks"); - require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; - $formproduct=new FormProduct($db); + $text=$langs->trans('ConfirmValidateBill',$numref); + if (! empty($conf->notification->enabled)) + { + require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; + $notify=new Notify($db); + $text.='
'; + $text.=$notify->confirmMessage('BILL_VALIDATE',$object->socid); + } + $formquestion=array(); + + $qualified_for_stock_change=0; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) + { + $qualified_for_stock_change=$object->hasProductsOrServices(2); + } + else + { + $qualified_for_stock_change=$object->hasProductsOrServices(1); + } + + if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) + { + $langs->load("stocks"); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; + $formproduct=new FormProduct($db); + $warehouse = new Entrepot($db); + $warehouse_array = $warehouse->list_array(); + if (count($warehouse_array) == 1) { + $label = $object->type==2?$langs->trans("WarehouseForStockIncrease", current($warehouse_array)):$langs->trans("WarehouseForStockDecrease", current($warehouse_array)); + $value = ''; + } else { + $label = $object->type==2?$langs->trans("SelectWarehouseForStockIncrease"):$langs->trans("SelectWarehouseForStockDecrease"); + $value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1); + } + $formquestion=array( + //'text' => $langs->trans("ConfirmClone"), + //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value)); + } + if ($object->type != 2 && $object->total_ttc < 0) // Can happen only if $conf->global->FACTURE_ENABLE_NEGATIVE is on + { + $text.='
'.img_warning().' '.$langs->trans("ErrorInvoiceOfThisTypeMustBePositive"); + } + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ValidateBill'),$text,'confirm_valid',$formquestion,(($object->type != 2 && $object->total_ttc < 0)?"no":"yes"),($conf->notification->enabled?0:2)); + } + + // Confirm back to draft status + if ($action == 'modif') + { + $text=$langs->trans('ConfirmUnvalidateBill',$object->ref); + $formquestion=array(); + + $qualified_for_stock_change=0; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) + { + $qualified_for_stock_change=$object->hasProductsOrServices(2); + } + else + { + $qualified_for_stock_change=$object->hasProductsOrServices(1); + } + if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) + { + $langs->load("stocks"); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; + $formproduct=new FormProduct($db); + $warehouse = new Entrepot($db); + $warehouse_array = $warehouse->list_array(); + if (count($warehouse_array) == 1) { + $label = $object->type==2?$langs->trans("WarehouseForStockDecrease", current($warehouse_array)):$langs->trans("WarehouseForStockIncrease", current($warehouse_array)); + $value = ''; + } else { $label=$object->type==2?$langs->trans("SelectWarehouseForStockDecrease"):$langs->trans("SelectWarehouseForStockIncrease"); - $formquestion=array( - //'text' => $langs->trans("ConfirmClone"), - //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1,0,0,$langs->trans("NoStockAction")))); - $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete',$formquestion,"yes",1); - }else { - $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete','','',1); + $value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1); } + $formquestion=array( + //'text' => $langs->trans("ConfirmClone"), + //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value)); } - // Confirmation de la validation - if ($action == 'valid') + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('UnvalidateBill'),$text,'confirm_modif',$formquestion,"yes",1); + } + + // Confirmation du classement paye + if ($action == 'paid' && $resteapayer <= 0) + { + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidBill',$object->ref),'confirm_paid','',"yes",1); + } + if ($action == 'paid' && $resteapayer > 0) + { + // Code + $i=0; + $close[$i]['code']='discount_vat';$i++; + $close[$i]['code']='badcustomer';$i++; + // Help + $i=0; + $close[$i]['label']=$langs->trans("HelpEscompte").'

'.$langs->trans("ConfirmClassifyPaidPartiallyReasonDiscountVatDesc");$i++; + $close[$i]['label']=$langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc");$i++; + // Texte + $i=0; + $close[$i]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat",$resteapayer,$langs->trans("Currency".$conf->currency)),$close[$i]['label'],1);$i++; + $close[$i]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$resteapayer,$langs->trans("Currency".$conf->currency)),$close[$i]['label'],1);$i++; + // arrayreasons[code]=reason + foreach($close as $key => $val) { - // on verifie si l'objet est en numerotation provisoire - $objectref = substr($object->ref, 1, 4); - if ($objectref == 'PROV') - { - $savdate=$object->date; - if (! empty($conf->global->FAC_FORCE_DATE_VALIDATION)) - { - $object->date=dol_now(); - $object->date_lim_reglement=$object->calculate_date_lim_reglement(); - } - $numref = $object->getNextNumRef($soc); - //$object->date=$savdate; - } - else - { - $numref = $object->ref; - } - - $text=$langs->trans('ConfirmValidateBill',$numref); - if (! empty($conf->notification->enabled)) - { - require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; - $notify=new Notify($db); - $text.='
'; - $text.=$notify->confirmMessage('BILL_VALIDATE',$object->socid); - } - $formquestion=array(); - - $qualified_for_stock_change=0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change=$object->hasProductsOrServices(2); - } - else - { - $qualified_for_stock_change=$object->hasProductsOrServices(1); - } - - if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) - { - $langs->load("stocks"); - require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; - $formproduct=new FormProduct($db); - $warehouse = new Entrepot($db); - $warehouse_array = $warehouse->list_array(); - if (count($warehouse_array) == 1) { - $label = $object->type==2?$langs->trans("WarehouseForStockIncrease", current($warehouse_array)):$langs->trans("WarehouseForStockDecrease", current($warehouse_array)); - $value = ''; - } else { - $label = $object->type==2?$langs->trans("SelectWarehouseForStockIncrease"):$langs->trans("SelectWarehouseForStockDecrease"); - $value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1); - } - $formquestion=array( - //'text' => $langs->trans("ConfirmClone"), - //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value)); - } - if ($object->type != 2 && $object->total_ttc < 0) // Can happen only if $conf->global->FACTURE_ENABLE_NEGATIVE is on - { - $text.='
'.img_warning().' '.$langs->trans("ErrorInvoiceOfThisTypeMustBePositive"); - } - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ValidateBill'),$text,'confirm_valid',$formquestion,(($object->type != 2 && $object->total_ttc < 0)?"no":"yes"),($conf->notification->enabled?0:2)); + $arrayreasons[$close[$key]['code']]=$close[$key]['reason']; } - // Confirm back to draft status - if ($action == 'modif') + // Cree un tableau formulaire + $formquestion=array( + 'text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"), + array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), + array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100') + ); + // Paiement incomplet. On demande si motif = escompte ou autre + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidPartially',$object->ref),'confirm_paid_partially',$formquestion,"yes"); + } + + // Confirmation du classement abandonne + if ($action == 'canceled') + { + // S'il y a une facture de remplacement pas encore validee (etat brouillon), + // on ne permet pas de classer abandonner la facture. + if ($objectidnext) { - $text=$langs->trans('ConfirmUnvalidateBill',$object->ref); - $formquestion=array(); - - $qualified_for_stock_change=0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change=$object->hasProductsOrServices(2); - } - else - { - $qualified_for_stock_change=$object->hasProductsOrServices(1); - } - if ($object->type != 3 && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) - { - $langs->load("stocks"); - require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; - $formproduct=new FormProduct($db); - $warehouse = new Entrepot($db); - $warehouse_array = $warehouse->list_array(); - if (count($warehouse_array) == 1) { - $label = $object->type==2?$langs->trans("WarehouseForStockDecrease", current($warehouse_array)):$langs->trans("WarehouseForStockIncrease", current($warehouse_array)); - $value = ''; - } else { - $label=$object->type==2?$langs->trans("SelectWarehouseForStockDecrease"):$langs->trans("SelectWarehouseForStockIncrease"); - $value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1); - } - $formquestion=array( - //'text' => $langs->trans("ConfirmClone"), - //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value)); - } - - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('UnvalidateBill'),$text,'confirm_modif',$formquestion,"yes",1); + $facturereplacement=new Facture($db); + $facturereplacement->fetch($objectidnext); + $statusreplacement=$facturereplacement->statut; } - - // Confirmation du classement paye - if ($action == 'paid' && $resteapayer <= 0) + if ($objectidnext && $statusreplacement == 0) { - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidBill',$object->ref),'confirm_paid','',"yes",1); + print '
'.$langs->trans("ErrorCantCancelIfReplacementInvoiceNotValidated").'
'; } - if ($action == 'paid' && $resteapayer > 0) + else { // Code - $i=0; - $close[$i]['code']='discount_vat';$i++; - $close[$i]['code']='badcustomer';$i++; + $close[1]['code']='badcustomer'; + $close[2]['code']='abandon'; // Help - $i=0; - $close[$i]['label']=$langs->trans("HelpEscompte").'

'.$langs->trans("ConfirmClassifyPaidPartiallyReasonDiscountVatDesc");$i++; - $close[$i]['label']=$langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc");$i++; + $close[1]['label']=$langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); + $close[2]['label']=$langs->trans("ConfirmClassifyAbandonReasonOtherDesc"); // Texte - $i=0; - $close[$i]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscountVat",$resteapayer,$langs->trans("Currency".$conf->currency)),$close[$i]['label'],1);$i++; - $close[$i]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$resteapayer,$langs->trans("Currency".$conf->currency)),$close[$i]['label'],1);$i++; - // arrayreasons[code]=reason - foreach($close as $key => $val) - { - $arrayreasons[$close[$key]['code']]=$close[$key]['reason']; - } + $close[1]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$object->ref),$close[1]['label'],1); + $close[2]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"),$close[2]['label'],1); + // arrayreasons + $arrayreasons[$close[1]['code']]=$close[1]['reason']; + $arrayreasons[$close[2]['code']]=$close[2]['reason']; // Cree un tableau formulaire $formquestion=array( - 'text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"), + 'text' => $langs->trans("ConfirmCancelBillQuestion"), array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100') ); - // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidPartially',$object->ref),'confirm_paid_partially',$formquestion,"yes"); - } - // Confirmation du classement abandonne - if ($action == 'canceled') + $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$object->ref),'confirm_canceled',$formquestion,"yes"); + } + } + + // Confirmation de la suppression d'une ligne produit + if ($action == 'ask_deleteline') + { + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); + } + + // Clone confirmation + if ($action == 'clone') + { + // Create an array for form + $formquestion=array( + //'text' => $langs->trans("ConfirmClone"), + //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) + ); + // Paiement incomplet. On demande si motif = escompte ou autre + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes',1); + } + + if (! $formconfirm) + { + $parameters=array('lineid'=>$lineid); + $formconfirm=$hookmanager->executeHooks('formConfirm',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + } + + // Print form confirm + print $formconfirm; + + + + + // Invoice content + + print '
'.$langs->trans("PeriodEndDate").'".$langs->trans("Label")."'.$langs->trans("ExpectedToPay")."'.$langs->trans("RefPayment")."'.$langs->trans("DatePayment")."'.$langs->trans("PayedByThisPayment")."
'.price($obj->amount)."'.$tva_static->getNomUrl(1)."'.$tva_static->getNomUrl(1)."'.dol_print_date($db->jdate($obj->dm),'day')."".price($obj->amount)."'.price($obj->amount)."
'.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).'
'.$langs->trans('TotalHT').''.price($objectsrc->total_ht).'
'; + + $linkback = ''.$langs->trans("BackToList").''; + + // Ref + print ''; + print ''; + + // Ref customer + print ''; + print ''; + + // Third party + print ''; + + // Type + print ''; + + // Relative and absolute discounts + $addrelativediscount=''.$langs->trans("EditRelativeDiscounts").''; + $addabsolutediscount=''.$langs->trans("EditGlobalDiscounts").''; + $addcreditnote=''.$langs->trans("AddCreditNote").''; + + print ''; + print ''; + } - $resteapayeraffiche=$resteapayer; + // Link for paypal payment + if (! empty($conf->paypal->enabled) && $object->statut != 0) + { + include_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; + print showPaypalPaymentUrl('invoice',$object->ref); + } - // Loop on each credit note or deposit amount applied - $creditnoteamount=0; - $depositamount=0; - $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; - $sql.= " re.description, re.fk_facture_source"; - $sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re"; - $sql.= " WHERE fk_facture = ".$object->id; - $resql=$db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - $invoice=new Facture($db); - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $invoice->fetch($obj->fk_facture_source); - print ''; - print ''; - print ''; - $i++; - if ($invoice->type == 2) $creditnoteamount += $obj->amount_ttc; - if ($invoice->type == 3) $depositamount += $obj->amount_ttc; - } - } - else - { - dol_print_error($db); - } + print '
'; - // Paye partiellement 'escompte' - if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'discount_vat') - { - print '
'; - $resteapayeraffiche=0; - } - // Paye partiellement ou Abandon 'badcustomer' - if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'badcustomer') - { - print ''; - //$resteapayeraffiche=0; - } - // Paye partiellement ou Abandon 'product_returned' - if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'product_returned') - { - print ''; - $resteapayeraffiche=0; - } - // Paye partiellement ou Abandon 'abandon' - if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'abandon') - { - print ''; - $resteapayeraffiche=0; - } + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions=new FormActions($db); + $somethingshown=$formactions->showactions($object,'invoice',$socid); - // Billed - print ''; - - // Remainder to pay - print ''; - print ''; - print ''; - } - else // Credit note - { - // Total already paid back - print ''; - - // Billed - print ''; - - // Remainder to pay back - print ''; - print ''; - print ''; - - // Sold credit note - //print ''; - //print ''; - } - - print '
'.$langs->trans('Ref').''; + $morehtmlref=''; + $discount=new DiscountAbsolute($db); + $result=$discount->fetch(0,$object->id); + if ($result > 0) + { + $morehtmlref=' ('.$langs->trans("CreditNoteConvertedIntoDiscount",$discount->getNomUrl(1,'discount')).')'; + } + if ($result < 0) + { + dol_print_error('',$discount->error); + } + print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); + print '
'; + print ''; + if ($action != 'refclient' && ! empty($object->brouillon)) print ''; + print '
'; + print $langs->trans('RefCustomer'); + print ''.img_edit($langs->trans('Modify')).'
'; + print '
'; + if ($user->rights->facture->creer && $action == 'refclient') + { + print '
'; + print ''; + print ''; + print ''; + print ' '; + print '
'; + } + else + { + print $object->ref_client; + } + print '
'; + print ''; + print ''; + print ''; + print '
'.$langs->trans('Company').''; + if (! empty($conf->global->FACTURE_CHANGE_THIRDPARTY) && $action != 'editthirdparty' && $object->brouillon && $user->rights->facture->creer) + print 'id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'
'; + print '
'; + if ($action == 'editthirdparty') + { + $form->form_thirdparty($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,'socid'); + } + else + { + print '  '.$soc->getNomUrl(1,'compta'); + print '   '; + print '('.$langs->trans('OtherBills').''; + // Outstanding Bill + $outstandigBills=$soc->get_OutstandingBill(); + print ' - '.$langs->trans('CurrentOutstandingBill').': '; + print price($outstandigBills,'',$langs,0,0,-1,$conf->currency); + if ($soc->outstanding_limit != '') { - // S'il y a une facture de remplacement pas encore validee (etat brouillon), - // on ne permet pas de classer abandonner la facture. - if ($objectidnext) + if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); + print ' / '.price($soc->outstanding_limit); + } + print ')'; + } + print '
'.$langs->trans('Type').''; + print $object->getLibType(); + if ($object->type == 1) + { + $facreplaced=new Facture($db); + $facreplaced->fetch($object->fk_facture_source); + print ' ('.$langs->transnoentities("ReplaceInvoice",$facreplaced->getNomUrl(1)).')'; + } + if ($object->type == 2) + { + $facusing=new Facture($db); + $facusing->fetch($object->fk_facture_source); + print ' ('.$langs->transnoentities("CorrectInvoice",$facusing->getNomUrl(1)).')'; + } + + $facidavoir=$object->getListIdAvoirFromInvoice(); + if (count($facidavoir) > 0) + { + print ' ('.$langs->transnoentities("InvoiceHasAvoir"); + $i=0; + foreach($facidavoir as $id) + { + if ($i==0) print ' '; + else print ','; + $facavoir=new Facture($db); + $facavoir->fetch($id); + print $facavoir->getNomUrl(1); + } + print ')'; + } + if ($objectidnext > 0) + { + $facthatreplace=new Facture($db); + $facthatreplace->fetch($objectidnext); + print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')'; + } + print '
'.$langs->trans('Discounts'); + print ''; + if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + //print ' ('.$addrelativediscount.')'; + + if ($absolute_discount > 0) + { + print '. '; + if ($object->statut > 0 || $object->type == 2 || $object->type == 3) + { + if ($object->statut == 0) { - $facturereplacement=new Facture($db); - $facturereplacement->fetch($objectidnext); - $statusreplacement=$facturereplacement->statut; - } - if ($objectidnext && $statusreplacement == 0) - { - print '
'.$langs->trans("ErrorCantCancelIfReplacementInvoiceNotValidated").'
'; + print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); + print '. '; } else { - // Code - $close[1]['code']='badcustomer'; - $close[2]['code']='abandon'; - // Help - $close[1]['label']=$langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); - $close[2]['label']=$langs->trans("ConfirmClassifyAbandonReasonOtherDesc"); - // Texte - $close[1]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer",$object->ref),$close[1]['label'],1); - $close[2]['reason']=$form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"),$close[2]['label'],1); - // arrayreasons - $arrayreasons[$close[1]['code']]=$close[1]['reason']; - $arrayreasons[$close[2]['code']]=$close[2]['reason']; - - // Cree un tableau formulaire - $formquestion=array( - 'text' => $langs->trans("ConfirmCancelBillQuestion"), - array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), - array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100') - ); - - $formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$object->ref),'confirm_canceled',$formquestion,"yes"); - } - } - - // Confirmation de la suppression d'une ligne produit - if ($action == 'ask_deleteline') - { - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); - } - - // Clone confirmation - if ($action == 'clone') - { - // Create an array for form - $formquestion=array( - //'text' => $langs->trans("ConfirmClone"), - //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) - ); - // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes',1); - } - - if (! $formconfirm) - { - $parameters=array('lineid'=>$lineid); - $formconfirm=$hookmanager->executeHooks('formConfirm',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - } - - // Print form confirm - print $formconfirm; - - - - - // Invoice content - - print ''; - - $linkback = ''.$langs->trans("BackToList").''; - - // Ref - print ''; - print ''; - - // Ref customer - print ''; - print ''; - - // Third party - print ''; - - // Type - print ''; - - // Relative and absolute discounts - $addrelativediscount=''.$langs->trans("EditRelativeDiscounts").''; - $addabsolutediscount=''.$langs->trans("EditGlobalDiscounts").''; - $addcreditnote=''.$langs->trans("AddCreditNote").''; - - print ''; - - // Date invoice - print ''; + + // Date invoice + print ''; + + + // List of payments + + $sign=1; + if ($object->type == 2) $sign=-1; + + $nbrows=8; $nbcols=2; + if (! empty($conf->projet->enabled)) $nbrows++; + if (! empty($conf->banque->enabled)) $nbcols++; + //if (! empty($soc->outstandingbill)) $nbrows++; + if($mysoc->localtax1_assuj=="1") $nbrows++; + if($mysoc->localtax2_assuj=="1") $nbrows++; + if ($selleruserevenustamp) $nbrows++; + + print ''; + + // Conditions de reglement + print ''; + + // Date payment term + print ''; + + // Payment mode + print ''; + + // Amount + print ''; + print ''; + print ''; + print ''; + + // Amount Local Taxes + if ($mysoc->localtax1_assuj=="1" && $mysoc->useLocalTax(1)) //Localtax1 (example RE) + { + print ''; + print ''; + } + if ($mysoc->localtax2_assuj=="1" && $mysoc->useLocalTax(2)) //Localtax2 (example IRPF) + { + print ''; + print ''; + } + + // Revenue stamp + if ($selleruserevenustamp) // Test company use revenue stamp + { + print ''; + } + // Total with tax + print ''; - // List of payments + // Statut + print ''; + print ''; - $sign=1; - if ($object->type == 2) $sign=-1; + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load('projects'); + print ''; + print ''; - $label=($langs->trans("PaymentType".$objp->payment_code)!=("PaymentType".$objp->payment_code))?$langs->trans("PaymentType".$objp->payment_code):$objp->payment_label; - print ''; - if (! empty($conf->banque->enabled)) + if (! $objectidnext) { - $bankaccountstatic->id=$objp->baid; - $bankaccountstatic->ref=$objp->ref; - $bankaccountstatic->label=$objp->ref; - print ''; + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate) + { + print ''; + } + else + { + print '
'.$langs->trans('Modify').'
'; + } } - print ''; - print ''; - print ''; - $i++; + else + { + print '
'.$langs->trans('Modify').'
'; + } + } + } + + // Reopen a standard paid invoice + if (($object->type == 0 || $object->type == 1) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely) + { + if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice + { + print ''; + } + else + { + print '
'.$langs->trans('ReOpen').'
'; + } + } + + // Validate + if ($object->statut == 0 && count($object->lines) > 0 && + ( + (($object->type == 0 || $object->type == 1 || $object->type == 3 || $object->type == 4) && (! empty($conf->global->FACTURE_ENABLE_NEGATIVE) || $object->total_ttc >= 0)) + || ($object->type == 2 && $object->total_ttc <= 0)) + ) + { + if ($user->rights->facture->valider) + { + print ''; + } + } + + // Send by mail + if (($object->statut == 1 || $object->statut == 2)) + { + if ($objectidnext) + { + print '
'.$langs->trans('SendByMail').'
'; + } + else + { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) + { + print ''; + } + else print ''; + } + } + + if (! empty($conf->global->FACTURE_SHOW_SEND_REMINDER)) // For backward compatibility + { + if (($object->statut == 1 || $object->statut == 2) && $resteapayer > 0) + { + if ($objectidnext) + { + print '
'.$langs->trans('SendRemindByMail').'
'; + } + else + { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) + { + print ''; + } + else print ''; + } + } + } + + // Create payment + if ($object->type != 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) + { + if ($objectidnext) + { + print '
'.$langs->trans('DoPayment').'
'; + } + else + { + if ($resteapayer == 0) + { + print '
'.$langs->trans('DoPayment').'
'; + } + else + { + print ''; + } + } + } + + // Reverse back money or convert to reduction + if ($object->type == 2 || $object->type == 3) + { + // For credit note only + if ($object->type == 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) + { + print ''; + } + // For credit note + if ($object->type == 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->creer && $object->getSommePaiement() == 0) + { + print ''; + } + // For deposit invoice + if ($object->type == 3 && $object->statut == 1 && $resteapayer == 0 && $user->rights->facture->creer) + { + print ''; + } + } + + // Classify paid (if not deposit and not credit note. Such invoice are "converted") + if ($object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement && + (($object->type != 2 && $object->type != 3 && $resteapayer <= 0) || ($object->type == 2 && $resteapayer >= 0)) ) + { + print ''; + } + + // Classify 'closed not completely paid' (possible si validee et pas encore classee payee) + if ($object->statut == 1 && $object->paye == 0 && $resteapayer > 0 + && $user->rights->facture->paiement) + { + if ($totalpaye > 0 || $totalcreditnotes > 0) + { + // If one payment or one credit note was linked to this invoice + print ''; + } + else + { + if ($objectidnext) + { + print '
'.$langs->trans('ClassifyCanceled').'
'; + } + else + { + print ''; + } + } + } + + // Clone + if (($object->type == 0 || $object->type == 3 || $object->type == 4) && $user->rights->facture->creer) + { + print ''; + } + + // Clone as predefined + if (($object->type == 0 || $object->type == 3 || $object->type == 4) && $object->statut == 0 && $user->rights->facture->creer) + { + if (! $objectidnext) + { + print ''; + } + } + + // Delete + if ($user->rights->facture->supprimer) + { + if (! $object->is_erasable()) + { + print ''; + } + else if ($objectidnext) + { + print ''; + } + elseif ($object->getSommePaiement()) + { + print ''; + } + else + { + print ''; } } else { - print ''; + print ''; } - //} - $db->free($result); + + print ''; + } + } + print '
'; + + if ($action != 'prerelance' && $action != 'presend') + { + print '
'; + print ''; // ancre + + // Documents generes + $filename=dol_sanitizeFileName($object->ref); + $filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref); + $urlsource=$_SERVER['PHP_SELF'].'?facid='.$object->id; + $genallowed=$user->rights->facture->creer; + $delallowed=$user->rights->facture->supprimer; + + print $formfile->showdocuments('facture',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang); + $somethingshown=$formfile->numoffiles; + + // Linked object block + $somethingshown=$object->showLinkedObjectBlock(); + + if (empty($somethingshown) && $object->statut > 0) + { + print '
'.$langs->trans('LinkedOrder').''; + + print '
'.$langs->trans('Ref').''; - $morehtmlref=''; - $discount=new DiscountAbsolute($db); - $result=$discount->fetch(0,$object->id); - if ($result > 0) - { - $morehtmlref=' ('.$langs->trans("CreditNoteConvertedIntoDiscount",$discount->getNomUrl(1,'discount')).')'; - } - if ($result < 0) - { - dol_print_error('',$discount->error); - } - print $form->showrefnav($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref); - print '
'; - print ''; - if ($action != 'refclient' && ! empty($object->brouillon)) print ''; - print '
'; - print $langs->trans('RefCustomer'); - print ''.img_edit($langs->trans('Modify')).'
'; - print '
'; - if ($user->rights->facture->creer && $action == 'refclient') - { - print '
'; - print ''; - print ''; - print ''; - print ' '; - print '
'; - } - else - { - print $object->ref_client; - } - print '
'; - print ''; - print ''; - print ''; - print '
'.$langs->trans('Company').''; - if (! empty($conf->global->FACTURE_CHANGE_THIRDPARTY) && $action != 'editthirdparty' && $object->brouillon && $user->rights->facture->creer) - print 'id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'
'; - print '
'; - if ($action == 'editthirdparty') - { - $form->form_thirdparty($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,'socid'); - } - else - { - print '  '.$soc->getNomUrl(1,'compta'); - print '   '; - print '('.$langs->trans('OtherBills').''; - // Outstanding Bill - $outstandigBills=$soc->get_OutstandingBill(); - print ' - '.$langs->trans('CurrentOutstandingBill').': '; - print price($outstandigBills,'',$langs,0,0,-1,$conf->currency); - if ($soc->outstanding_limit != '') - { - if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); - print ' / '.price($soc->outstanding_limit); - } - print ')'; - } - print '
'.$langs->trans('Type').''; - print $object->getLibType(); - if ($object->type == 1) - { - $facreplaced=new Facture($db); - $facreplaced->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("ReplaceInvoice",$facreplaced->getNomUrl(1)).')'; - } - if ($object->type == 2) - { - $facusing=new Facture($db); - $facusing->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("CorrectInvoice",$facusing->getNomUrl(1)).')'; - } - - $facidavoir=$object->getListIdAvoirFromInvoice(); - if (count($facidavoir) > 0) - { - print ' ('.$langs->transnoentities("InvoiceHasAvoir"); - $i=0; - foreach($facidavoir as $id) - { - if ($i==0) print ' '; - else print ','; - $facavoir=new Facture($db); - $facavoir->fetch($id); - print $facavoir->getNomUrl(1); - } - print ')'; - } - if ($objectidnext > 0) - { - $facthatreplace=new Facture($db); - $facthatreplace->fetch($objectidnext); - print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')'; - } - print '
'.$langs->trans('Discounts'); - print ''; - if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent); - else print $langs->trans("CompanyHasNoRelativeDiscount"); - //print ' ('.$addrelativediscount.')'; - - if ($absolute_discount > 0) - { - print '. '; - if ($object->statut > 0 || $object->type == 2 || $object->type == 3) - { - if ($object->statut == 0) + if ($object->statut < 1 || $object->type == 2 || $object->type == 3) { - print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); - print '. '; + $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); + print '
'.$text.'.
'; } else { - if ($object->statut < 1 || $object->type == 2 || $object->type == 3) - { - $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); - print '
'.$text.'.
'; - } - else - { - $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); - $text2=$langs->trans("AbsoluteDiscountUse"); - print $form->textwithpicto($text,$text2); - } + $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency)); + $text2=$langs->trans("AbsoluteDiscountUse"); + print $form->textwithpicto($text,$text2); } } - else - { - // Remise dispo de type remise fixe (not credit note) - print '
'; - $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, GETPOST('discountid'), 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount, $resteapayer, ' ('.$addabsolutediscount.')'); - } } else { - if ($absolute_creditnote > 0) // If not, link will be added later - { - if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' ('.$addabsolutediscount.')
'; - else print '. '; - } - else print '. '; + // Remise dispo de type remise fixe (not credit note) + print '
'; + $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, GETPOST('discountid'), 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount, $resteapayer, ' ('.$addabsolutediscount.')'); } - if ($absolute_creditnote > 0) + } + else + { + if ($absolute_creditnote > 0) // If not, link will be added later { - // If validated, we show link "add credit note to payment" - if ($object->statut != 1 || $object->type == 2 || $object->type == 3) - { - if ($object->statut == 0 && $object->type != 3) - { - $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)); - print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse")); - } - else - { - print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)).'.'; - } - } - else - { - // Remise dispo de type avoir - if (! $absolute_discount) print '
'; - //$form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer); - $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0); // We must allow credit not even if amount is higher - } - } - if (! $absolute_discount && ! $absolute_creditnote) - { - print $langs->trans("CompanyHasNoAbsoluteDiscount"); if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' ('.$addabsolutediscount.')
'; else print '. '; } - //if ($object->statut == 0 && $object->type != 2 && $object->type != 3) - // { - //if (! $absolute_discount && ! $absolute_creditnote) print '
'; - //print '   -   '; - //print $addabsolutediscount; - //print '   -   '.$addcreditnote; // We disbale link to credit note - //} - print '
'; - print ''; - if ($object->type != 2 && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; - print '
'; - print $langs->trans('Date'); - print 'id.'">'.img_edit($langs->trans('SetDate'),1).'
'; - print '
'; - - if ($object->type != 2) + else print '. '; + } + if ($absolute_creditnote > 0) + { + // If validated, we show link "add credit note to payment" + if ($object->statut != 1 || $object->type == 2 || $object->type == 3) { - if ($action == 'editinvoicedate') + if ($object->statut == 0 && $object->type != 3) { - $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date,'invoicedate'); + $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)); + print $form->textwithpicto($text,$langs->trans("CreditNoteDepositUse")); } else { - print dol_print_date($object->date,'daytext'); + print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)).'.'; } } else + { + // Remise dispo de type avoir + if (! $absolute_discount) print '
'; + //$form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer); + $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0); // We must allow credit not even if amount is higher + } + } + if (! $absolute_discount && ! $absolute_creditnote) + { + print $langs->trans("CompanyHasNoAbsoluteDiscount"); + if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' ('.$addabsolutediscount.')
'; + else print '. '; + } + //if ($object->statut == 0 && $object->type != 2 && $object->type != 3) + // { + //if (! $absolute_discount && ! $absolute_creditnote) print '
'; + //print '   -   '; + //print $addabsolutediscount; + //print '   -   '.$addcreditnote; // We disbale link to credit note + //} + print '
'; + print ''; + if ($object->type != 2 && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; + print '
'; + print $langs->trans('Date'); + print 'id.'">'.img_edit($langs->trans('SetDate'),1).'
'; + print '
'; + + if ($object->type != 2) + { + if ($action == 'editinvoicedate') + { + $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date,'invoicedate'); + } + else { print dol_print_date($object->date,'daytext'); } + } + else + { + print dol_print_date($object->date,'daytext'); + } + print ''; + + print ''; + + // List of payments already done + print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) print ''; + print ''; + print ''; + print ''; + + $var=true; + + // Payments already done (from payment on this invoice) + $sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,'; + $sql.= ' c.code as payment_code, c.libelle as payment_label,'; + $sql.= ' pf.amount,'; + $sql.= ' ba.rowid as baid, ba.ref, ba.label'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; + $sql.= ' WHERE pf.fk_facture = '.$object->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid'; + $sql.= ' ORDER BY p.datep, p.tms'; + + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $i = 0; + + //if ($object->type != 2) + //{ + if ($num > 0) + { + while ($i < $num) + { + $objp = $db->fetch_object($result); + $var=!$var; + print ''; + $label=($langs->trans("PaymentType".$objp->payment_code)!=("PaymentType".$objp->payment_code))?$langs->trans("PaymentType".$objp->payment_code):$objp->payment_label; + print ''; + if (! empty($conf->banque->enabled)) + { + $bankaccountstatic->id=$objp->baid; + $bankaccountstatic->ref=$objp->ref; + $bankaccountstatic->label=$objp->ref; + print ''; + } + print ''; + print ''; + print ''; + $i++; + } + } + else + { + print ''; + } + //} + $db->free($result); + } + else + { + dol_print_error($db); + } + + if ($object->type != 2) + { + // Total already paid + print ''; + + $resteapayeraffiche=$resteapayer; + + // Loop on each credit note or deposit amount applied + $creditnoteamount=0; + $depositamount=0; + $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; + $sql.= " re.description, re.fk_facture_source"; + $sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re"; + $sql.= " WHERE fk_facture = ".$object->id; + $resql=$db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + $invoice=new Facture($db); + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $invoice->fetch($obj->fk_facture_source); + print ''; + print ''; + print ''; + $i++; + if ($invoice->type == 2) $creditnoteamount += $obj->amount_ttc; + if ($invoice->type == 3) $depositamount += $obj->amount_ttc; + } + } + else + { + dol_print_error($db); + } + + // Paye partiellement 'escompte' + if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'discount_vat') + { + print ''; + $resteapayeraffiche=0; + } + // Paye partiellement ou Abandon 'badcustomer' + if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'badcustomer') + { + print ''; + //$resteapayeraffiche=0; + } + // Paye partiellement ou Abandon 'product_returned' + if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'product_returned') + { + print ''; + $resteapayeraffiche=0; + } + // Paye partiellement ou Abandon 'abandon' + if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'abandon') + { + print ''; + $resteapayeraffiche=0; + } + + // Billed + print ''; + + // Remainder to pay + print ''; + print ''; + print ''; + } + else // Credit note + { + // Total already paid back + print ''; + + // Billed + print ''; + + // Remainder to pay back + print ''; + print ''; + print ''; + + // Sold credit note + //print ''; + //print ''; + } + + print '
'.($object->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).''.$langs->trans('Type').''.$langs->trans('BankAccount').''.$langs->trans('Amount').' 
'; + print ''.img_object($langs->trans('ShowPayment'),'payment').' '; + print dol_print_date($db->jdate($objp->dp),'day').''.$label.' '.$objp->num_paiement.''; + if ($bankaccountstatic->id) print $bankaccountstatic->getNomUrl(1,'transactions'); + print ''.price($sign * $objp->amount).' 
'.$langs->trans("None").'
'; + if ($object->type != 3) print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); + else print $langs->trans('AlreadyPaid'); + print ' :'.price($totalpaye).' 
'; + if ($invoice->type == 2) print $langs->trans("CreditNote").' '; + if ($invoice->type == 3) print $langs->trans("Deposit").' '; + print $invoice->getNomUrl(0); + print ' :'.price($obj->amount_ttc).''; + print 'rowid.'">'.img_delete().''; + print '
'; + print $form->textwithpicto($langs->trans("Discount").':',$langs->trans("HelpEscompte"),-1); + print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; + print $form->textwithpicto($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1); + print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; + print $form->textwithpicto($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1); + print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; + $text=$langs->trans("HelpAbandonOther"); + if ($object->close_note) $text.='

'.$langs->trans("Reason").':'.$object->close_note; + print $form->textwithpicto($langs->trans("Abandoned").':',$text,-1); + print '
'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'.$langs->trans("Billed").' :'.price($object->total_ttc).' 
'; + if ($resteapayeraffiche >= 0) print $langs->trans('RemainderToPay'); + else print $langs->trans('ExcessReceived'); + print ' :'.price($resteapayeraffiche).' 
'; + print $langs->trans('AlreadyPaidBack'); + print ' :'.price($sign * $totalpaye).' 
'.$langs->trans("Billed").' :'.price($sign * $object->total_ttc).' 
'; + if ($resteapayeraffiche <= 0) print $langs->trans('RemainderToPayBack'); + else print $langs->trans('ExcessPaydBack'); + print ' :'.price($sign * $resteapayeraffiche).' 
'.$langs->trans('TotalTTC').' :'.price($sign * $object->total_ttc).' 
'; + + // Margin Infos + if (! empty($conf->margin->enabled)) + { + print '
'; + $object->displayMarginInfos($object->statut > 0); + } + + print '
'; + print ''; + if ($object->type != 2 && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; + print '
'; + print $langs->trans('PaymentConditionsShort'); + print 'id.'">'.img_edit($langs->trans('SetConditions'),1).'
'; + print '
'; + if ($object->type != 2) + { + if ($action == 'editconditions') + { + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'cond_reglement_id'); + } + else + { + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'none'); + } + } + else + { + print ' '; + } + print '
'; + print ''; + if ($object->type != 2 && $action != 'editpaymentterm' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; + print '
'; + print $langs->trans('DateMaxPayment'); + print 'id.'">'.img_edit($langs->trans('SetDate'),1).'
'; + print '
'; + if ($object->type != 2) + { + if ($action == 'editpaymentterm') + { + $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date_lim_reglement,'paymentterm'); + } + else + { + print dol_print_date($object->date_lim_reglement,'daytext'); + if ($object->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $object->paye && $object->statut == 1 && ! isset($object->am)) print img_warning($langs->trans('Late')); + } + } + else + { + print ' '; + } + print '
'; + print ''; + if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; + print '
'; + print $langs->trans('PaymentMode'); + print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; + print '
'; + if ($action == 'editmode') + { + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'mode_reglement_id'); + } + else + { + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'none'); + } + print '
'.$langs->trans('AmountHT').''.price($object->total_ht,1,'',1,-1,-1,$conf->currency).'
'.$langs->trans('AmountVAT').''.price($object->total_tva,1,'',1,-1,-1,$conf->currency).'
'.$langs->transcountry("AmountLT1",$mysoc->country_code).''.price($object->total_localtax1,1,'',1,-1,-1,$conf->currency).'
'.$langs->transcountry("AmountLT2",$mysoc->country_code).''.price($object->total_localtax2,1,'',1,-1,-1,$conf->currency).'
'; + print ''; + if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; + print '
'; + print $langs->trans('RevenueStamp'); print 'id.'">'.img_edit($langs->trans('SetRevenuStamp'),1).'
'; + print '
'; + if ($action == 'editrevenuestamp') + { + print '
'; + print ''; + print ''; + print $formother->select_revenue_stamp(GETPOST('revenuestamp'), 'revenuestamp', $mysoc->country_code); + //print ''; + print ' '; + print '
'; + } + else + { + print price($object->revenuestamp,1,'',1,-1,-1,$conf->currency); + } + print '
'.$langs->trans('AmountTTC').''.price($object->total_ttc,1,'',1,-1,-1,$conf->currency).'
'.$langs->trans('Status').''.($object->getLibStatut(4,$totalpaye)).'
'; - $nbrows=8; $nbcols=2; - if (! empty($conf->projet->enabled)) $nbrows++; - if (! empty($conf->banque->enabled)) $nbcols++; - //if (! empty($soc->outstandingbill)) $nbrows++; - if($mysoc->localtax1_assuj=="1") $nbrows++; - if($mysoc->localtax2_assuj=="1") $nbrows++; - if ($selleruserevenustamp) $nbrows++; + print ''; + if ($action != 'classify') + { + print ''; + } + print '
'; + print $langs->trans('Project'); + print 'id.'">'; + print img_edit($langs->trans('SetProject'),1); + print '
'; - print '
'; - - print ''; - - // List of payments already done - print ''; - print ''; - print ''; - if (! empty($conf->banque->enabled)) print ''; - print ''; - print ''; + print ''; print ''; + } + // Other attributes (TODO Move this into an include) + $res=$object->fetch_optionals($object->id,$extralabels); + $parameters=array('colspan' => ' colspan="2"'); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + + foreach($extrafields->attribute_label as $key=>$label) + { + if ($action == 'edit_extras') { + $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); + } else { + $value=$object->array_options["options_".$key]; + } + if ($extrafields->attribute_type[$key] == 'separate') + { + print $extrafields->showSeparator($key); + } + else + { + print 'attribute_required[$key])) print ' class="fieldrequired"'; + print '>'.$label.''."\n"; + } + } + } + + print '
'.($object->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).''.$langs->trans('Type').''.$langs->trans('BankAccount').''.$langs->trans('Amount').' '; + if ($action == 'classify') + { + $form->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'projectid'); + } + else + { + $form->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'none'); + } + print '
'; + // Convert date into timestamp format + if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) + { + $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]); + } + + if ($action == 'edit_extras' && $user->rights->facture->creer && GETPOST('attribute') == $key) + { + print '
'; + print ''; + print ''; + print ''; + print ''; + + print $extrafields->showInputField($key,$value); + + print ''; + print '
'; + } + else + { + print $extrafields->showOutputField($key,$value); + if ($object->statut == 0 && $user->rights->facture->creer) print ''.img_picto('','edit').' '.$langs->trans('Modify').''; + } + print '

'; + + if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) + { + $blocname = 'contacts'; + $title = $langs->trans('ContactsAddresses'); + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; + } + + if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) + { + $blocname = 'notes'; + $title = $langs->trans('Notes'); + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; + } + + // Lines + $result = $object->getLinesArray(); + + + print '
+ + + + + '; + + + if (! empty($conf->use_javascript_ajax) && $object->statut == 0) + { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + } + + print ''; + + // Show object lines + if (! empty($object->lines)) + $ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1); + + // Form to add new line + if ($object->statut == 0 && $user->rights->facture->creer && $action <> 'valid' && $action <> 'editline') + { $var=true; - // Payments already done (from payment on this invoice) - $sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,'; - $sql.= ' c.code as payment_code, c.libelle as payment_label,'; - $sql.= ' pf.amount,'; - $sql.= ' ba.rowid as baid, ba.ref, ba.label'; - $sql.= ' FROM '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; - $sql.= ' WHERE pf.fk_facture = '.$object->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid'; - $sql.= ' ORDER BY p.datep, p.tms'; - - $result = $db->query($sql); - if ($result) + if ($conf->global->MAIN_FEATURES_LEVEL > 1) { - $num = $db->num_rows($result); - $i = 0; + // Add free or predefined products/services + $object->formAddObjectLine(1,$mysoc,$soc); + } + else + { + // Add free products/services + $object->formAddFreeProduct(1,$mysoc,$soc); - //if ($object->type != 2) - //{ - if ($num > 0) + // Add predefined products/services + if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { - while ($i < $num) + $var=!$var; + $object->formAddPredefinedProduct(1,$mysoc,$soc); + } + } + + $parameters=array(); + $reshook=$hookmanager->executeHooks('formAddObjectLine',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + } + + print "
\n"; + + print "
\n"; + + dol_fiche_end(); + + + // Boutons actions + + if ($action != 'prerelance' && $action != 'presend') + { + if ($user->societe_id == 0 && $action <> 'valid' && $action <> 'editline') + { + print '
'; + + // Editer une facture deja validee, sans paiement effectue et pas exporte en compta + if ($object->statut == 1) + { + // On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees + $ventilExportCompta = $object->getVentilExportCompta(); + + if ($resteapayer == $object->total_ttc && $object->paye == 0 && $ventilExportCompta == 0) { - $objp = $db->fetch_object($result); - $var=!$var; - print '
'; - print ''.img_object($langs->trans('ShowPayment'),'payment').' '; - print dol_print_date($db->jdate($objp->dp),'day').''.$label.' '.$objp->num_paiement.''; - if ($bankaccountstatic->id) print $bankaccountstatic->getNomUrl(1,'transactions'); - print ''.price($sign * $objp->amount).' 
'.$langs->trans("None").'
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + while ($i < $num) + { + $objp = $db->fetch_object($resqlorderlist); + if ($objp->socid == $soc->id) + { + $var=!$var; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } + + $i++; + } + print '
'.$langs->trans("Ref").''.$langs->trans("RefCustomer").''.$langs->trans("AmountHTShort").''.$langs->trans("Company").'
'; + print ''; + print ''.$objp->ref.''.$objp->ref_client.''.price($objp->total_ht).''.$objp->name.'
'; + print '
'; + print ''; + $db->free($resqlorderlist); } else { dol_print_error($db); } - if ($object->type != 2) - { - // Total already paid - print '
'; - if ($object->type != 3) print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); - else print $langs->trans('AlreadyPaid'); - print ' :'.price($totalpaye).' 
'; - if ($invoice->type == 2) print $langs->trans("CreditNote").' '; - if ($invoice->type == 3) print $langs->trans("Deposit").' '; - print $invoice->getNomUrl(0); - print ' :'.price($obj->amount_ttc).''; - print 'rowid.'">'.img_delete().''; - print '
'; - print $form->textwithpicto($langs->trans("Discount").':',$langs->trans("HelpEscompte"),-1); - print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; - print $form->textwithpicto($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1); - print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; - print $form->textwithpicto($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1); - print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; - $text=$langs->trans("HelpAbandonOther"); - if ($object->close_note) $text.='

'.$langs->trans("Reason").':'.$object->close_note; - print $form->textwithpicto($langs->trans("Abandoned").':',$text,-1); - print '
'.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'.$langs->trans("Billed").' :'.price($object->total_ttc).' 
'; - if ($resteapayeraffiche >= 0) print $langs->trans('RemainderToPay'); - else print $langs->trans('ExcessReceived'); - print ' :'.price($resteapayeraffiche).' 
'; - print $langs->trans('AlreadyPaidBack'); - print ' :'.price($sign * $totalpaye).' 
'.$langs->trans("Billed").' :'.price($sign * $object->total_ttc).' 
'; - if ($resteapayeraffiche <= 0) print $langs->trans('RemainderToPayBack'); - else print $langs->trans('ExcessPaydBack'); - print ' :'.price($sign * $resteapayeraffiche).' 
'.$langs->trans('TotalTTC').' :'.price($sign * $object->total_ttc).' 
'; - - // Margin Infos - if (! empty($conf->margin->enabled)) - { - print '
'; - $object->displayMarginInfos($object->statut > 0); - } - - print ''; - - // Conditions de reglement - print ''; - print ''; - if ($object->type != 2 && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; - print '
'; - print $langs->trans('PaymentConditionsShort'); - print 'id.'">'.img_edit($langs->trans('SetConditions'),1).'
'; - print ''; - if ($object->type != 2) - { - if ($action == 'editconditions') - { - $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'cond_reglement_id'); - } - else - { - $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->cond_reglement_id,'none'); - } - } - else - { - print ' '; - } - print ''; - - // Date payment term - print ''; - print ''; - if ($object->type != 2 && $action != 'editpaymentterm' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; - print '
'; - print $langs->trans('DateMaxPayment'); - print 'id.'">'.img_edit($langs->trans('SetDate'),1).'
'; - print ''; - if ($object->type != 2) - { - if ($action == 'editpaymentterm') - { - $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date_lim_reglement,'paymentterm'); - } - else - { - print dol_print_date($object->date_lim_reglement,'daytext'); - if ($object->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $object->paye && $object->statut == 1 && ! isset($object->am)) print img_warning($langs->trans('Late')); - } - } - else - { - print ' '; - } - print ''; - - // Payment mode - print ''; - print ''; - if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; - print '
'; - print $langs->trans('PaymentMode'); - print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; - print ''; - if ($action == 'editmode') - { - $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'mode_reglement_id'); - } - else - { - $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'none'); - } - print ''; - - // Amount - print ''.$langs->trans('AmountHT').''; - print ''.price($object->total_ht,1,'',1,-1,-1,$conf->currency).''; - print ''.$langs->trans('AmountVAT').''.price($object->total_tva,1,'',1,-1,-1,$conf->currency).''; - print ''; - - // Amount Local Taxes - if ($mysoc->localtax1_assuj=="1" && $mysoc->useLocalTax(1)) //Localtax1 (example RE) - { - print ''.$langs->transcountry("AmountLT1",$mysoc->country_code).''; - print ''.price($object->total_localtax1,1,'',1,-1,-1,$conf->currency).''; - } - if ($mysoc->localtax2_assuj=="1" && $mysoc->useLocalTax(2)) //Localtax2 (example IRPF) - { - print ''.$langs->transcountry("AmountLT2",$mysoc->country_code).''; - print ''.price($object->total_localtax2,1,'',1,-1,-1,$conf->currency).''; - } - - // Revenue stamp - if ($selleruserevenustamp) // Test company use revenue stamp - { - print ''; - print ''; - if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $user->rights->facture->creer) print ''; - print '
'; - print $langs->trans('RevenueStamp'); - print 'id.'">'.img_edit($langs->trans('SetRevenuStamp'),1).'
'; - print ''; - if ($action == 'editrevenuestamp') - { - print '
'; - print ''; - print ''; - print $formother->select_revenue_stamp(GETPOST('revenuestamp'), 'revenuestamp', $mysoc->country_code); - //print ''; - print ' '; - print '
'; - } - else - { - print price($object->revenuestamp,1,'',1,-1,-1,$conf->currency); - } - print ''; - } - - // Total with tax - print ''.$langs->trans('AmountTTC').''.price($object->total_ttc,1,'',1,-1,-1,$conf->currency).''; - - // Statut - print ''.$langs->trans('Status').''; - print ''.($object->getLibStatut(4,$totalpaye)).''; - - // Project - if (! empty($conf->projet->enabled)) - { - $langs->load('projects'); - print ''; - print ''; - - print ''; - if ($action != 'classify') - { - print ''; - } - print '
'; - print $langs->trans('Project'); - print 'id.'">'; - print img_edit($langs->trans('SetProject'),1); - print '
'; - - print ''; - if ($action == 'classify') - { - $form->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'projectid'); - } - else - { - $form->form_project($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->socid,$object->fk_project,'none'); - } - print ''; - print ''; - } - - // Other attributes (TODO Move this into an include) - $res=$object->fetch_optionals($object->id,$extralabels); - $parameters=array('colspan' => ' colspan="2"'); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - if (empty($reshook) && ! empty($extrafields->attribute_label)) - { - - foreach($extrafields->attribute_label as $key=>$label) - { - if ($action == 'edit_extras') { - $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); - } else { - $value=$object->array_options["options_".$key]; - } - if ($extrafields->attribute_type[$key] == 'separate') - { - print $extrafields->showSeparator($key); - } - else - { - print 'attribute_required[$key])) print ' class="fieldrequired"'; - print '>'.$label.''; - // Convert date into timestamp format - if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) - { - $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$db->jdate($object->array_options['options_'.$key]); - } - - if ($action == 'edit_extras' && $user->rights->facture->creer && GETPOST('attribute') == $key) - { - print '
'; - print ''; - print ''; - print ''; - print ''; - - print $extrafields->showInputField($key,$value); - - print ''; - print '
'; - } - else - { - print $extrafields->showOutputField($key,$value); - if ($object->statut == 0 && $user->rights->facture->creer) print ''.img_picto('','edit').' '.$langs->trans('Modify').''; - } - print ''."\n"; - } - } - } - - print '
'; - - if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) - { - $blocname = 'contacts'; - $title = $langs->trans('ContactsAddresses'); - include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; - } - - if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { - $blocname = 'notes'; - $title = $langs->trans('Notes'); - include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; - } - - // Lines - $result = $object->getLinesArray(); - - if (! empty($conf->use_javascript_ajax) && $object->statut == 0) - { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - } - - print ''; - - // Show object lines - if (! empty($object->lines)) - $ret=$object->printObjectLines($action,$mysoc,$soc,$lineid,1); - - // Form to add new line - if ($object->statut == 0 && $user->rights->facture->creer && $action <> 'valid' && $action <> 'editline') - { - $var=true; - - if ($conf->global->MAIN_FEATURES_LEVEL > 1) - { - // Add free or predefined products/services - $object->formAddObjectLine(1,$mysoc,$soc); - } - else - { - // Add free products/services - $object->formAddFreeProduct(1,$mysoc,$soc); - - // Add predefined products/services - if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) - { - $var=!$var; - $object->formAddPredefinedProduct(1,$mysoc,$soc); - } - } - - $parameters=array(); - $reshook=$hookmanager->executeHooks('formAddObjectLine',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - } - - print "
\n"; - - print "\n"; - - - // Boutons actions - - if ($action != 'prerelance' && $action != 'presend') - { - if ($user->societe_id == 0 && $action <> 'valid' && $action <> 'editline') - { - print '
'; - - // Editer une facture deja validee, sans paiement effectue et pas exporte en compta - if ($object->statut == 1) - { - // On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees - $ventilExportCompta = $object->getVentilExportCompta(); - - if ($resteapayer == $object->total_ttc && $object->paye == 0 && $ventilExportCompta == 0) - { - if (! $objectidnext) - { - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate) - { - print ''; - } - else - { - print '
'.$langs->trans('Modify').'
'; - } - } - else - { - print '
'.$langs->trans('Modify').'
'; - } - } - } - - // Reopen a standard paid invoice - if (($object->type == 0 || $object->type == 1) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely) - { - if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice - { - print ''; - } - else - { - print '
'.$langs->trans('ReOpen').'
'; - } - } - - // Validate - if ($object->statut == 0 && count($object->lines) > 0 && - ( - (($object->type == 0 || $object->type == 1 || $object->type == 3 || $object->type == 4) && (! empty($conf->global->FACTURE_ENABLE_NEGATIVE) || $object->total_ttc >= 0)) - || ($object->type == 2 && $object->total_ttc <= 0)) - ) - { - if ($user->rights->facture->valider) - { - print ''; - } - } - - // Send by mail - if (($object->statut == 1 || $object->statut == 2)) - { - if ($objectidnext) - { - print '
'.$langs->trans('SendByMail').'
'; - } - else - { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) - { - print ''; - } - else print ''; - } - } - - if (! empty($conf->global->FACTURE_SHOW_SEND_REMINDER)) // For backward compatibility - { - if (($object->statut == 1 || $object->statut == 2) && $resteapayer > 0) - { - if ($objectidnext) - { - print '
'.$langs->trans('SendRemindByMail').'
'; - } - else - { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) - { - print ''; - } - else print ''; - } - } - } - - // Create payment - if ($object->type != 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) - { - if ($objectidnext) - { - print '
'.$langs->trans('DoPayment').'
'; - } - else - { - if ($resteapayer == 0) - { - print '
'.$langs->trans('DoPayment').'
'; - } - else - { - print ''; - } - } - } - - // Reverse back money or convert to reduction - if ($object->type == 2 || $object->type == 3) - { - // For credit note only - if ($object->type == 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement) - { - print ''; - } - // For credit note - if ($object->type == 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->creer && $object->getSommePaiement() == 0) - { - print ''; - } - // For deposit invoice - if ($object->type == 3 && $object->statut == 1 && $resteapayer == 0 && $user->rights->facture->creer) - { - print ''; - } - } - - // Classify paid (if not deposit and not credit note. Such invoice are "converted") - if ($object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement && - (($object->type != 2 && $object->type != 3 && $resteapayer <= 0) || ($object->type == 2 && $resteapayer >= 0)) ) - { - print ''; - } - - // Classify 'closed not completely paid' (possible si validee et pas encore classee payee) - if ($object->statut == 1 && $object->paye == 0 && $resteapayer > 0 - && $user->rights->facture->paiement) - { - if ($totalpaye > 0 || $totalcreditnotes > 0) - { - // If one payment or one credit note was linked to this invoice - print ''; - } - else - { - if ($objectidnext) - { - print '
'.$langs->trans('ClassifyCanceled').'
'; - } - else - { - print ''; - } - } - } - - // Clone - if (($object->type == 0 || $object->type == 3 || $object->type == 4) && $user->rights->facture->creer) - { - print ''; - } - - // Clone as predefined - if (($object->type == 0 || $object->type == 3 || $object->type == 4) && $object->statut == 0 && $user->rights->facture->creer) - { - if (! $objectidnext) - { - print ''; - } - } - - // Delete - if ($user->rights->facture->supprimer) - { - if (! $object->is_erasable()) - { - print ''; - } - else if ($objectidnext) - { - print ''; - } - elseif ($object->getSommePaiement()) - { - print ''; - } - else - { - print ''; - } - } - else - { - print ''; - } - - print '
'; - } - } - print '
'; - - if ($action != 'prerelance' && $action != 'presend') - { - print '
'; - print ''; // ancre - - // Documents generes - $filename=dol_sanitizeFileName($object->ref); - $filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref); - $urlsource=$_SERVER['PHP_SELF'].'?facid='.$object->id; - $genallowed=$user->rights->facture->creer; - $delallowed=$user->rights->facture->supprimer; - - print $formfile->showdocuments('facture',$filename,$filedir,$urlsource,$genallowed,$delallowed,$object->modelpdf,1,0,0,28,0,'','','',$soc->default_lang); - $somethingshown=$formfile->numoffiles; - - // Linked object block - $somethingshown=$object->showLinkedObjectBlock(); - - if (empty($somethingshown) && $object->statut > 0) - { - print '
'.$langs->trans('LinkedOrder').''; - - print ''; - } - - // Link for paypal payment - if (! empty($conf->paypal->enabled) && $object->statut != 0) - { - include_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; - print showPaypalPaymentUrl('invoice',$object->ref); - } - - print '
'; - - // List of actions on element - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions=new FormActions($db); - $somethingshown=$formactions->showactions($object,'invoice',$socid); - - print '
'; - } - else - { - /* - * Affiche formulaire mail - */ - - // By default if $action=='presend' - $titreform='SendBillByMail'; - $topicmail='SendBillRef'; - $action='send'; - $modelmail='facture_send'; - - if ($action == 'prerelance') // For backward compatibility - { - $titrefrom='SendReminderBillByMail'; - $topicmail='SendReminderBillRef'; - $action='relance'; - $modelmail='facture_relance'; - } - - $ref = dol_sanitizeFileName($object->ref); - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref,'/')); - $file=$fileparams['fullname']; - - // Build document if it not exists - if (! $file || ! is_readable($file)) - { - // Define output language - $outputlangs = $langs; - $newlang=''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - - $result=facture_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result <= 0) - { - dol_print_error($db,$result); - exit; - } - $fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref,'/')); - $file=$fileparams['fullname']; - } - - print '
'; - print_titre($langs->trans($titreform)); - - // Cree l'objet formulaire mail - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; - $formmail = new FormMail($db); - $formmail->fromtype = 'user'; - $formmail->fromid = $user->id; - $formmail->fromname = $user->getFullName($langs); - $formmail->frommail = $user->email; - $formmail->withfrom=1; - $liste=array(); - foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value; - $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste; - $formmail->withtocc=$liste; - $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; - if(empty($object->ref_client)) - { - $formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__'); - } - else if(!empty($object->ref_client)) - { - $formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__(__REFCLIENT__)'); - } - $formmail->withfile=2; - $formmail->withbody=1; - $formmail->withdeliveryreceipt=1; - $formmail->withcancel=1; - // Tableau des substitutions - $formmail->substit['__FACREF__']=$object->ref; - $formmail->substit['__SIGNATURE__']=$user->signature; - $formmail->substit['__REFCLIENT__']=$object->ref_client; - $formmail->substit['__PERSONALIZED__']=''; - $formmail->substit['__CONTACTCIVNAME__']=''; - - //Find the good contact adress - $custcontact=''; - $contactarr=array(); - $contactarr=$object->liste_contact(-1,'external'); - - if (is_array($contactarr) && count($contactarr)>0) { - foreach($contactarr as $contact) { - if ($contact['libelle']==$langs->trans('TypeContact_facture_external_BILLING')) { - - require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; - - $contactstatic=new Contact($db); - $contactstatic->fetch($contact['id']); - $custcontact=$contactstatic->getFullName($langs,1); - } - } - - if (!empty($custcontact)) { - $formmail->substit['__CONTACTCIVNAME__']=$custcontact; - } - } - - - // Tableau des parametres complementaires du post - $formmail->param['action']=$action; - $formmail->param['models']=$modelmail; - $formmail->param['facid']=$object->id; - $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; - - // Init list of files - if (GETPOST("mode")=='init') - { - $formmail->clear_attached_files(); - $formmail->add_attached_files($file,basename($file),dol_mimetype($file)); - } - - $formmail->show_form(); - - print '
'; - } + print ''; } else { - dol_print_error($db,$object->error); + /* + * Affiche formulaire mail + */ + + // By default if $action=='presend' + $titreform='SendBillByMail'; + $topicmail='SendBillRef'; + $action='send'; + $modelmail='facture_send'; + + if ($action == 'prerelance') // For backward compatibility + { + $titrefrom='SendReminderBillByMail'; + $topicmail='SendReminderBillRef'; + $action='relance'; + $modelmail='facture_relance'; + } + + $ref = dol_sanitizeFileName($object->ref); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref,'/')); + $file=$fileparams['fullname']; + + // Build document if it not exists + if (! $file || ! is_readable($file)) + { + // Define output language + $outputlangs = $langs; + $newlang=''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) $newlang=$_REQUEST['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + + $result=facture_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($result <= 0) + { + dol_print_error($db,$result); + exit; + } + $fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref,'/')); + $file=$fileparams['fullname']; + } + + print '
'; + print_titre($langs->trans($titreform)); + + // Cree l'objet formulaire mail + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + $formmail->fromtype = 'user'; + $formmail->fromid = $user->id; + $formmail->fromname = $user->getFullName($langs); + $formmail->frommail = $user->email; + $formmail->withfrom=1; + $liste=array(); + foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key=>$value) $liste[$key]=$value; + $formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste; + $formmail->withtocc=$liste; + $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; + if(empty($object->ref_client)) + { + $formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__'); + } + else if(!empty($object->ref_client)) + { + $formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__(__REFCLIENT__)'); + } + $formmail->withfile=2; + $formmail->withbody=1; + $formmail->withdeliveryreceipt=1; + $formmail->withcancel=1; + // Tableau des substitutions + $formmail->substit['__FACREF__']=$object->ref; + $formmail->substit['__SIGNATURE__']=$user->signature; + $formmail->substit['__REFCLIENT__']=$object->ref_client; + $formmail->substit['__PERSONALIZED__']=''; + $formmail->substit['__CONTACTCIVNAME__']=''; + + //Find the good contact adress + $custcontact=''; + $contactarr=array(); + $contactarr=$object->liste_contact(-1,'external'); + + if (is_array($contactarr) && count($contactarr)>0) { + foreach($contactarr as $contact) { + if ($contact['libelle']==$langs->trans('TypeContact_facture_external_BILLING')) { + + require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; + + $contactstatic=new Contact($db); + $contactstatic->fetch($contact['id']); + $custcontact=$contactstatic->getFullName($langs,1); + } + } + + if (!empty($custcontact)) { + $formmail->substit['__CONTACTCIVNAME__']=$custcontact; + } + } + + + // Tableau des parametres complementaires du post + $formmail->param['action']=$action; + $formmail->param['models']=$modelmail; + $formmail->param['facid']=$object->id; + $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; + + // Init list of files + if (GETPOST("mode")=='init') + { + $formmail->clear_attached_files(); + $formmail->add_attached_files($file,basename($file),dol_mimetype($file)); + } + + $formmail->show_form(); + + print '
'; } } diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 1ee076cd170..d5c140be91e 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -79,7 +79,7 @@ if ($result) print ''; print ''; - print_liste_field_titre($langs->trans("WithdrawalReceipt"),"bons.php","p.ref",'','','class="liste_titre"'); + print_liste_field_titre($langs->trans("WithdrawalReceipts"),"bons.php","p.ref",'','','class="liste_titre"'); print_liste_field_titre($langs->trans("Date"),"bons.php","p.datec","","",'class="liste_titre" align="center"'); print ''; print ''; diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 74bb3fd12e4..848998e0e76 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -47,7 +47,7 @@ $page = GETPOST('page','int'); $sortorder = ((GETPOST('sortorder','alpha')=="")) ? "DESC" : GETPOST('sortorder','alpha'); $sortfield = ((GETPOST('sortfield','alpha')=="")) ? "p.ref" : GETPOST('sortfield','alpha'); -llxHeader('',$langs->trans("WithdrawalReceipt")); +llxHeader('',$langs->trans("WithdrawalReceipts")); if ($prev_id) { @@ -56,7 +56,7 @@ if ($prev_id) if ($bon->fetch($prev_id) == 0) { $head = prelevement_prepare_head($bon); - dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipt"), '', 'payment'); + dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipts"), '', 'payment'); print '
'.$langs->trans("Amount").'
'; diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 87516c3ad65..10d69c3434d 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -46,7 +46,7 @@ $page = GETPOST('page','int'); /* * View */ -llxHeader('',$langs->trans("WithdrawalReceipt")); +llxHeader('',$langs->trans("WithdrawalReceipts")); if ($prev_id) { @@ -55,7 +55,7 @@ if ($prev_id) if ($bon->fetch($prev_id) == 0) { $head = prelevement_prepare_head($bon); - dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipt"), '', 'payment'); + dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipts"), '', 'payment'); print '
'; diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 2ac44d056fe..95d28eeadd8 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -44,7 +44,7 @@ $page = GETPOST('page','int'); * View */ -llxHeader('',$langs->trans("WithdrawalReceipt")); +llxHeader('',$langs->trans("WithdrawalReceipts")); if ($prev_id) { @@ -53,7 +53,7 @@ if ($prev_id) if ($bon->fetch($prev_id) == 0) { $head = prelevement_prepare_head($bon); - dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalReceipt"), '', 'payment'); + dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalReceipts"), '', 'payment'); print '
'; diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/fiche.php index 5db8e38d912..a4ec2ce9d14 100644 --- a/htdocs/compta/prelevement/fiche.php +++ b/htdocs/compta/prelevement/fiche.php @@ -133,7 +133,7 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit) $bon = new BonPrelevement($db,""); $form = new Form($db); -llxHeader('',$langs->trans("WithdrawalReceipt")); +llxHeader('',$langs->trans("WithdrawalReceipts")); if ($id > 0) @@ -141,7 +141,7 @@ if ($id > 0) $bon->fetch($id); $head = prelevement_prepare_head($bon); - dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipt"), '', 'payment'); + dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipts"), '', 'payment'); if (GETPOST('error','alpha')!='') { diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index d242deedb38..d9d993aff40 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -130,7 +130,7 @@ if ($id) print '
'; - print ''; print ''; print ''; diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php index dc8b69ea78d..0942554ddd3 100644 --- a/htdocs/compta/prelevement/lignes.php +++ b/htdocs/compta/prelevement/lignes.php @@ -54,7 +54,7 @@ $sortfield = ((GETPOST('sortfield','alpha')=="")) ? "pl.fk_soc" : GETPOST('sortf * View */ -llxHeader('',$langs->trans("WithdrawalReceipt")); +llxHeader('',$langs->trans("WithdrawalReceipts")); if ($prev_id) { @@ -63,7 +63,7 @@ if ($prev_id) if ($bon->fetch($prev_id) == 0) { $head = prelevement_prepare_head($bon); - dol_fiche_head($head, 'lines', $langs->trans("WithdrawalReceipt"), '', 'payment'); + dol_fiche_head($head, 'lines', $langs->trans("WithdrawalReceipts"), '', 'payment'); print '
'.$langs->trans("WithdrawalReceipt").''; + print '
'.$langs->trans("WithdrawalReceipts").''; print ''.$lipre->bon_ref.'
'.$langs->trans("Date").''.dol_print_date($bon->datec,'day').'
'.$langs->trans("Amount").''.price($lipre->amount).'
'; diff --git a/htdocs/compta/prelevement/liste.php b/htdocs/compta/prelevement/liste.php index ddcf485ac4d..5ed627dee58 100644 --- a/htdocs/compta/prelevement/liste.php +++ b/htdocs/compta/prelevement/liste.php @@ -111,7 +111,7 @@ if ($result) print ''; print ''; - print_liste_field_titre($langs->trans("WithdrawalReceipt"),$_SERVER["PHP_SELF"],"p.ref"); + print_liste_field_titre($langs->trans("WithdrawalReceipts"),$_SERVER["PHP_SELF"],"p.ref"); print_liste_field_titre($langs->trans("Bill"),$_SERVER["PHP_SELF"],"f.facnumber",'',$urladd); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom"); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client",'','','align="center"'); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 315a2b9edff..73403fd0755 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -999,6 +999,9 @@ class Contrat extends CommonObject $pu=$pu_ttc; } + // Check parameters + if (empty($remise_percent)) $remise_percent=0; + // Calcul du total TTC et de la TVA pour la ligne a partir de // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index f096cac29c7..65d485d129c 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -158,9 +158,9 @@ if (GETPOST('remonth') && GETPOST('reday') && GETPOST('reyear')) $datecontrat = dol_mktime(GETPOST('rehour'), GETPOST('remin'), 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); } +// Add contract if ($action == 'add' && $user->rights->contrat->creer) { - // Check if (empty($datecontrat)) { @@ -339,9 +339,36 @@ else if ($action == 'classin' && $user->rights->contrat->creer) $object->setProject(GETPOST('projectid')); } +// Add a new line else if ($action == 'addline' && $user->rights->contrat->creer) { - if (! GETPOST('qty')) + // Set if we used free entry or predefined product + if (GETPOST('addline_libre')) + { + $predef=''; + $idprod=0; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + if (GETPOST('addline_predefined')) + { + $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):'')); + $price_ht = ''; + $tva_tx = ''; + } + if (GETPOST('usenewaddlineform')) { + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):(GETPOST('dp_desc')?GETPOST('dp_desc'):''))); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); + + if ($qty == '') { setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Qty")),'errors'); $error++; @@ -362,41 +389,19 @@ else if ($action == 'addline' && $user->rights->contrat->creer) } $ret=$object->fetch_thirdparty(); - $date_start=''; - $date_end=''; - // Si ajout champ produit libre - if (GETPOST('mode') == 'libre') - { - if (GETPOST('date_start_slmonth') && GETPOST('date_start_slday') && GETPOST('date_start_slyear')) - { - $date_start=dol_mktime(GETPOST('date_start_slhour'), GETPOST('date_start_slmin'), 0, GETPOST('date_start_slmonth'), GETPOST('date_start_slday'), GETPOST('date_start_slyear')); - } - if (GETPOST('date_end_slmonth') && GETPOST('date_end_slday') && GETPOST('date_end_slyear')) - { - $date_end=dol_mktime(GETPOST('date_end_slhour'), GETPOST('date_end_slmin'), 0, GETPOST('date_end_slmonth'), GETPOST('date_end_slday'), GETPOST('date_end_slyear')); - } - } - // Si ajout champ produit predefini - if (GETPOST('mode') == 'predefined') - { - if (GETPOST('date_startmonth') && GETPOST('date_startday') && GETPOST('date_startyear')) - { - $date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); - } - if (GETPOST('date_endmonth') && GETPOST('date_endday') && GETPOST('date_endyear')) - { - $date_end=dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); - } - } + // Clean parameters + $date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); + $date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); + $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); // Ecrase $pu par celui du produit // Ecrase $desc par celui du produit // Ecrase $txtva par celui du produit // Ecrase $base_price_type par celui du produit - if (GETPOST('idprod')) + if ($idprod > 0) { $prod = new Product($db); - $prod->fetch(GETPOST('idprod')); + $prod->fetch($idprod); $tva_tx = get_default_tva($mysoc,$object->thirdparty,$prod->id); $tva_npr = get_default_npr($mysoc,$object->thirdparty,$prod->id); @@ -426,22 +431,21 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $pu_ht = price2num($pu_ttc / (1 + ($tva_tx/100)), 'MU'); } else - { + { $pu_ttc = price2num($pu_ht * (1 + ($tva_tx/100)), 'MU'); } } - $desc = $prod->description; - $desc.= $prod->description && GETPOST('np_desc') ? "\n" : ""; - $desc.= GETPOST('np_desc'); + $desc=$prod->description; + $desc=dol_concatdesc($desc,$product_desc); } else - { + { $pu_ht=GETPOST('price_ht'); $price_base_type = 'HT'; $tva_tx=GETPOST('tva_tx')?str_replace('*','',GETPOST('tva_tx')):0; // tva_tx field may be disabled, so we use vat rate 0 $tva_npr=preg_match('/\*/',GETPOST('tva_tx'))?1:0; - $desc=GETPOST('dp_desc'); + $desc=$product_desc; } $localtax1_tx=get_localtax($tva_tx,1,$object->societe); @@ -457,23 +461,23 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $info_bits=0; if ($tva_npr) $info_bits |= 0x01; - if($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) + if($price_min && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))) { $object->error = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); $result = -1 ; } else - { + { // Insert line $result = $object->addline( $desc, $pu_ht, - GETPOST('qty'), + $qty, $tva_tx, $localtax1_tx, $localtax2_tx, - GETPOST('idprod'), - GETPOST('remise_percent'), + $idprod, + $remise_percent, $date_start, $date_end, $price_base_type, @@ -506,7 +510,6 @@ else if ($action == 'addline' && $user->rights->contrat->creer) unset($_POST['qty']); unset($_POST['type']); - unset($_POST['idprod']); unset($_POST['remise_percent']); unset($_POST['price_ht']); unset($_POST['price_ttc']); @@ -516,6 +519,16 @@ else if ($action == 'addline' && $user->rights->contrat->creer) unset($_POST['product_desc']); unset($_POST['fournprice']); unset($_POST['buying_price']); + unset($_POST['dp_desc']); + + unset($_POST['idprod']); + unset($_POST['qty_predef']); + unset($_POST['remise_percent_predef']); + unset($_POST['fournprice_predef']); + unset($_POST['buying_price_predef']); + unset($_POST['np_marginRate_predef']); + unset($_POST['np_markRate_predef']); + unset($_POST['np_desc']); } else { @@ -948,7 +961,7 @@ else if ($action == 'delete') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("DeleteAContract"),$langs->trans("ConfirmDeleteAContract"),"confirm_delete",'',0,1); - + } /* @@ -969,7 +982,7 @@ else $text=$langs->trans('ConfirmValidateContract',$numref); print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("ValidateAContract"),$text,"confirm_valid",'',0,1); - + } /* @@ -978,7 +991,7 @@ else if ($action == 'close') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id,$langs->trans("CloseAContract"),$langs->trans("ConfirmCloseContract"),"confirm_close",'',0,1); - + } /* @@ -1306,6 +1319,7 @@ else } print "
'.$langs->trans("Line").'
"; + print "\n"; @@ -1472,6 +1486,7 @@ else * Desactiver la ligne de contrat */ print '
'; + print ''; print ''; @@ -1525,13 +1540,22 @@ else } //print '
'; + // Form to add new line if ($user->rights->contrat->creer && ($object->statut >= 0)) { $dateSelector=1; - print '
'; - print ''; // Array with (n*2)+1 lines + print "\n"; + print ' + + + + + '; + + print '
'; + print '
'; // Array with (n*2)+1 lines // Trick to not show product entries $savproductenabled=$conf->product->enabled; @@ -1567,13 +1591,12 @@ else // Restore correct setup $conf->product->enabled = $savproductenabled; - print ''; - print '
'; + + print ''; } - - print ''; + dol_fiche_end(); /* @@ -1642,11 +1665,13 @@ llxFooter(); $db->close(); ?> + margin->enabled) { +if ($conf->margin->enabled && $action == 'editline') +{ ?> + - + + diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 45221876e91..189cec49f80 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1051,7 +1051,7 @@ class FormFile global $bc; global $sortfield, $sortorder; - require_once DOL_DOCUMENT_ROOT . '/link/class/link.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $link = new Link($this->db); $links = array(); if ($sortfield == "name") { @@ -1066,9 +1066,9 @@ class FormFile // Show list of associated links print_titre($langs->trans("LinkedFiles")); - + print '
'; - + print ''; print ''; print_liste_field_titre( @@ -1113,12 +1113,12 @@ class FormFile if ($nboflinks > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $var = true; - foreach ($links as $link) + foreach ($links as $link) { $var =! $var; print ''; //edit mode - if ($action == 'update' && $selected === $link->id) + if ($action == 'update' && $selected === $link->id) { print '\n"; } - if ($nboflinks == 0) + if ($nboflinks == 0) { print '
'; print ''; @@ -1157,7 +1157,7 @@ class FormFile } print "
'; print $langs->trans("NoLinkFound"); @@ -1166,7 +1166,7 @@ class FormFile print "
"; print '
'; - + return $nboflinks; } diff --git a/htdocs/link/class/link.class.php b/htdocs/core/class/link.class.php similarity index 88% rename from htdocs/link/class/link.class.php rename to htdocs/core/class/link.class.php index 0bb57c52cf6..8100d526718 100644 --- a/htdocs/link/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/link/class/link.class.php + * \file htdocs/core/class/link.class.php * \ingroup link * \brief File for link class */ @@ -39,6 +39,7 @@ class Link extends CommonObject public $objecttype; public $objectid; + /** * Constructor * @@ -102,9 +103,9 @@ class Link extends CommonObject include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); $result=$interface->run_triggers('LINK_CREATE', $this, $user, $langs, $conf); - if ($result < 0) { - $error++; - $this->errors = $interface->errors; + if ($result < 0) { + $error++; + $this->errors = $interface->errors; } // Fin appel triggers } else { @@ -161,12 +162,12 @@ class Link extends CommonObject dol_syslog(get_class($this)."::Update id = " . $this->id . " call_trigger = " . $call_trigger); // Check parameters - if (empty($this->url)) + if (empty($this->url)) { $this->error = $langs->trans("NoURL"); return -1; } - + // Clean parameters $this->url = clean_url($this->url,1); if (empty($this->label)) $this->label = basename($this->url); @@ -176,7 +177,7 @@ class Link extends CommonObject $this->db->begin(); $sql = "UPDATE " . MAIN_DB_PREFIX . "links SET "; - $sql .= "entity = '" . $conf->entity ."'"; + $sql .= "entity = '" . $conf->entity ."'"; $sql .= ", datea = '" . $this->db->idate(dol_now()) . "'"; $sql .= ", url = '" . $this->db->escape($this->url) . "'"; $sql .= ", label = '" . $this->db->escape($this->label) . "'"; @@ -184,25 +185,24 @@ class Link extends CommonObject $sql .= ", objectid = " . $this->objectid; $sql .= " WHERE rowid = '" . $this->id ."'"; - - dol_syslog(get_class($this)."::Update sql = " .$sql); + dol_syslog(get_class($this)."::update sql = " .$sql); $resql = $this->db->query($sql); if ($resql) { - if ($call_trigger) + if ($call_trigger) { // Appel des triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface = new Interfaces($this->db); $result = $interface->run_triggers('LINK_MODIFY', $this, $user, $langs, $conf); - if ($result < 0) { + if ($result < 0) { $error++; $this->errors = $interface->errors; } // Fin appel triggers } - if (! $error) + if (! $error) { dol_syslog(get_class($this) . "::Update success"); $this->db->commit(); @@ -211,16 +211,16 @@ class Link extends CommonObject $this->db->rollback(); return -1; } - } - else + } + else { - if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { // Doublon $this->error = $langs->trans("ErrorDuplicateField"); $result = -1; } - else + else { $this->error = $langs->trans("Error sql = " . $sql); dol_syslog(get_class($this) . "::Update fails update = " . $this->error, LOG_ERR); @@ -233,34 +233,39 @@ class Link extends CommonObject /** * Loads all links from database - * + * * @param array &$links array of Link objects to fill * @param string $objecttype type of the associated object in dolibarr * @param int $objectid id of the associated object in dolibarr * @param string $sortfield field used to sort * @param string $sortorder sort order * @return 1 if ok, 0 if no records, -1 if error - * + * * */ public function fetchAll(&$links, $objecttype, $objectid, $sortfield=null, $sortorder=null) { global $conf; + $sql = "SELECT rowid, entity, datea, url, label , objecttype, objectid FROM " . MAIN_DB_PREFIX . "links"; $sql .= " WHERE objecttype = '" . $objecttype . "' AND objectid = " . $objectid; - if($conf->entity != 0) $sql .= " AND entity = " . $conf->entity; + if ($conf->entity != 0) $sql .= " AND entity = " . $conf->entity; if ($sortfield) { if (empty($sortorder)) { $sortorder = "ASC"; } $sql .= " ORDER BY " . $sortfield . " " . $sortorder; } + + dol_syslog(get_class($this)."::fetchAll sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); - dol_syslog(get_class($this)."::fetchAll " . $sql, LOG_DEBUG); - if ($resql) { + if ($resql) + { $num = $this->db->num_rows($resql); dol_syslog(get_class($this)."::fetchAll " . $num . "records", LOG_DEBUG); - if ($num > 0) { - while ($obj = $this->db->fetch_object($resql)) { + if ($num > 0) + { + while ($obj = $this->db->fetch_object($resql)) + { $link = new Link($db); $link->id = $obj->rowid; $link->entity = $obj->entity; @@ -281,25 +286,31 @@ class Link extends CommonObject } } - /* + /** * Loads a link from database - * @param rowid id of link to load - * @return int 1 if ok, 0 if no record found, -1 if error - * - * */ + * + * @param int $rowid Id of link to load + * @return int 1 if ok, 0 if no record found, -1 if error + * + **/ public function fetch($rowid=null) { global $conf; + if (empty($rowid)) { $rowid = $this->id; } + $sql = "SELECT rowid, entity, datea, url, label, objecttype, objectid FROM " . MAIN_DB_PREFIX . "links"; $sql .= " WHERE rowid = " . $rowid; if($conf->entity != 0) $sql .= " AND entity = " . $conf->entity; + + dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); - dol_syslog(get_class($this)."::fetch " . $sql, LOG_DEBUG); - if ($resql) { - if($this->db->num_rows($resql) > 0) { + if ($resql) + { + if($this->db->num_rows($resql) > 0) + { $obj = $this->db->fetch_object($resql); $this->entity = $obj->entity; $this->datea = $this->db->jdate($obj->datea); @@ -308,14 +319,14 @@ class Link extends CommonObject $this->objecttype = $obj->objecttype; $this->objectid = $obj->objectid; return 1; - } else { - $this->error = 'Fetch no link found for id = ' . $rowid; - dol_syslog($this->error, LOG_ERR); + } + else + { return 0; } } else { - dol_syslog($this->db->error(), LOG_ERR); - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); + dol_syslog($this->error, LOG_ERR); return -1; } } @@ -335,11 +346,12 @@ class Link extends CommonObject $this->db->begin(); // Remove link - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "links"; $sql.= " WHERE rowid = " . $this->id; + dol_syslog(get_class($this)."::delete sql=" . $sql, LOG_DEBUG); - if (! $this->db->query($sql)) { + if (! $this->db->query($sql)) + { $error++; $this->error = $this->db->lasterror(); dol_syslog(get_class($this)."::delete error -4 " . $this->error, LOG_ERR); @@ -351,9 +363,9 @@ class Link extends CommonObject include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($this->db); $result = $interface->run_triggers('LINK_DELETE', $this, $user, $langs, $conf); - if ($result < 0) { - $error++; - $this->errors = $interface->errors; + if ($result < 0) { + $error++; + $this->errors = $interface->errors; } // Fin appel triggers } diff --git a/htdocs/core/js/lib_head.js b/htdocs/core/js/lib_head.js index ae6182177d7..cfb2977c370 100644 --- a/htdocs/core/js/lib_head.js +++ b/htdocs/core/js/lib_head.js @@ -1,4 +1,4 @@ -// Copyright (C) 2005-2010 Laurent Destailleur +// Copyright (C) 2005-2013 Laurent Destailleur // Copyright (C) 2005-2012 Regis Houssin // // This program is free software; you can redistribute it and/or modify @@ -290,8 +290,10 @@ function loadXMLDoc(url,readyStateFunction,async) return req; } -// To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and -// not put popup completely on the front) +/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and + * not put popup completely on the front) + * Used only bu popup calendar + */ function hideSelectBoxes() { var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10); if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1) @@ -304,6 +306,10 @@ function hideSelectBoxes() { } } } +/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and + * not put popup completely on the front) + * Used only bu popup calendar + */ function displaySelectBoxes() { var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10); if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1) @@ -354,9 +360,7 @@ function formatDate(date,format) c=format.charAt(i); // Recupere char du format substr=""; j=i; - while ((format.charAt(j)==c) && (j < format.length)) // Recupere char - // successif - // identiques + while ((format.charAt(j)==c) && (j < format.length)) // Recupere char successif identiques { substr += format.charAt(j++); } @@ -623,8 +627,9 @@ function hideMessage(fieldId,message) { if (textbox.value == message) textbox.value = ''; } + /* - * + * TODO Used by admin page only ? */ function setConstant(url, code, input, entity) { $.get( url, { @@ -679,7 +684,7 @@ function setConstant(url, code, input, entity) { } /* - * + * TODO Used by admin page only ? */ function delConstant(url, code, input, entity) { $.get( url, { @@ -733,7 +738,7 @@ function delConstant(url, code, input, entity) { } /* - * + * TODO Used by admin page only ? */ function confirmConstantAction(action, url, code, input, box, entity, yesButton, noButton) { var boxConfirm = box; @@ -784,7 +789,9 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton, /* * ================================================================= * This is to allow to transform all select box into ajax autocomplete box - * with just one line: $(function() { $( "#idofmylist" ).combobox(); }); + * with just one line: + * $(function() { $( "#idofmylist" ).combobox(); }); + * Do not use it on large combo boxes * ================================================================= */ (function( $ ) { @@ -894,6 +901,8 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton, /* * Timer for delayed keyup function + * + * TODO Who use this ? */ (function($){ $.widget("ui.onDelayedKeyup", { diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index cf47c22d1fa..806a745e20b 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -33,7 +33,7 @@ * @param string $urloption More parameters on URL request * @param int $minLength Minimum number of chars to trigger that Ajax search * @param int $autoselect Automatic selection if just one value - * @param array $ajaxoptions Multiple options array + * @param array $ajaxoptions Multiple options array (Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done * @return string Script */ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLength=2, $autoselect=0, $ajaxoptions=array()) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 17d96bd3356..ae1cf90a393 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1011,12 +1011,12 @@ 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']; - if ($savingdocmask) + if ($savingdocmask) { $destpath=$upload_dir . "/" . preg_replace('/__file__/',$_FILES[$varfiles]['name'],$savingdocmask); $destfile=preg_replace('/__file__/',$_FILES[$varfiles]['name'],$savingdocmask); - } - + } + $resupload = dol_move_uploaded_file($_FILES[$varfiles]['tmp_name'], $destpath, $allowoverwrite, 0, $_FILES[$varfiles]['error'], 0, $varfiles); if (is_numeric($resupload) && $resupload > 0) { @@ -1058,7 +1058,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio } } elseif ($link) { if (dol_mkdir($upload_dir) >= 0) { - require_once DOL_DOCUMENT_ROOT . '/link/class/link.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $linkObject = new Link($db); $linkObject->entity = $conf->entity; $linkObject->url = $link; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a311c78b496..220721d6f5e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1212,7 +1212,7 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64) $newskype.=' '; $newskype.=dol_trunc($skype,$max); $newskype.=''; - + if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) { $type='AC_SKYPE'; $link=''; @@ -2372,7 +2372,7 @@ function print_liste_field_titre($name, $file="", $field="", $begin="", $morepar * Get title line of an array * * @param string $name Label of field - * @param int $thead 0=To use with standard table forat, 1=To use inside , 2=To use with
+ * @param int $thead 0=To use with standard table forat, 1=To use inside , 2=To use with
* @param string $file Url used when we click on sort picto * @param string $field Field to use for new sorting. Empty if this field is not sortable. * @param string $begin ("" by defaut) @@ -2392,7 +2392,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m $tag='th'; if ($thead==2) $tag='div'; - + // If field is used as sort criteria we use a specific class // Example if (sortfield,field)=("nom","xxx.nom") or (sortfield,field)=("nom","nom") if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="liste_titre_sel" '. $moreattrib.'>'; @@ -2449,7 +2449,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m } /** - * Show a title (deprecated. use print_fiche_titre instrad) + * Show a title (deprecated. use print_fiche_titre instead) * * @param string $title Title to show * @return string Title to show @@ -2462,16 +2462,16 @@ function print_titre($title) /** * Show a title with picto * - * @param string $titre Title to show + * @param string $title Title to show * @param string $mesg Added message to show on right * @param string $picto Icon to use before title (should be a 32x32 transparent png file) * @param int $pictoisfullpath 1=Icon name is a full absolute url of image * @param int $id To force an id on html objects * @return void */ -function print_fiche_titre($titre, $mesg='', $picto='title.png', $pictoisfullpath=0, $id='') +function print_fiche_titre($title, $mesg='', $picto='title.png', $pictoisfullpath=0, $id='') { - print load_fiche_titre($titre, $mesg, $picto, $pictoisfullpath, $id); + print load_fiche_titre($title, $mesg, $picto, $pictoisfullpath, $id); } /** @@ -3004,7 +3004,7 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr $sql.= " WHERE t.active=1 AND t.fk_pays = p.rowid AND p.code='".$thirdparty_seller->country_code."'"; $sql.= " ORDER BY t.taux DESC, t.recuperableonly ASC"; $sql.= $db->plimit(1); - + $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index aa96b46a859..27b14d859f3 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -17,11 +17,11 @@ * * Javascript code to activate drag and drop on lines * You can use this if you want to be abale to drag and drop rows of a table. - * You must add id="tablelines" ont table level tag and have count($object->lines) or count($taskarray) > 0 + * You must add id="tablelines" ont table level tag and have count($object->lines) or count($taskarray) > 0 */ ?> - + id; $fk_element=$object->fk_element; @@ -84,4 +84,4 @@ $(document).ready(function(){ }); - \ No newline at end of file + \ No newline at end of file diff --git a/htdocs/core/tpl/document_actions_pre_headers.tpl.php b/htdocs/core/tpl/document_actions_pre_headers.tpl.php index 96344944666..06edca3c7c7 100644 --- a/htdocs/core/tpl/document_actions_pre_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_pre_headers.tpl.php @@ -25,7 +25,7 @@ if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { } elseif (GETPOST('linkit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { if ($object->id) { $link = GETPOST('link', 'alpha'); - if ($link) + if ($link) { if (substr($link, 0, 7) != 'http://' && substr($link, 0, 8) != 'https://') { $link = 'http://' . $link; @@ -37,13 +37,13 @@ if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { // Delete file/link -if ($action == 'confirm_deletefile' && $confirm == 'yes') +if ($action == 'confirm_deletefile' && $confirm == 'yes') { - if ($object->id) + if ($object->id) { $urlfile = GETPOST('urlfile', 'alpha'); $linkid = GETPOST('linkid', 'int'); - if ($urlfile) + if ($urlfile) { $file = $upload_dir . "/" . $urlfile; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). @@ -53,10 +53,10 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') } else { setEventMessage($langs->trans("ErrorFailToDeleteFile", $urlfile), 'errors'); } - } - elseif ($linkid) + } + elseif ($linkid) { - require_once DOL_DOCUMENT_ROOT . '/link/class/link.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $link = new Link($db); $link->id = $linkid; $link->fetch(); @@ -71,29 +71,29 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); exit; } -} -elseif ($action == 'confirm_updateline' && GETPOST('save') && GETPOST('link', 'alpha')) +} +elseif ($action == 'confirm_updateline' && GETPOST('save') && GETPOST('link', 'alpha')) { - require_once DOL_DOCUMENT_ROOT . '/link/class/link.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $langs->load('link'); $link = new Link($db); $link->id = GETPOST('linkid', 'int'); $f = $link->fetch(); - if ($f) + if ($f) { $link->url = GETPOST('link', 'alpha'); - if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://') + if (substr($link->url, 0, 7) != 'http://' && substr($link->url, 0, 8) != 'https://') { $link->url = 'http://' . $link->url; } $link->label = GETPOST('label', 'alpha'); $res = $link->update($user); - if (!$res) + if (!$res) { setEventMessage($langs->trans("ErrorFailedToUpdateLink", $link->label)); } - } - else + } + else { //error fetching } diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php index 214b1ac1472..5a9d17e217d 100644 --- a/htdocs/core/tpl/freeproductline_create.tpl.php +++ b/htdocs/core/tpl/freeproductline_create.tpl.php @@ -32,12 +32,6 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob -
"> - - - - global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
@@ -116,7 +110,7 @@ else { tva_assuj == "0") echo '0'; + if ($seller->tva_assuj == "0") echo '0'; else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?$_POST["tva_tx"]:-1), $seller, $buyer); ?> @@ -137,7 +131,7 @@ else { if (! empty($conf->global->DISPLAY_MARGIN_RATES)) { echo '%'; } - elseif (! empty($conf->global->DISPLAY_MARK_RATES)) { + if (! empty($conf->global->DISPLAY_MARK_RATES)) { echo '%'; } } @@ -155,7 +149,7 @@ else { } ?> - + service->enabled) && $dateSelector) if (! empty($object->element) && $object->element == 'contrat') { print $langs->trans("DateStartPlanned").' '; - $form->select_date('',"date_start_sl",$usehm,$usehm,1,"addline_sl"); + $form->select_date('',"date_start",$usehm,$usehm,1,"addline_sl"); print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date('',"date_end_sl",$usehm,$usehm,1,"addline_sl"); + $form->select_date('',"date_end",$usehm,$usehm,1,"addline_sl"); } else { @@ -214,7 +208,6 @@ if (! empty($conf->service->enabled) && $dateSelector) } ?> - rights->margins->creer) @@ -223,34 +216,29 @@ if (! empty($usemargins) && $user->rights->margins->creer) -
id; ?>" method="POST"> - - - - - - - -global->MAIN_VIEW_LINE_NUMBER)) { $coldisplay=2; } else { @@ -45,7 +38,11 @@ if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?> > global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>> -
+
+ + + + global->MAIN_FEATURES_LEVEL > 1) @@ -187,12 +184,15 @@ if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php index 3306e995d58..4816c94e26d 100644 --- a/htdocs/core/tpl/predefinedproductline_create.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php @@ -32,12 +32,6 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob -
"> - - - - global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>> - - % + + % - - "> + + "> rights->margins->creer) { if (! empty($conf->global->DISPLAY_MARGIN_RATES)) { - echo '%'; + echo '%'; } - elseif (! empty($conf->global->DISPLAY_MARK_RATES)) { - echo '%'; + if (! empty($conf->global->DISPLAY_MARK_RATES)) { + echo '%'; } } else @@ -163,7 +157,7 @@ else { } ?> - + service->enabled) && $dateSelector) if (! empty($object->element) && $object->element == 'contrat') { print $langs->trans("DateStartPlanned").' '; - $form->select_date('',"date_start",$usehm,$usehm,1,"addline"); + $form->select_date('',"date_start_predef",$usehm,$usehm,1,"addline"); print '   '.$langs->trans("DateEndPlanned").' '; - $form->select_date('',"date_end",$usehm,$usehm,1,"addline"); + $form->select_date('',"date_end_predef",$usehm,$usehm,1,"addline"); } else { @@ -221,7 +215,6 @@ if (! empty($conf->service->enabled) && $dateSelector) } ?> - rights->margins->creer) @@ -230,52 +223,48 @@ if (! empty($usemargins) && $user->rights->margins->creer) '; - $var=true; print ''; print ''; @@ -1611,14 +1642,20 @@ elseif (! empty($object->id)) print ''; print ''; print '%'; - print ''; + print ''; print ''; - print ''; - // Ajout de produits/services predefinis if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { + print ''; + print ''; print ''; print $langs->trans("AddNewLine").' - '; @@ -1636,21 +1673,16 @@ elseif (! empty($object->id)) print ' '; print ''; - print '
'; - print ''; - print ''; - print ''; - $var=!$var; print ''; print ''; $ajaxoptions=array( - 'update' => array('pqty' => 'qty', 'p_remise_percent' => 'discount'), + 'update' => array('qty_predef' => 'qty_predef', 'remise_percent_predef' => 'remise_percent_predef'), 'option_disabled' => 'addPredefinedProductButton', 'error' => $langs->trans("NoPriceDefinedForThisSupplier") ); - $form->select_produits_fournisseurs($object->fourn_id, '', 'idprodfournprice', '', '', $ajaxoptions); + $form->select_produits_fournisseurs($object->fourn_id, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions); if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) print '
'; @@ -1666,16 +1698,17 @@ elseif (! empty($object->id)) $doleditor->Create(); print ''; - print ''; - print '%'; - print ''; + print ''; + print '%'; + print ''; print ''; - - print '
'; } } print ''; - print '
'; + + print ''; + + dol_fiche_end(); if ($action != 'presend') @@ -1683,7 +1716,7 @@ elseif (! empty($object->id)) /** * Boutons actions */ - if ($user->societe_id == 0 && $action != 'editline' && $action != 'delete') + if ($user->societe_id == 0 && $action != 'edit_line' && $action != 'delete') { print '
'; @@ -1801,9 +1834,9 @@ elseif (! empty($object->id)) * Linked object block */ $somethingshown=$object->showLinkedObjectBlock(); - + print '
'; - + // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index b6a232c2f54..18c515ac34e 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -477,7 +477,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer) } // Modification d'une ligne -elseif ($action == 'update_line') +elseif ($action == 'update_line' && $user->rights->fournisseur->facture->creer) { if (GETPOST('etat') == '1' && ! GETPOST('cancel')) // si on valide la modification { @@ -524,8 +524,32 @@ elseif ($action == 'update_line') } } -elseif ($action == 'addline') +elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) { + $langs->load('errors'); + $error=0; + + // Set if we used free entry or predefined product + if (GETPOST('addline_libre')) + { + $predef=''; + $idprod=0; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + $price_ht = GETPOST('price_ht'); + $tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); + } + if (GETPOST('addline_predefined')) + { + $predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : ''); + $idprod=GETPOST('idprod', 'int'); + $product_desc = (GETPOST('product_desc')?GETPOST('product_desc'):(GETPOST('np_desc')?GETPOST('np_desc'):'')); + $price_ht = ''; + $tva_tx = ''; + } + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); + + $ret=$object->fetch($id); if ($ret < 0) { @@ -534,10 +558,10 @@ elseif ($action == 'addline') } $ret=$object->fetch_thirdparty(); - if (GETPOST('search_idprodfournprice') || GETPOST('idprodfournprice')) // With combolist idprodfournprice is > 0 or -1, with autocomplete, idprodfournprice is > 0 or '' + if (GETPOST('addline_predefined') || GETPOST('search_idprodfournprice') || GETPOST('idprodfournprice')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or '' { $idprod=0; - $product=new Product($db); + $productsupplier=new ProductFournisseur($db); if (GETPOST('idprodfournprice') == '') { @@ -545,33 +569,39 @@ elseif ($action == 'addline') } if (GETPOST('idprodfournprice') > 0) { - $idprod=$product->get_buyprice(GETPOST('idprodfournprice'), $_POST['qty']); // Just to see if a price exists for the quantity. Not used to found vat + $idprod=$productsupplier->get_buyprice(GETPOST('idprodfournprice'), $qty); // Just to see if a price exists for the quantity. Not used to found vat } if ($idprod > 0) { - $result=$product->fetch($idprod); + $result=$productsupplier->fetch($idprod); - // cas special pour lequel on a les meme reference que le fournisseur - // $label = '['.$product->ref.'] - '. $product->libelle; - $label = $product->description; - $label.= $product->description && $_POST['np_desc'] ? "\n" : ""; - $label.= $_POST['np_desc']; + $label = $productsupplier->libelle; - $tvatx=get_default_tva($object->thirdparty, $mysoc, $product->id, $_POST['idprodfournprice']); - $npr = get_default_npr($object->thirdparty, $mysoc, $product->id, $_POST['idprodfournprice']); + $desc = $productsupplier->description; + if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc); + + $tvatx=get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, $_POST['idprodfournprice']); + $npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, $_POST['idprodfournprice']); $localtax1tx= get_localtax($tvatx, 1, $mysoc,$object->thirdparty); $localtax2tx= get_localtax($tvatx, 2, $mysoc,$object->thirdparty); - $remise_percent=GETPOST('remise_percent'); - $type = $product->type; - $result=$object->addline($label, $product->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $_POST['qty'], $idprod, $remise_percent, '', '', 0, $npr); + $type = $productsupplier->type; + $result=$object->addline($desc, $productsupplier->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $qty, $idprod, $remise_percent, '', '', 0, $npr); + } + if ($idprod == 0) + { + // Product not selected + $error++; + $langs->load("errors"); + $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("ProductOrService")).'
'; } if ($idprod == -1) { // Quantity too low + $error++; $langs->load("errors"); $mesg='
'.$langs->trans("ErrorQtyTooLowForThisSupplier").'
'; } @@ -583,35 +613,37 @@ elseif ($action == 'addline') $tauxtva = price2num($tauxtva); $localtax1tx= get_localtax($tauxtva, 1, $mysoc,$object->thirdparty); $localtax2tx= get_localtax($tauxtva, 2, $mysoc,$object->thirdparty); - $remise_percent=GETPOST('remise_percent'); - if (! $_POST['dp_desc']) + if (! $product_desc) { + $error++; $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Description")).'
'; } else - { + { $type = $_POST["type"]; - if (! empty($_POST['amount'])) + + if (! empty($_POST['amount'])) { $ht = price2num($_POST['amount']); $price_base_type = 'HT'; - //$desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0) - $result=$object->addline($_POST['dp_desc'], $ht, $tauxtva, $localtax1tx, $localtax2tx, $_POST['qty'], 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); + //print $product_desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0 + $result=$object->addline($product_desc, $ht, $tauxtva, $localtax1tx, $localtax2tx, $qty, 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); } else { $ttc = price2num($_POST['amountttc']); $ht = $ttc / (1 + ($tauxtva / 100)); $price_base_type = 'HT'; - $result=$object->addline($_POST['dp_desc'], $ht, $tauxtva,$localtax1tx, $localtax2tx, $_POST['qty'], 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); + //print $product_desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0 + $result=$object->addline($product_desc, $ht, $tauxtva,$localtax1tx, $localtax2tx, $qty, 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); } } } //print "xx".$tva_tx; exit; - if ($result > 0) + if (! $error && $result > 0) { // Define output language $outputlangs = $langs; @@ -622,7 +654,8 @@ elseif ($action == 'addline') $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) + { $result=supplier_invoice_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { @@ -633,15 +666,20 @@ elseif ($action == 'addline') unset($_POST['qty']); unset($_POST['type']); - unset($_POST['idprodfournprice']); unset($_POST['remise_percent']); unset($_POST['dp_desc']); - unset($_POST['np_desc']); unset($_POST['pu']); unset($_POST['tva_tx']); unset($_POST['label']); unset($localtax1_tx); unset($localtax2_tx); + + unset($_POST['idprodfournprice']); + unset($_POST['qty_predef']); + unset($_POST['remise_percent_predef']); + unset($_POST['fournprice_predef']); + unset($_POST['buying_price_predef']); + unset($_POST['np_desc']); } else if (empty($mesg)) { @@ -1103,6 +1141,7 @@ if ($action == 'create') print ''; print ''; print ''; + print ''; // Ref @@ -1374,6 +1413,7 @@ else */ $head = facturefourn_prepare_head($object); $titre=$langs->trans('SupplierInvoice'); + dol_fiche_head($head, 'card', $titre, 0, 'bill'); dol_htmloutput_mesg($mesg); @@ -1542,7 +1582,7 @@ else { if ($societe->localtax1_assuj=="1") $nbrows++; if ($societe->localtax2_assuj=="1") $nbrows++; - } + } print ''; - print ''; + print ''; if (! empty($conf->stock->enabled)) print ''; print ''; print '
'; $sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,'; @@ -1790,8 +1830,21 @@ else /* * Lines */ + + + print '
id.(($action != 'edit_line')?'#add':'#line_'.GETPOST('lineid')).'" method="POST"> + + + + + + + + '; + + print '
'; - print ''; + print '
'; $var=1; $num=count($object->lines); for ($i = 0; $i < $num; $i++) @@ -1833,13 +1886,13 @@ else // Edit line if ($object->statut == 0 && $action == 'edit_line' && $_GET['etat'] == '0' && $_GET['lineid'] == $object->lines[$i]->rowid) { - print 'lines[$i]->rowid.'" method="post">'; - print ''; - print ''; print ''; // Show product and description print ''; - print ''; print ''; - print ''; } else // Affichage simple de la ligne { @@ -1972,7 +2024,7 @@ else /* * Form to add new line - */ + */ if ($object->statut == 0 && $action != 'edit_line') { @@ -1992,11 +2044,6 @@ else print ''; // Add free products/services form - print ''; - print ''; - print ''; - print ''; - $var=true; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; - print ''; - print ''; + print ''; // Ajout de produits/services predefinis if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { + print ''; + print ''; print ''; print ''; - // TODO Use the predefinedproductline_create.tpl.php file - print ''; - print ''; - print ''; - print ''; - - print ''; - $var=! $var; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; - print ''; } } print '
'; + + print ''; + if ((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && $object->lines[$i]->fk_product) { print ''; @@ -1888,11 +1941,10 @@ else print ' '; + print ''; print '
'; @@ -2022,23 +2069,30 @@ else print $form->load_tva('tauxtva',(GETPOST('tauxtva')?GETPOST('tauxtva'):-1),$societe,$mysoc); print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print '%  
'; print $langs->trans("AddNewLine").' - '; @@ -2057,30 +2111,16 @@ else print ' 
'; $ajaxoptions=array( - 'update' => array('pqty' => 'qty', 'p_remise_percent' => 'discount'), + 'update' => array('qty_predef' => 'qty_predef', 'remise_percent_predef' => 'remise_percent_predef'), 'disabled' => 'addPredefinedProductButton', 'error' => $langs->trans("NoPriceDefinedForThisSupplier") ); - $form->select_produits_fournisseurs($object->socid, '', 'idprodfournprice', '', '', $ajaxoptions); + $form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions); if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) print '
'; @@ -2096,19 +2136,21 @@ else $doleditor->Create(); print '
%%  
'; - print ''; + print ''; + + dol_fiche_end(); + if ($action != 'presend') { diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index f9ab0cd0cab..e4c0e27ce47 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -265,7 +265,7 @@ if ($action == 'create' || $action == 'add_paiement') $sql.= ' AND f.fk_soc = '.$object->socid; $sql.= ' AND f.paye = 0'; $sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee - $sql.= ' GROUP BY f.rowid, f.ref_supplier, f.total_ht, f.total_ttc, f.datef'; + $sql.= ' GROUP BY f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef'; $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index f2692015d83..b3b109bd076 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -58,7 +58,7 @@ ALTER TABLE llx_facture_fourn DROP INDEX uk_facture_fourn; ALTER TABLE llx_facture_fourn DROP INDEX uk_facture_fourn_ref; UPDATE llx_facture_fourn set ref = NULL where ref = ''; ALTER TABLE llx_facture_fourn ADD UNIQUE INDEX uk_facture_fourn_ref (ref, entity); -ALTER TABLE llx_facture_fourn CHANGE COLUMN facnumber ref_supplier varchar(30); +ALTER TABLE llx_facture_fourn CHANGE COLUMN facnumber ref_supplier varchar(50); ALTER TABLE llx_facture_fourn ADD UNIQUE INDEX uk_facture_fourn_ref_supplier (ref_supplier, fk_soc, entity); @@ -161,22 +161,22 @@ CREATE TABLE llx_c_revenuestamp insert into llx_c_revenuestamp(rowid,fk_pays,taux,note,active) values (101, 10, '0.4', 'Timbre fiscal', 1); -ALTER TABLE llx_c_tva MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_c_tva MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_commandedet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_commandedet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_contratdet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_contratdet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facturedet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_facturedet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_propaldet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0'; -ALTER TABLE llx_propaldet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0'; +ALTER TABLE llx_c_tva MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_c_tva MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_commandedet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_commandedet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_contratdet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_contratdet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facturedet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_facturedet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_propaldet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL; +ALTER TABLE llx_propaldet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL; -- No more use type 7, use revenuse stamp instead UPDATE llx_c_tva set localtax1=0, localtax1_type='0' where localtax1_type = '7'; UPDATE llx_c_tva set localtax2=0, localtax2_type='0' where localtax2_type = '7'; diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index a091e7f089c..2f322881431 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -83,7 +83,9 @@ ALTER TABLE llx_propaldet_extrafields ADD INDEX idx_propaldet_extrafields (fk_ob DROP table llx_adherent_options; DROP table llx_adherent_options_label; -ALTER TABLE llx_user ADD accountancy_code VARCHAR( 24 ) NULL; +ALTER TABLE llx_user ADD accountancy_code VARCHAR(24) NULL; +ALTER TABLE llx_c_chargesociales ADD accountancy_code varchar(24) DEFAULT NULL; + DELETE FROM llx_boxes where box_id IN (SELECT rowid FROM llx_boxes_def where file='box_activity.php' AND note IS NULL); DELETE FROM llx_boxes_def where file='box_activity.php' AND note IS NULL; diff --git a/htdocs/install/mysql/tables/llx_c_chargesociales.sql b/htdocs/install/mysql/tables/llx_c_chargesociales.sql index b6120f31932..b9c448e1d95 100644 --- a/htdocs/install/mysql/tables/llx_c_chargesociales.sql +++ b/htdocs/install/mysql/tables/llx_c_chargesociales.sql @@ -24,7 +24,7 @@ create table llx_c_chargesociales deductible smallint DEFAULT 0 NOT NULL, active tinyint DEFAULT 1 NOT NULL, code varchar(12) NOT NULL, - accountancy_code varchar(15) DEFAULT NULL, + accountancy_code varchar(24) DEFAULT NULL, fk_pays integer DEFAULT 1 NOT NULL, module varchar(32) NULL )ENGINE=innodb; diff --git a/htdocs/langs/el_GR/agenda.lang b/htdocs/langs/el_GR/agenda.lang index a7b8e682f83..85b39d6ea51 100644 --- a/htdocs/langs/el_GR/agenda.lang +++ b/htdocs/langs/el_GR/agenda.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - agenda -# IdAgenda=ID event +IdAgenda=Αναγνωριστικού συμβάντος Actions=Ενέργειες ActionsArea=Περιοχή Ενεργειών (γεγονότα και εργασίες) Agenda= Ημερολόγιο @@ -68,7 +68,7 @@ AgendaUrlOptions5=logind=%s για να περιορίσετε τα απ AgendaShowBirthdayEvents=Εμφάνιση γενεθλίων των προσώπων επικοινωνίας AgendaHideBirthdayEvents=Απόκρυψη γενεθλίων των προσώπων επικοινωνίας Busy=Απασχολ. -# ExportDataset_event1=List of agenda events +ExportDataset_event1=Κατάλογος των εκδηλώσεων # External Sites ical ExportCal=Εξαγωγή ημερολογίου diff --git a/htdocs/langs/el_GR/boxes.lang b/htdocs/langs/el_GR/boxes.lang index ad20603d390..2797eaa0fc3 100644 --- a/htdocs/langs/el_GR/boxes.lang +++ b/htdocs/langs/el_GR/boxes.lang @@ -74,7 +74,7 @@ NoRecordedProducts=Δεν υπάρχουν καταχωρημένα προϊόν NoRecordedProspects=Δεν υπάρχουν προσφορές NoContractedProducts=Δεν υπάρχουν καταχωρημένα συμβόλαια με προϊόντα/υπηρεσίες NoRecordedContracts=Δεν υπάρχουν καταχωρημένα συμβόλαια -# NoRecordedInterventions=No recorded interventions +NoRecordedInterventions=Δεν καταγράφονται παρεμβάσεις BoxLatestSupplierOrders=Τελευταίες παραγγελίες προμηθευτών BoxTitleLatestSupplierOrders=Οι %s τελευταίες παραγγελίες προμηθευτών NoSupplierOrder=Δεν υπάρχουν καταχωρημένες παραγγελίες προμηθευτών @@ -84,8 +84,8 @@ BoxCustomersOrdersPerMonth=Παραγγελίες πελατών ανά μήνα BoxSuppliersOrdersPerMonth=Παραγγελίες προμηθευτών ανά μήνα BoxProposalsPerMonth=Προσφορές ανά μήνα NoTooLowStockProducts=Κανένα προϊόν κάτω από το χαμηλό όριο του αποθέματος -# BoxProductDistribution=Products/Services distribution -# BoxProductDistributionFor=Distribution of %s for %s +BoxProductDistribution=Κατανομή Προϊόντα/Υπηρεσίες +BoxProductDistributionFor=Κατανομή των %s για %s ForCustomersInvoices=Τιμολόγια Πελάτη -# ForCustomersOrders=Customers orders +ForCustomersOrders=Παραγγελίες πελατών ForProposals=Προτάσεις diff --git a/htdocs/langs/el_GR/companies.lang b/htdocs/langs/el_GR/companies.lang index 1aa2a75b1c7..3c7bd8dafbf 100644 --- a/htdocs/langs/el_GR/companies.lang +++ b/htdocs/langs/el_GR/companies.lang @@ -66,8 +66,8 @@ Country=Χώρα CountryCode=Country code CountryId=Κωδικός Χώρα Phone=Τηλέφωνο -# Skype=Skype -# Call=Call +Skype=Skype +Call=Κλήση PhonePro=Επαγγ. τηλέφωνο PhonePerso=Προσωπ. τηλέφωνο PhoneMobile=Κιν. τηλέφωνο @@ -398,7 +398,7 @@ InActivity=Ανοιχτό ActivityCeased=Κλειστό ActivityStateFilter=Το καθεστώς της δραστηριότητας ProductsIntoElements=Κατάλογος των προϊόντων σε -# OutstandingBill=Max. for outstanding bill +OutstandingBill=Μέγιστο. για εκκρεμείς λογαριασμό # Monkey MonkeyNumRefModelDesc=Return numero with format %syymm-nnnn for customer code and %syymm-nnnn for supplier code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. # Leopard diff --git a/htdocs/langs/el_GR/errors.lang b/htdocs/langs/el_GR/errors.lang index 1c1069eb151..bc9f60b4a52 100644 --- a/htdocs/langs/el_GR/errors.lang +++ b/htdocs/langs/el_GR/errors.lang @@ -124,8 +124,8 @@ ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check Mysql server ErrorFailedToAddContact=Failed to add contact ErrorDateMustBeBeforeToday=The date can not be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. -# ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. -# ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s +ErrorPHPNeedModule=Σφάλμα, η PHP σας πρέπει να έχει το module %s εγκατεστημένο για να χρησιμοποιήσετε αυτήν τη δυνατότητα. +ErrorOpenIDSetupNotComplete=Μπορείτε να ρυθμίσετε το Dolibarr αρχείο config να επιτρέψει OpenID ταυτότητα, αλλά το URL OpenID υπηρεσίας δεν ορίζεται σε συνεχή %s # ErrorWarehouseMustDiffers=Source and target warehouses must differs # Warnings diff --git a/htdocs/langs/el_GR/holiday.lang b/htdocs/langs/el_GR/holiday.lang index 2fc6380b7b8..ce75a27700b 100644 --- a/htdocs/langs/el_GR/holiday.lang +++ b/htdocs/langs/el_GR/holiday.lang @@ -87,7 +87,7 @@ FirstDayOfHoliday=Πρώτη μέρα άδειας LastDayOfHoliday=Τελευταία μέρα άδειας HolidaysMonthlyUpdate=Μηνιαία ενημέρωση ManualUpdate=Χειροκίνητη ενημέρωση -# HolidaysCancelation=Holidays cancelation +HolidaysCancelation=Ακύρωση αδειών ## Configuration du Module ## ConfCP=Διαμόρφωση τις ενότητας αδειών diff --git a/htdocs/langs/el_GR/main.lang b/htdocs/langs/el_GR/main.lang index 898177077ab..3b30461d64f 100644 --- a/htdocs/langs/el_GR/main.lang +++ b/htdocs/langs/el_GR/main.lang @@ -155,7 +155,7 @@ Valid=Έγκυρο Approve=Έγκριση ReOpen=Εκ νέου άνοιγμα Upload=Αποστολή Αρχείου -# ToLink=Link +ToLink=Σύνδεσμος Select=Επιλογή Choose=Επιλογή ChooseLangage=Παρακαλούμε επιλέξτε την γλώσσα σας @@ -659,8 +659,8 @@ from=από toward=προς Access=Πρόσβαση HelpCopyToClipboard=Χρησιμοποιήστε το Ctrl + C για να αντιγράψετε στο πρόχειρο -# SaveUploadedFileWithMask=Save file on server with name "%s" (otherwise "%s") -# OriginFileName=Nom d'origine +SaveUploadedFileWithMask=Αποθηκεύστε το αρχείο στον server με το όνομα "%s" (αλλιώς "%s") +OriginFileName=Αρχική Ονομασία # Week day Monday=Δευτέρα diff --git a/htdocs/langs/el_GR/members.lang b/htdocs/langs/el_GR/members.lang index 6384fb82b89..3b5743499f8 100644 --- a/htdocs/langs/el_GR/members.lang +++ b/htdocs/langs/el_GR/members.lang @@ -8,7 +8,7 @@ Members=Μέλη MemberAccount=Είσοδος μέλους ShowMember=Εμφάνιση καρτέλα μέλους UserNotLinkedToMember=Ο χρήστης δεν συνδέετε με κάποιο μέλος -# ThirdpartyNotLinkedToMember=Third-party not linked to a member +ThirdpartyNotLinkedToMember=Πελ./Προμ. δεν συνδέεται με ένα μέλος MembersTickets=Tickets Μελών FundationMembers=Μέλη οργανισμού Attributs=Ιδιότητες diff --git a/htdocs/langs/el_GR/orders.lang b/htdocs/langs/el_GR/orders.lang index 1027e2485b3..79e94cb87be 100644 --- a/htdocs/langs/el_GR/orders.lang +++ b/htdocs/langs/el_GR/orders.lang @@ -147,7 +147,7 @@ AddDeliveryCostLine=Add a delivery cost line indicating the weight of the order # Documents models PDFEinsteinDescription=Ολοκληρωμένο πρότυπο παραγγελίας (λογότυπο...) PDFEdisonDescription=Απλό πρότυπο παραγγελίας -# PDFProformaDescription=A complete proforma invoice (logo…) +PDFProformaDescription=Ένα πλήρες προτιμολόγιο (λογότυπο ...) # Orders modes OrderByMail=Ταχυδρομείο OrderByFax=Φαξ diff --git a/htdocs/langs/el_GR/other.lang b/htdocs/langs/el_GR/other.lang index 3f5ea0063bb..44f0818db7b 100644 --- a/htdocs/langs/el_GR/other.lang +++ b/htdocs/langs/el_GR/other.lang @@ -173,12 +173,12 @@ StartUpload=Έναρξη μεταφόρτωσης CancelUpload=Ακύρωση ανεβάσετε FileIsTooBig=Τα αρχεία είναι πολύ μεγάλο PleaseBePatient=Please be patient... -# RequestToResetPasswordReceived=A request to change your Dolibarr password has been received -# NewKeyIs=This is your new keys to login -# NewKeyWillBe=Your new key to login to software will be -# ClickHereToGoTo=Click here to go to %s -# YouMustClickToChange=You must however first click on the following link to validate this password change -# ForgetIfNothing=If you didn't request this change, just forget this email. Your credentials are kept safe. +RequestToResetPasswordReceived=Η αίτηση για την αλλαγή του κωδικού σας στο Dolibarr έχει παραληφθεί +NewKeyIs=Αυτό είναι το νέο σας κλειδί για να συνδεθείτε +NewKeyWillBe=Το νέο σας κλειδί για να συνδεθείτε με το λογισμικό είναι +ClickHereToGoTo=Κάντε κλικ εδώ για να μεταβείτε στο %s +YouMustClickToChange=Θα πρέπει πρώτα να κάνετε κλικ στον παρακάτω σύνδεσμο για να επικυρώσει την αλλαγή του κωδικού πρόσβασης +ForgetIfNothing=Αν δεν ζητήσατε αυτή την αλλαγή, απλά ξεχάστε αυτό το email. Τα διαπιστευτήριά σας παραμένουν ασφαλή. ##### Calendar common ##### AddCalendarEntry=Προσθήκη εγγραφής στο ημερολόγιο %s diff --git a/htdocs/langs/el_GR/products.lang b/htdocs/langs/el_GR/products.lang index 7b60685c817..8cd274c4205 100644 --- a/htdocs/langs/el_GR/products.lang +++ b/htdocs/langs/el_GR/products.lang @@ -142,11 +142,11 @@ NoStockForThisProduct=Δεν απόθεμα για αυτό το προϊόν NoStock=Χωρίς απόθεμα Restock=Εφοδιάζω με νέα εμπορεύματα ProductSpecial=Ειδικές -# QtyMin=Minimum Qty +QtyMin=Ελάχιστη Ποσότητα PriceQty=Τιμή για την ποσότητα αυτή -# PriceQtyMin=Price for this min. qty (w/o discount) +PriceQtyMin=Τιμή για ελάχιστη ποσότητα (w/o έκπτωση) VATRateForSupplierProduct=VAT Rate (for this supplier/product) -# DiscountQtyMin=Default discount for qty +DiscountQtyMin=Προεπιλεγμένη έκπτωση για ποσότητα NoPriceDefinedForThisSupplier=Δεν υπάρχει τιμή / έκαστος ορίζεται αυτής της επιχείρησης / του προϊόντος NoSupplierPriceDefinedForThisProduct=Δεν υπάρχει τιμή προμηθευτή / έκαστος ορίζονται για αυτό το προϊόν RecordedProducts=Προϊόντα που καταγράφονται @@ -198,9 +198,9 @@ CostPmpHT=Net total VWAP ProductUsedForBuild=Auto consumed by production ProductBuilded=Production completed ProductsMultiPrice=Προϊόν πολλαπλών-τιμών -# ProductSellByQuarterHT=Products turnover quarterly VWAP -# ServiceSellByQuarterHT=Services turnover quarterly VWAP -# Quarter1=1st. Quarter -# Quarter2=2nd. Quarter -# Quarter3=3rd. Quarter -# Quarter4=4th. Quarter +ProductSellByQuarterHT=Προϊόντα του κύκλου εργασιών τριμηνιαία VWAP +ServiceSellByQuarterHT=Υπηρεσίες του κύκλου εργασιών τριμηνιαία VWAP +Quarter1=1ο. Τέταρτο +Quarter2=2ο. Τέταρτο +Quarter3=3η. Τέταρτο +Quarter4=4ο. Τέταρτο diff --git a/htdocs/langs/el_GR/projects.lang b/htdocs/langs/el_GR/projects.lang index 91ec23f450c..c8b56e0cf57 100644 --- a/htdocs/langs/el_GR/projects.lang +++ b/htdocs/langs/el_GR/projects.lang @@ -45,8 +45,8 @@ MyActivities=Οι εργασίες/δραστηρ. μου MyProjects=Τα έργα μου DurationEffective=Αποτελεσματική διάρκεια Progress=Πρόοδος -# ProgressDeclared=Declared progress -# ProgressCalculated=Calculated progress +ProgressDeclared=Χαρακτηρίστηκε σε εξέλιξη +ProgressCalculated=Υπολογιζόμενη πρόοδος Time=Χρόνος ListProposalsAssociatedProject=Κατάλογος των εμπορικών προτάσεων που σχετίζονται με το έργο ListOrdersAssociatedProject=Κατάλογος των ενταλμάτων του πελάτη που σχετίζονται με το έργο @@ -90,8 +90,8 @@ CloneProject=Clone project CloneTasks=Clone tasks CloneContacts=Clone contacts CloneNotes=Clone notes -# CloneProjectFiles=Clone project joined files -# CloneTaskFiles=Clone task(s) joined files (if task(s) cloned) +CloneProjectFiles=Κλώνος έργου εντάχθηκαν αρχεία +CloneTaskFiles=Ο κλώνος εργασία (ες) εντάχθηκαν αρχεία (εάν εργασία (ες) που κλωνοποιήθηκε) ConfirmCloneProject=Are you sure to clone this project ? ProjectReportDate=Change task date according project start date ErrorShiftTaskDate=Impossible to shift task date according to new project start date @@ -106,8 +106,8 @@ TypeContact_project_task_internal_TASKEXECUTIVE=Εκτελεστική ομάδ TypeContact_project_task_external_TASKEXECUTIVE=Εκτελεστική ομάδα TypeContact_project_task_internal_CONTRIBUTOR=Συνεισφέρων TypeContact_project_task_external_CONTRIBUTOR=Συνεισφέρων -# SelectElement=Select element -# AddElement=Link to element +SelectElement=Επιλέξτε το στοιχείο +AddElement=Σύνδεση με το στοιχείο # Documents models DocumentModelBaleine=Μοντέλο έκθεση Μια πλήρης έργου (logo. ..) PlannedWorkload = Σχέδιο φόρτου εργασίας diff --git a/htdocs/langs/el_GR/users.lang b/htdocs/langs/el_GR/users.lang index f2bf23dd419..496b4726ab4 100644 --- a/htdocs/langs/el_GR/users.lang +++ b/htdocs/langs/el_GR/users.lang @@ -116,5 +116,5 @@ DontDowngradeSuperAdmin=Μόνο μια superadmin μπορεί να προβε HierarchicalResponsible=Ιεραρχική ευθύνη HierarchicView=Ιεραρχική προβολή UseTypeFieldToChange=Χρησιμοποιήστε είδος πεδίου για να αλλάξετε -# OpenIDURL=OpenID URL -# LoginUsingOpenID=Use OpenID to login +OpenIDURL=OpenID URL +LoginUsingOpenID=Χρησιμοποιήστε το OpenID για να συνδεθείτε diff --git a/htdocs/langs/el_GR/withdrawals.lang b/htdocs/langs/el_GR/withdrawals.lang index ed888b4e50c..baec6f5a288 100644 --- a/htdocs/langs/el_GR/withdrawals.lang +++ b/htdocs/langs/el_GR/withdrawals.lang @@ -92,5 +92,5 @@ InfoTransMessage=Η διαρκής %s ώστε έχει μεταδίδει στ InfoTransData=Ποσό: %s
Metode: %s
Ημερομηνία: %s InfoFoot=Αυτό είναι ένα αυτοματοποιημένο μήνυμα που αποστέλλεται από Dolibarr InfoRejectSubject=Μόνιμη προκειμένου αρνήθηκε -# InfoRejectMessage=Hello,

the standing order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

--
%s +InfoRejectMessage=Γεια σας,

η πάγια εντολή του τιμολογίου %s που σχετίζεται με την εταιρία %s, με το ποσό των %s έχει απορριφθεί από την τράπεζα.

--
%s ModeWarning=Επιλογή για την πραγματική κατάσταση, δεν είχε καθοριστεί, σταματάμε μετά από αυτή την προσομοίωση diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 0903f98a301..e03b31c1929 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -383,13 +383,13 @@ PaymentInvoiceRef=Payment invoice %s ValidateInvoice=Validate invoice Cash=Cash Reported=Delayed -DisabledBecausePayments=Not possible since there is some payments -CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified payed +DisabledBecausePayments=Not possible since there are some payments +CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified paid ExpectedToPay=Expected payment -PayedByThisPayment=Payed by this payment -ClosePaidInvoicesAutomatically=Classify "Payed" all standard or replacement invoices entirely payed. -ClosePaidCreditNotesAutomatically=Classify "Payed" all credit notes entirely paid back. -AllCompletelyPayedInvoiceWillBeClosed=All invoice with no remain to pay will be automatically closed to status "Payed". +PayedByThisPayment=Paid by this payment +ClosePaidInvoicesAutomatically=Classify "Paid" all standard or replacement invoices entirely paid. +ClosePaidCreditNotesAutomatically=Classify "Paid" all credit notes entirely paid back. +AllCompletelyPayedInvoiceWillBeClosed=All invoice with no remain to pay will be automatically closed to status "Paid". ToMakePayment=Pay ToMakePaymentBack=Pay back ListOfYourUnpaidInvoices=List of unpaid invoices @@ -405,11 +405,11 @@ TypeContact_invoice_supplier_external_BILLING=Supplier invoice contact TypeContact_invoice_supplier_external_SHIPPING=Supplier shipping contact TypeContact_invoice_supplier_external_SERVICE=Supplier service contact # crabe PDF Model -PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (Template recommanded) +PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (recommended Template) # oursin PDF Model -PDFOursinDescription=Invoice PDF template Oursin. A complete invoice template (Template alternative) +PDFOursinDescription=Invoice PDF template Oursin. A complete invoice template (alternative Template) # NumRef Modules -TerreNumRefModelDesc1=Return numero with format %syymm-nnnn for standard and replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for deposits where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 -MarsNumRefModelDesc1=Return numero with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for credit notes and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 86943b910e9..bd4b72b8236 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -18,8 +18,8 @@ Permission23104 = Execute Scheduled task # Admin # CronSetup= Scheduled job management setup -URLToLaunchCronJobs=URL to launch cron jobs -OrToLaunchASpecificJob=Or to launch a specific job +URLToLaunchCronJobs=URL to check and launch cron jobs if required +OrToLaunchASpecificJob=Or to check and launch a specific job KeyForCronAccess=Security key for URL to launch cron jobs FileToLaunchCronJobs=Command line to launch cron jobs CronExplainHowToRunUnix=On Unix environment you should use crontab to run Command line each minutes @@ -32,6 +32,7 @@ CronExplainHowToRunWin=On Microsoft(tm) Windows environement you can use Schedul CronJobs=Scheduled jobs CronListActive= List of active jobs CronListInactive= List of disabled jobs +CronListActive= List of scheduled jobs # @@ -42,7 +43,7 @@ CronLastOutput=Last run output CronLastResult=Last result code CronListOfCronJobs=List of scheduled jobs CronCommand=Command -CronList= Job list +CronList=Jobs list CronDelete= Delete cron jobs CronConfirmDelete= Are you sure you want to delete this cron job ? CronExecute=Launch job diff --git a/htdocs/langs/en_US/dict.lang b/htdocs/langs/en_US/dict.lang index 945585a1b4b..65e21a2c5fc 100644 --- a/htdocs/langs/en_US/dict.lang +++ b/htdocs/langs/en_US/dict.lang @@ -6,6 +6,7 @@ CountryES=Spain CountryDE=Germany CountryCH=Switzerland CountryGB=Great Britain +CountryUK=United Kingdom CountryIE=Ireland CountryCN=China CountryTN=Tunisia diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index dc05a09916f..37be1d12b25 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1,13 +1,13 @@ # Dolibarr language file - Source file is en_US - main DIRECTION=ltr -# Note for chinese: -# msungstdlight or cid0ct are for traditionnal chinese (traditionnal does not render with ubuntu pdf reader) -# stsongstdlight or cid0cs are for simplified chinese -# To read chinese pdf with linux: sudo apt-get install poppler-data +# Note for Chinese: +# msungstdlight or cid0ct are for traditional Chinese (traditional does not render with Ubuntu pdf reader) +# stsongstdlight or cid0cs are for simplified Chinese +# To read Chinese pdf with Linux: sudo apt-get install poppler-data FONTFORPDF=helvetica FONTSIZEFORPDF=10 -SeparatorDecimal=, -SeparatorThousand=None +SeparatorDecimal=. +SeparatorThousand=, FormatDateShort=%m/%d/%Y FormatDateShortInput=%m/%d/%Y FormatDateShortJava=MM/dd/yyyy @@ -65,7 +65,7 @@ BackgroundColorByDefault=Default background color FileWasNotUploaded=A file is selected for attachment but was not yet uploaded. Click on "Attach file" for this. NbOfEntries=Nb of entries GoToWikiHelpPage=Read online help (need Internet access) -GoToHelpPage=Read help +GoToHelpPage=Read help RecordSaved=Record saved RecordDeleted=Record deleted LevelOfFeature=Level of features @@ -226,7 +226,7 @@ DateValueShort=Value date DateOperation=Operation date DateOperationShort=Oper. Date DateLimit=Limit date -DateRequest=Request date +DateRequest=Request date DateProcess=Process date DatePlanShort=Date planed DateRealShort=Date real. @@ -447,30 +447,30 @@ SeptemberMin=Sep OctoberMin=Oct NovemberMin=Nov DecemberMin=Dec -Month01=january -Month02=february -Month03=march -Month04=april -Month05=may -Month06=june -Month07=july -Month08=august -Month09=september -Month10=october -Month11=november -Month12=december -MonthShort01=jan -MonthShort02=feb -MonthShort03=mar -MonthShort04=apr -MonthShort05=may -MonthShort06=jun -MonthShort07=jul -MonthShort08=aug -MonthShort09=sep -MonthShort10=oct -MonthShort11=nov -MonthShort12=dec +Month01=January +Month02=February +Month03=March +Month04=April +Month05=May +Month06=June +Month07=July +Month08=August +Month09=September +Month10=October +Month11=November +Month12=December +MonthShort01=Jan +MonthShort02=Feb +MonthShort03=Mar +MonthShort04=Apr +MonthShort05=May +MonthShort06=Jun +MonthShort07=Jul +MonthShort08=Aug +MonthShort09=Sep +MonthShort10=Oct +MonthShort11=Nov +MonthShort12=Dec AttachedFiles=Attached files and documents FileTransferComplete=File was uploaded successfuly DateFormatYYYYMM=YYYY-MM @@ -607,7 +607,7 @@ MenuManager=Menu manager NoMenu=No sub-menu WarningYouAreInMaintenanceMode=Warning, you are in a maintenance mode, so only login %s is allowed to use application at the moment. CoreErrorTitle=System error -CoreErrorMessage=Sorry, an error occurred. Check the logs or contact your system administrator. +CoreErrorMessage=Sorry, an error occurred. Check the logs or contact your system administrator. CreditCard=Credit card FieldsWithAreMandatory=Fields with %s are mandatory FieldsWithIsForPublic=Fields with %s are shown on public list of members. If you don't want this, check off the "public" box. @@ -632,7 +632,7 @@ IM=Instant messaging NewAttribute=New attribute AttributeCode=Attribute code OptionalFieldsSetup=Extra attributes setup -URLPhoto=Url of photo/logo +URLPhoto=URL of photo/logo SetLinkToThirdParty=Link to another third party CreateDraft=Create draft ClickToEdit=Click to edit @@ -642,7 +642,7 @@ ByTown=By town ByDate=By date ByMonthYear=By month/year ByYear=By year -ByMonth=by month +ByMonth=By month ByDay=By day BySalesRepresentative=By sales representative LinkedToSpecificUsers=Linked to a particular user contact @@ -660,7 +660,7 @@ toward=toward Access=Access HelpCopyToClipboard=Use Ctrl+C to copy to clipboard SaveUploadedFileWithMask=Save file on server with name "%s" (otherwise "%s") -OriginFileName=Nom d'origine +OriginFileName=Original filename # Week day Monday=Monday diff --git a/htdocs/langs/en_US/margins.lang b/htdocs/langs/en_US/margins.lang index 0bed1bc3b02..680a303a245 100644 --- a/htdocs/langs/en_US/margins.lang +++ b/htdocs/langs/en_US/margins.lang @@ -47,5 +47,5 @@ BuyingCost=Cost price UnitCharges=Unit charges Charges=Charges -AgentContactType=Contact type used for commissioning -AgentContactTypeDetails=Défine what contact type (linked on invoices) will be associated with commercial agents \ No newline at end of file +AgentContactType=Commercial agent contact type +AgentContactTypeDetails=Défine what contact type (linked on invoices) will be used for margin report by commercial agents diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index c6a72ec672a..76acd7022fc 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -6,7 +6,7 @@ Tools=Tools ToolsDesc=This area is dedicated to group miscellaneous tools not available into other menu entries.

Those tools can be reached from menu on the side. Birthday=Birthday BirthdayDate=Birthday -DateToBirth=Date to birth +DateToBirth=Date of birth BirthdayAlertOn= birthday alert active BirthdayAlertOff= birthday alert inactive Notify_FICHINTER_VALIDATE=Intervention validated diff --git a/htdocs/langs/en_US/printipp.lang b/htdocs/langs/en_US/printipp.lang index 9df63bd9961..cc719fddded 100644 --- a/htdocs/langs/en_US/printipp.lang +++ b/htdocs/langs/en_US/printipp.lang @@ -1,9 +1,9 @@ # Dolibarr language file - Source file is en_US - printipp -PrintIPPSetup=Setup of module Direct Print -PrintIPPDesc=Ce module permet d'ajouter un bouton d'impression direct des documents vers votre imprimante. Il requiert un systeme Linux équipé de Cups. -PRINTIPP_ENABLED=Show picto "Direct print" into list of documents +PrintIPPSetup=Setup of Direct Print module +PrintIPPDesc=This module adds a Print button to send documents directly to a printer. It requires a Linux system with CUPS installed. +PRINTIPP_ENABLED=Show "Direct print" icon in document lists PRINTIPP_HOST=Print server PRINTIPP_PORT=Port PRINTIPP_USER=Login PRINTIPP_PASSWORD=Password -NoPrinterFound=No printers found (check your Cups etup) +NoPrinterFound=No printers found (check your CUPS setup) diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index 2d1ba3584c3..91d4a473d6e 100644 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -18,8 +18,8 @@ RequestStandingOrderToTreat=Request for standing orders to treat RequestStandingOrderTreated=Request for standing orders treated CustomersStandingOrders=Customer standing orders CustomerStandingOrder=Customer standing order -NbOfInvoiceToWithdraw=Nb of invoice with withdraw request -NbOfInvoiceToWithdrawWithInfo=Nb of invoice with withdraw request for customers having defined bank account information +NbOfInvoiceToWithdraw=No. of invoice with withdraw request +NbOfInvoiceToWithdrawWithInfo=No. of invoice with withdraw request for customers having defined bank account information InvoiceWaitingWithdraw=Invoice waiting for withdraw AmountToWithdraw=Amount to withdraw WithdrawsRefused=Withdraws refused @@ -34,14 +34,14 @@ ThirdPartyBankCode=Third party bank code ThirdPartyDeskCode=Third party desk code NoInvoiceCouldBeWithdrawed=No invoice withdrawed with success. Check that invoice are on companies with a valid BAN. ClassCredited=Classify credited -ClassCreditedConfirm=Are you sure you want to classify this withdrawal receipt as credited on your bank account ? -TransData=Date Transmission -TransMetod=Method Transmission +ClassCreditedConfirm=Are you sure you want to classify this withdrawal receipt as credited on your bank account? +TransData=Transmission date +TransMetod=Transmission method Send=Send Lines=Lines -StandingOrderReject=Issue a reject +StandingOrderReject=Issue a rejection InvoiceRefused=Invoice refused -WithdrawalRefused=Withdrawal Refused +WithdrawalRefused=Withdrawal refused WithdrawalRefusedConfirm=Are you sure you want to enter a withdrawal rejection for society RefusedData=Date of rejection RefusedReason=Reason for rejection @@ -51,15 +51,15 @@ InvoiceRefused=Charge the rejection to customer Status=Status StatusUnknown=Unknown StatusWaiting=Waiting -StatusTrans=Transmitted +StatusTrans=Sent StatusCredited=Credited StatusRefused=Refused StatusMotif0=Unspecified -StatusMotif1=Provision insuffisante -StatusMotif2=Tirage conteste +StatusMotif1=Insufficient funds +StatusMotif2=Request contested StatusMotif3=No Withdrawal order StatusMotif4=Customer Order -StatusMotif5=RIB inexploitable +StatusMotif5=RIB unusable StatusMotif6=Account without balance StatusMotif7=Judicial Decision StatusMotif8=Other reason @@ -78,18 +78,18 @@ BankToReceiveWithdraw=Bank account to receive withdraws CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country ShowWithdraw=Show Withdraw -IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one withdrawal payment not yet processed, it won't be set as payed to allow to manage withdrawal before. -DoStandingOrdersBeforePayments=This tabs allows you to request for a standing order. Once it will be finished, you can type the payment to close the invoice. +IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one withdrawal payment not yet processed, it won't be set as paid to allow prior withdrawal management. +DoStandingOrdersBeforePayments=This tab allows you to request a standing order. Once it is complete, you can type the payment to close the invoice. WithdrawalFile=Withdrawal file SetToStatusSent=Set to status "File Sent" -ThisWillAlsoAddPaymentOnInvoice=This will also create payments onto invoices and will classify them to paid +ThisWillAlsoAddPaymentOnInvoice=This will also apply payments to invoices and will classify them as "Paid" ### Notifications InfoCreditSubject=Payment of standing order %s by the bank InfoCreditMessage=The standing order %s has been paid by the bank
Data of payment: %s InfoTransSubject=Transmission of standing order %s to bank -InfoTransMessage=The standing order %s has been transmited to bank by %s %s.

-InfoTransData=Amount: %s
Metode: %s
Date: %s +InfoTransMessage=The standing order %s has been sent to bank by %s %s.

+InfoTransData=Amount: %s
Method: %s
Date: %s InfoFoot=This is an automated message sent by Dolibarr InfoRejectSubject=Standing order refused InfoRejectMessage=Hello,

the standing order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

--
%s diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index b617586c967..557c907ed3c 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -480,15 +480,15 @@ Module2400Name=Agenda Module2400Desc=Gestion des actions (événements et tâches) et de l'agenda Module2500Name=Gestion électronique de documents Module2500Desc=Permet de stocker et administrer une base de documents -Module2600Name= WebServices -Module2600Desc= Active le serveur de Web Services de Dolibarr -Module2700Name= Gravatar -Module2700Desc= Utilise le service en ligne Gravatar (www.gravatar.com) pour afficher les photos d'utilisateurs/membres (en fonction leur e-mail). Besoin d'un accès Internet +Module2600Name=WebServices +Module2600Desc=Active le serveur de Web Services de Dolibarr +Module2700Name=Gravatar +Module2700Desc=Utilise le service en ligne Gravatar (www.gravatar.com) pour afficher les photos d'utilisateurs/membres (en fonction leur e-mail). Besoin d'un accès Internet Module2800Desc=Client FTP -Module2900Name= GeoIPMaxmind -Module2900Desc= Capacités de conversion GeoIP Maxmind -Module3100Name= Skype -Module3100Desc= Ajouter un button Skype dans les fiches adhérents / tiers / contacts +Module2900Name=GeoIPMaxmind +Module2900Desc=Capacités de conversion GeoIP Maxmind +Module3100Name=Skype +Module3100Desc=Ajouter un button Skype dans les fiches adhérents / tiers / contacts Module5000Name=Multi-société Module5000Desc=Permet de gérer plusieurs sociétés Module6000Name=Workflow @@ -499,8 +499,8 @@ Module50000Name=PayBox Module50000Desc=Module permettant d'offrir en ligne une page de paiement par carte de crédit avec PayBox Module50100Name=Point de vente Module50100Desc=Caisse enregistreuse de point de vente -Module50200Name= Paypal -Module50200Desc= Module permettant d'offrir en ligne une page de paiement par carte de crédit avec Paypal +Module50200Name=Paypal +Module50200Desc=Module permettant d'offrir en ligne une page de paiement par carte de crédit avec Paypal Module54000Name=PrintIPP Module54000Desc=Impression via Cups IPP Printer. Module55000Name=Open Survey @@ -698,6 +698,7 @@ Permission1234=Supprimer les factures fournisseur Permission1235=Envoyer les factures fournisseur par mail Permission1236=Exporter les factures fournisseurs, attributs et règlements Permission1237=Exporter les commande fournisseurs, attributs +<<<<<<< HEAD Permission1251=Lancer des importations en masse dans la base (chargement de données) Permission1321=Exporter les factures clients, attributs et règlements Permission1421=Exporter les commandes clients et attributs @@ -734,6 +735,47 @@ DictionnaryCivility=Titres de civilité DictionnaryActions=Liste des types d'événements de l'agenda DictionnarySocialContributions=Types de charges sociales DictionnaryVAT=Taux de TVA ou de taxes de ventes +======= +Permission1251= Lancer des imports de masse dans la base (chargement de données) +Permission1321= Exporter les factures clients, attributs et règlements +Permission1401= Lire le plan de compte +Permission1402= Créer/modifier un plan de compte +Permission1403= Clôturer un plan de compte +Permission1411= Lire les mouvements comptables +Permission1412= Créer/modifier/annuler les mouvements comptables +Permission1415= Lire CA, bilans, résultats, journaux, grands livres +Permission1421= Exporter les commandes clients et attributs +Permission23001 = Voir les tâches planifiée +Permission23002 = Créer/Modifier les tâches planifiée +Permission23003 = Supprimer les tâches planifiée +Permission23004 = Exécuter les tâches planifiée +Permission2401= Lire les actions (événements ou tâches) liées à son compte +Permission2402= Créer/modifier les actions (événements ou tâches) liées à son compte +Permission2403= Supprimer les actions (événements ou tâches) liées à son compte +Permission2411= Lire les actions (événements ou tâches) des autres +Permission2412= Créer/modifier les actions (événements ou tâches) pour les autres +Permission2413= Supprimer les actions (événements ou tâches) pour les autres +Permission2501= Lire/Récupérer les documents +Permission2502= Récupérer les documents +Permission2503= Soumettre ou supprimer des documents +Permission2515= Administrer les rubriques de documents +Permission2801=Utiliser un client FTP en mode lecture (parcours et download de fichiers) +Permission2802=Utiliser un client FTP en mode écriture (suppression et upload de fichiers) +Permission50101=Utiliser Point de vente +Permission50201= Consulter les transactions +Permission50202= Importer les transactions +DictionnaryCompanyType= Types de sociétés +DictionnaryCompanyJuridicalType= Formes juridiques +DictionnaryProspectLevel= Niveau de potentiel des prospects +DictionnaryCanton= Départements/Provinces/Cantons +DictionnaryRegion= Régions +DictionnaryCountry= Pays +DictionnaryCurrency= Monnaies +DictionnaryCivility= Titres de civilité +DictionnaryActions= Liste des types d'événements de l'agenda +DictionnarySocialContributions= Types de charges sociales +DictionnaryVAT= Taux de TVA ou de Taxes de Ventes +>>>>>>> refs/remotes/origin/3.4 DictionnaryRevenueStamp=Montants des timbres fiscaux DictionnaryPaymentConditions=Conditions de règlement DictionnaryPaymentModes=Modes de paiements diff --git a/htdocs/langs/fr_FR/cron.lang b/htdocs/langs/fr_FR/cron.lang index d4e10c80fca..7131755b04c 100644 --- a/htdocs/langs/fr_FR/cron.lang +++ b/htdocs/langs/fr_FR/cron.lang @@ -17,21 +17,21 @@ Permission23104 = Lancer un travail planifié # # Admin # -CronSetup= Page de configuration du module - Gestion des travaux planifiées -URLToLaunchCronJobs=URL pour lancer les travaux planifiés actifs -OrToLaunchASpecificJob=Ou pour lancer un travail planifié spécifique -KeyForCronAccess=Clé de sécurité pour l'URL de lancement des travaux planifiés -FileToLaunchCronJobs=Commande pour lancer les travaux planifiés actifs +CronSetup= Page de configuration du module - Gestion des travaux programmés +URLToLaunchCronJobs=URL pour vérifier et lancer les travaux programmés actifs +OrToLaunchASpecificJob=Ou pour vérifier et lancer un travail programmé spécifique +KeyForCronAccess=Clé de sécurité pour l'URL de lancement des travaux programmés +FileToLaunchCronJobs=Commande pour lancer les travaux programmés actifs CronExplainHowToRunUnix=Sur un environnement Unix vous pouvez utiliser 'crontab' pour exécuter une commande toute les minutes CronExplainHowToRunWin=Sur un environement Microsoft(tm) Windows vous pouvez utiliser le planificateur de tâche pour lancer une commande toute les minutes - # # Menu # -CronJobs=Travaux planifiés +CronJobs=Travaux programmés CronListActive= Liste des travaux actifs CronListInactive= Liste des travaux inactifs +CronListActive= Liste des travaux programmés # @@ -42,15 +42,15 @@ CronLastOutput=Sortie du dernier lancement CronLastResult=Dernier code de retour CronListOfCronJobs=Liste des travaux planifiés CronCommand=Commande -CronList= Liste des travaux -CronDelete= Supprimer les travaux cron -CronConfirmDelete= Êtes-vous sûr de vouloir supprimer ces travaux cron ? +CronList=Liste des travaux +CronDelete=Supprimer les travaux cron +CronConfirmDelete=Êtes-vous sûr de vouloir supprimer ces travaux cron ? CronExecute=Lancer cette tâche -CronConfirmExecute= Êtes-vous sûr de vouloir lancer ce travail maintenant? -CronInfo= Les travaux planifiés permettent d'exécuter des tâches à intervales réguliers +CronConfirmExecute=Êtes-vous sûr de vouloir lancer ce travail maintenant? +CronInfo=Les travaux planifiés permettent d'exécuter des tâches à intervales réguliers CronWaitingJobs=Travaux en attente CronTask=Tâche -CronNone= Aucun(e) +CronNone=Aucun(e) CronDtStart=Date de début CronDtEnd=Date de fin CronDtNextLaunch=Prochaine exécution diff --git a/htdocs/langs/fr_FR/dict.lang b/htdocs/langs/fr_FR/dict.lang index d9ad934f22f..3a1c7e95ea2 100644 --- a/htdocs/langs/fr_FR/dict.lang +++ b/htdocs/langs/fr_FR/dict.lang @@ -5,7 +5,8 @@ CountryIT=Italie CountryES=Espagne CountryDE=Allemagne CountryCH=Suisse -CountryGB=Royaume-Uni +CountryGB=Grande-Bretagne +CountryUK=Royaume-Uni CountryIE=Irlande CountryCN=Chine CountryTN=Tunisie diff --git a/htdocs/langs/fr_FR/margins.lang b/htdocs/langs/fr_FR/margins.lang index d7ab2594d7d..2d943dad3fa 100644 --- a/htdocs/langs/fr_FR/margins.lang +++ b/htdocs/langs/fr_FR/margins.lang @@ -47,5 +47,5 @@ BuyingCost=Coût de revient UnitCharges=Charge unitaire Charges=Charges -AgentContactType=Type de contact commissionné -AgentContactTypeDetails=Permet de définir le type de contact associé aux factures qui sera associé aux agents commerciaux +AgentContactType=Type de contact agent commercial +AgentContactTypeDetails=Permet de définir le type de contact associé aux factures qui sera utilisé pour le rapport de marges par agent commercial diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index 1f352d98c6f..1aed61b67ad 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -56,7 +56,7 @@ ListSupplierOrdersAssociatedProject=Liste des commandes fournisseurs associées ListSupplierInvoicesAssociatedProject=Liste des factures fournisseurs associées au projet ListContractAssociatedProject=Liste des contrats associés au projet ListFichinterAssociatedProject=Liste des interventions associées au projet -ListTripAssociatedProject=Liste des notes de frais associés au projet +ListTripAssociatedProject=Liste des notes de frais associées au projet ListActionsAssociatedProject=Liste des événements associés au projet ActivityOnProjectThisWeek=Activité sur les projets cette semaine ActivityOnProjectThisMonth=Activité sur les projets ce mois @@ -94,7 +94,7 @@ CloneProjectFiles=Cloner les pièces jointes du projet CloneTaskFiles=Cloner les pièces jointes des tâche(s) (si tâche(s) cloner) ConfirmCloneProject=Êtes-vous sûr de vouloir cloner ce projet ? ProjectReportDate=Reporter les dates des tâches en fonction de la date de départ. -ErrorShiftTaskDate=Une erreur c'est produite dans le report des dates des tâches. +ErrorShiftTaskDate=Une erreur s'est produite dans le report des dates des tâches. ProjectsAndTasksLines=Projets et tâches ProjectCreatedInDolibarr=Projet %s créé ##### Types de contacts ##### @@ -110,6 +110,12 @@ SelectElement=Séléctionnez l'élément AddElement=Link to element # Documents models DocumentModelBaleine=Modèle de rapport de projet complet (logo...) +<<<<<<< HEAD PlannedWorkload = Charge de travail prévue WorkloadOccupation= Pourcentage affectation ProjectReferers=Objets associés +======= +SelectElement=Eléments associables au projet : +AddElement=Associer +ProjectReferers=Objets associés +>>>>>>> refs/remotes/origin/3.4 diff --git a/htdocs/langs/lv_LV/admin.lang b/htdocs/langs/lv_LV/admin.lang index 9f74ccba901..282cd30002b 100644 --- a/htdocs/langs/lv_LV/admin.lang +++ b/htdocs/langs/lv_LV/admin.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - admin Foundation=Pamats Version=Versija -VersionProgram=Versija programma +VersionProgram=Programmas versija VersionLastInstall=Versija sākotnējo instalēt VersionLastUpgrade=Jaunākajai jauninājums VersionExperimental=Eksperimentāls @@ -27,9 +27,9 @@ DBSortingCharset=Datu bāzes rakstzīmju kopas, lai kārtotu datus WarningModuleNotActive=Moduļu %s ir jābūt aktivizētam WarningOnlyPermissionOfActivatedModules=Tikai atļaujas, kas saistīti ar aktīviem moduļi tiek parādīts šeit. Jūs varat aktivizēt citus moduļus Home-> Setup-> moduļi lapā. DolibarrSetup=Dolibarr instalēt vai atjaunināt -DolibarrUser=Dolibarr lietotāju -InternalUser=Iekšējo lietotāju -ExternalUser=Ārējo lietotāju +DolibarrUser=Dolibarr lietotājs +InternalUser=Iekšējais lietotājs +ExternalUser=Ārējais lietotājs InternalUsers=Iekšējie lietotāji ExternalUsers=Ārējie lietotāji GlobalSetup=Global iestatīšana @@ -43,7 +43,7 @@ SecuritySetup=Drošības iestatīšana ErrorModuleRequirePHPVersion=Kļūda, šis modulis ir nepieciešama PHP versija %s vai augstāka ErrorModuleRequireDolibarrVersion=Kļūda, šis modulis prasa Dolibarr versija %s vai augstāka ErrorDecimalLargerThanAreForbidden=Kļūda, precizitāte augstāka nekā %s netiek atbalstīta. -DictionnarySetup=Vārdnīca iestatīšana +DictionnarySetup=Vārdnīcas iestatīšana Dictionnary=Vārdnīcas ErrorReservedTypeSystemSystemAuto=Vērtību "sistēma" un "systemauto" veida tiek aizsargātas. Jūs varat izmantot "lietotājs", kā vērtība, lai pievienotu savu ierakstu ErrorCodeCantContainZero=Kodu nevar saturēt vērtību 0 @@ -68,7 +68,7 @@ Table=Tabula Fields=Lauki Index=Indekss Mask=Maska -NextValue=Tālāk vērtība +NextValue=Nākošā vērtība NextValueForInvoices=Tālāk vērtība (rēķini) NextValueForCreditNotes=Tālāk vērtība (kredīta piezīmes) NextValueForDeposit=Tālāk vērtība (depozīts) @@ -90,7 +90,7 @@ MenuIdParent=Mātes izvēlne ID DetailMenuIdParent=ID vecāku izvēlnē (tukšs top izvēlnē) DetailPosition=Šķirot skaits definēt izvēlnes novietojumu PersonalizedMenusNotSupported=Personalizētā izvēlnes neatbalsta -AllMenus=Visi +AllMenus=Viss NotConfigured=Modulis nav konfigurēts Setup=Setup Activation=Aktivizācija @@ -146,7 +146,7 @@ PurgeNothingToDelete=Nav direktoriju vai failu izdzēst. PurgeNDirectoriesDeleted=%s failus vai direktorijas dzēsti. PurgeAuditEvents=Iztīrīšana visus drošības pasākumus ConfirmPurgeAuditEvents=Vai jūs tiešām vēlaties, lai iztīrītu visus drošības pasākumus? Visi drošības žurnāli tiks dzēsti, nekādi citi dati tiks noņemts. -NewBackup=Jauns rezerves +NewBackup=Jauna rezerves kopija GenerateBackup=Izveidot rezerves Backup=Backup Restore=Atjaunot @@ -285,7 +285,7 @@ InfDirExample=
Tad paziņo to failu conf.php
$ Dolibarr_main_url_root_a YouCanSubmitFile=Izvēlieties moduli: CurrentVersion=Dolibarr pašreizējā versija CallUpdatePage=Iet uz lapu, kas aktualizē datu bāzes struktūras un datas: %s. -LastStableVersion=Pēdējā stabila versija +LastStableVersion=Pēdējā stabilā versija GenericMaskCodes=Jūs varat ievadīt jebkuru numerācijas masku. Šajā maska, šādus tagus var izmantot:
{000000} atbilst skaitam, kas tiks palielināts par katru %s. Ievadīt tik daudz nullēm, kā vajadzīgajā garumā letes. Skaitītājs tiks pabeigts ar nullēm no kreisās puses, lai būtu tik daudz nullēm kā masku.
{000000 000} tāds pats kā iepriekšējais, bet kompensēt atbilst noteiktam skaitam pa labi uz + zīmi tiek piemērots, sākot ar pirmo %s.
{000000 @ x} tāds pats kā iepriekšējais, bet skaitītājs tiek atiestatīts uz nulli, kad mēnesī x ir sasniegts (x no 1 līdz 12, 0 vai izmantot agri no finanšu gada mēnešiem, kas noteiktas konfigurācijas, 99 vai atiestatīt uz nulli katru mēnesi ). Ja šis variants tiek izmantots, un x ir 2 vai vairāk, tad secība {gggg} {mm} vai {GGGG} {mm} ir arī nepieciešama.
{Dd} diena (no 01 līdz 31).
{Mm} mēnesi (no 01 līdz 12).
{Yy}, {GGGG} vai {y} gadu vairāk nekā 2, 4 vai 1 numuri.
GenericMaskCodes2={CCCC} klienta kodu
{Cccc000} klienta kodu par n burtiem seko klienta ref letes bez kompensācijas un zeroized ar pasaules letes.
{Tttt} kods uzņēmuma veida par n zīmēm (skat. dictionnary-uzņēmumu veidiem).
GenericMaskCodes3=Visas citas rakstzīmes masku paliks neskarts.
Atstarpes nav atļauts.
@@ -344,7 +344,7 @@ SecurityTokenIsUnique=Izmantojiet unikālu securekey parametrs katram URL EnterRefToBuildUrl=Ievadiet atsauce objektu %s GetSecuredUrl=Saņemt aprēķina URL ButtonHideUnauthorized=Slēpt pogas, lai neatļautu rīcību, nevis rāda invalīdu pogas -ProductVatMassChange=Masu PVN maiņa +ProductVatMassChange=Masveida PVN maiņa ProductVatMassChangeDesc=Šī lapa var tikt izmantota, lai mainītu PVN likmi, kas noteikta par produktiem vai pakalpojumiem, no kura vērtība uz otru. Uzmanību, šīs izmaiņas tiek darīts uz visiem datu bāzē. OldVATRates=Vecā PVN likme NewVATRates=Jaunā PVN likme @@ -432,7 +432,7 @@ Module75Name=Izdevumu un ceļojumu piezīmes Module75Desc=Izdevumi un ceļojumu piezīmes vadība Module80Name=Sūtījumiem Module80Desc=Sūtījumi un piegādes rīkojumu vadība -Module85Name=Bankas un naudas +Module85Name=Bankas un nauda Module85Desc=Vadība banku vai naudas kontos Module100Name=Ārējā vietne Module100Desc=Šis modulis ietver ārējo tīmekļa vietni vai lapu par Dolibarr izvēlnēm un apskatīt to uz Dolibarr rāmī @@ -484,7 +484,7 @@ Module2600Name= Veikalu Module2600Desc= Ļautu Dolibarr tīmekļa pakalpojumu serveri Module2700Name= Gravatar Module2700Desc= Izmantot tiešsaistes Gravatar pakalpojumu (www.gravatar.com), lai parādītu fotogrāfijas lietotāju / dalībnieku (atrasts ar saviem e-pastiem). Nepieciešams interneta piekļuves -Module2800Desc=FTP Client +Module2800Desc=FTP klients Module2900Name= GeoIPMaxmind Module2900Desc= GeoIP MaxMind pārveidošanu iespējas Module3100Name= Skype @@ -497,8 +497,8 @@ Module20000Name=Brīvdienas Module20000Desc=Atzīt un ievērot darbinieku brīvdienas Module50000Name=Paybox Module50000Desc=Modulis piedāvā tiešsaistes maksājumu lapā, ar kredītkarti, ar Paybox -Module50100Name=Punktu pārdošanas -Module50100Desc=Punktu pārdošanas moduļa +Module50100Name=Tirdzniecības punkts +Module50100Desc=Tirdzniecības punkta moduļi Module50200Name= Paypal Module50200Desc= Modulis piedāvā tiešsaistes maksājumu lapā ar kredītkarti ar Paypal Module54000Name=PrintIPP @@ -646,7 +646,7 @@ Permission293=Modificēt klientiem tarifus Permission300=Lasīt svītrkodus Permission301=Izveidot / mainīt svītrkodus Permission302=Dzēst svītrkodus -Permission311=Lasīt pakalpojumi +Permission311=Lasīt pakalpojumus Permission312=Piešķirt pakalpojumu līgumu Permission331=Lasīt grāmatzīmes Permission332=Izveidot / mainīt grāmatzīmes @@ -784,19 +784,19 @@ LocalTax2IsUsedExampleES= Spānijā, ārštata un neatkarīgi profesionāļi, ka LocalTax2IsNotUsedExampleES= Spānijā tie Bussines neattiecas uz nodokļu sistēmas moduļiem. LabelUsedByDefault=Label izmantots pēc noklusējuma, ja nav tulkojuma var atrast kodu LabelOnDocuments=Marķējums uz dokumentiem -NbOfDays=Nb dienu +NbOfDays=dienu sk AtEndOfMonth=Perioda beigās Offset=Kompensācija AlwaysActive=Vienmēr ir aktīva UpdateRequired=Jūsu sistēma ir jāatjaunina. Lai to izdarītu, noklikšķiniet uz Update tagad . -Upgrade=Upgrade -MenuUpgrade=Upgrade / Extend +Upgrade=Atjaunināt +MenuUpgrade=Atjaunināt / Paplašināt AddExtensionThemeModuleOrOther=Pievienot paplašinājumu (tēma, modulis, ...) WebServer=Tīmekļa serveris DocumentRootServer=Web servera saknes direktorijā DataRootServer=Datu failu direktorija IP=IP -Port=Osta +Port=Ports VirtualServerName=Virtuālā servera nosaukums AllParameters=Visi parametri OS=OS @@ -808,14 +808,14 @@ Pear=Bumbieris PearPackages=Bumbieru paketes Browser=Browser Server=Serveris -Database=Datu bāze +Database=Datubāze DatabaseServer=Datu bāzes serveris DatabaseName=Datu bāzes nosaukums DatabasePort=Datu bāzes osta -DatabaseUser=Datu bāzes lietotāju -DatabasePassword=Datu bāzes paroli +DatabaseUser=Datubāzes lietotājs +DatabasePassword=Datubāzes parole DatabaseConfiguration=Datu bāzes iestatīšana -Tables=Galdi +Tables=Tabulas TableName=Tabulas nosaukums TableLineFormat=Līnija formāts NbOfRecord=Nb ierakstu @@ -854,13 +854,13 @@ CompanyInfo=Uzņēmuma / nodibinājums informācija CompanyIds=Uzņēmuma / nodibinājums identitātes CompanyName=Nosaukums CompanyAddress=Adrese -CompanyZip=Rāvējslēdzējs +CompanyZip=Pasta indekss CompanyTown=Pilsēta CompanyCountry=Valsts CompanyCurrency=Galveno valūtu Logo=Logotips DoNotShow=Nerādīt -DoNotSuggestPaymentMode=Neapgalvoju +DoNotSuggestPaymentMode=Neieteikt NoActiveBankAccountDefined=Nav aktīvas bankas definēts kontu OwnerOfBankAccount=Īpašnieks bankas kontu %s BankModuleNotActive=Bankas konti modulis nav atļautas @@ -895,8 +895,8 @@ Audit=Revīzija InfoDolibarr=Infos Dolibarr InfoOS=Infos OS InfoWebServer=Infos tīmekļa serveris -InfoDatabase=Infos datu bāzes -InfoPHP=Infos PHP +InfoDatabase=Datubāzes informācija +InfoPHP=PHP Informācija InfoPerf=Infos izrādes ListEvents=Audita notikumi ListOfSecurityEvents=Saraksts Dolibarr drošības pasākumu @@ -964,7 +964,7 @@ ProxyDesc=Dažas Dolibarr funkcijas ir nepieciešama piekļuve internetam, lai s ExternalAccess=Ārējās piekļuves MAIN_PROXY_USE=Izmantot starpniekserveri (citādi tieša piekļuve internetam) MAIN_PROXY_HOST=Nosaukums / adrese proxy serveri -MAIN_PROXY_PORT=Osta proxy serveri +MAIN_PROXY_PORT=Proxy servera ports MAIN_PROXY_USER=Pieslēdzies, lai izmantotu starpniekserveri MAIN_PROXY_PASS=Parole, lai izmantotu starpniekserveri DefineHereComplementaryAttributes=Definēt šeit visi atribūti, jau nav pieejama pēc noklusējuma, un, ka jūs vēlaties būt atbalstīta %s. @@ -1017,7 +1017,7 @@ GeneratePassword=Ieteikt ģenerēto paroli RuleForGeneratedPasswords=Noteikums, lai radītu piedāvātos paroles vai apstiprināt paroles DoNotSuggest=Neliecina jebkuru paroli EncryptedPasswordInDatabase=Lai ļautu šifrēšanas paroles datu bāzē -DisableForgetPasswordLinkOnLogonPage=Neparāda uz saites "Aizmirsi paroli" uz pieteikšanās lapu +DisableForgetPasswordLinkOnLogonPage=Nerādīt saiti "Aizmirsu paroli" pieteikšanās lapā UsersSetup=Lietotāji modulis uzstādīšana UserMailRequired=E-Mail nepieciešams, lai izveidotu jaunu lietotāju ##### Company setup ##### @@ -1046,7 +1046,7 @@ WebCalNoByDefault=Pēc pieprasījuma (nav pēc noklusējuma) WebCalNever=Nekad WebCalURL=URL kalendāra piekļuvi WebCalServer=Servera hosting kalendārs datu bāzes -WebCalDatabaseName=Datu bāzes nosaukums +WebCalDatabaseName=Datubāzes nosaukums WebCalUser=Lietotājam, lai piekļūtu datu bāzes WebCalSetupSaved=WebCalendar uzstādīšana ir veiksmīgi saglabāta. WebCalTestOk=Savienojums ar serveri "%s" par datu bāzē "%s" ar lietotāja %s "sekmīgi pabeigta. @@ -1063,7 +1063,7 @@ WebCalUrlForVCalExport=Eksporta saite uz %s formātā ir pieejams šādā WebCalCheckWebcalSetup=Varbūt webcal modulis uzstādīšana nav pareizs. ##### Invoices ##### BillsSetup=Rēķini modulis uzstādīšana -BillsDate=Rēķini datumu +BillsDate=Rēķinu datums BillsNumberingModule=Rēķini un kredīta piezīmes numerācijas modeli BillsPDFModules=Rēķina dokumenti modeļi CreditNoteSetup=Kredītu piezīme modulis uzstādīšana @@ -1138,8 +1138,8 @@ LDAPSynchronizeContacts=Organizēšana kontaktu LDAP LDAPSynchronizeMembers=Organizēšana Fonda locekļu LDAP LDAPTypeExample=OpenLDAP, eGroupware vai Active Directory LDAPPrimaryServer=Galvenais serveris -LDAPSecondaryServer=Sekundārā servera -LDAPServerPort=Porta +LDAPSecondaryServer=Sekundārais serveris +LDAPServerPort=Servera ports LDAPServerPortExample=Noklusējuma ports: 389 LDAPServerProtocolVersion=Protokols versija LDAPServerUseTLS=Izmantot TLS diff --git a/htdocs/langs/lv_LV/agenda.lang b/htdocs/langs/lv_LV/agenda.lang index fe0bd8ed62c..5639b80dd4f 100644 --- a/htdocs/langs/lv_LV/agenda.lang +++ b/htdocs/langs/lv_LV/agenda.lang @@ -6,7 +6,7 @@ Agenda= Darba kārtība Agendas= Darba kārtība Calendar= Kalendārs Calendars= Kalendāri -LocalAgenda=Vietējā kalendārs +LocalAgenda=Lokālais kalendārs AffectedTo= Piešķirts DoneBy= Izdarīt Events= Pasākumi diff --git a/htdocs/langs/lv_LV/boxes.lang b/htdocs/langs/lv_LV/boxes.lang index 766ace38f66..0d1d4286be8 100644 --- a/htdocs/langs/lv_LV/boxes.lang +++ b/htdocs/langs/lv_LV/boxes.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - boxes BoxLastRssInfos=RSS informācija -BoxLastProducts=Pēdējās %s produkti / pakalpojumi +BoxLastProducts=Pēdējie %s produkti / pakalpojumi BoxProductsAlertStock=Produkti pārdošanā brīdinājumu BoxLastProductsInContract=Pēdējās %s līgumi produktu / pakalpojumu BoxLastSupplierBills=Pagājušā piegādātāja rēķinus @@ -26,7 +26,7 @@ BoxTitleLastBooks=Pēdējās %s ierakstītas grāmatas BoxTitleNbOfCustomers=Klientu skaits BoxTitleLastRssInfos=Pēdējo reizi %s ziņas no %s BoxTitleLastProducts=Pēdējās %s modificēta produktu / pakalpojumu -BoxTitleProductsAlertStock=Produkti pārdošanā brīdinājumu +BoxTitleProductsAlertStock=Produktu un krājumu brīdinājumi BoxTitleLastCustomerOrders=Pēdējās %s modificēts klientu pasūtījumus BoxTitleLastSuppliers=Pēdējās %s reģistrēti piegādātāji BoxTitleLastCustomers=Pēdējās %s ierakstītas klientiem diff --git a/htdocs/langs/lv_LV/cashdesk.lang b/htdocs/langs/lv_LV/cashdesk.lang index 66ef3dec11b..ca698ce927f 100644 --- a/htdocs/langs/lv_LV/cashdesk.lang +++ b/htdocs/langs/lv_LV/cashdesk.lang @@ -1,15 +1,15 @@ # Language file - Source file is en_US - cashdesk -CashDeskMenu=Tirdzniecības vietā -CashDesk=Tirdzniecības vietā -CashDesks=Punktu pārdošanas +CashDeskMenu=Tirdzniecības vieta +CashDesk=Tirdzniecības vieta +CashDesks=Tirdzniecības vietas CashDeskBank=Bankas konts -CashDeskBankCash=Bankas konts (naudas) +CashDeskBankCash=Bankas konts (skaidra nauda) CashDeskBankCB=Bankas konts (karte) -CashDeskBankCheque=Bankas konts (pārbaude) +CashDeskBankCheque=Bankas konts (čeks) CashDeskWarehouse=Noliktava CashdeskShowServices=Pārdošanas pakalpojumi CashDeskProducts=Produkti -CashDeskStock=Krājums +CashDeskStock=Krājumi CashDeskOn=uz CashDeskThirdParty=Trešās puses CashdeskDashboard=Tirdzniecības vietu piekļuvi diff --git a/htdocs/langs/lv_LV/companies.lang b/htdocs/langs/lv_LV/companies.lang index aa3f65d9c2f..1b2fcd0ca09 100644 --- a/htdocs/langs/lv_LV/companies.lang +++ b/htdocs/langs/lv_LV/companies.lang @@ -1,38 +1,38 @@ # Dolibarr language file - Source file is en_US - companies ErrorCompanyNameAlreadyExists=Uzņēmuma nosaukums %s jau pastāv. Izvēlieties citu. ErrorPrefixAlreadyExists=Prefikss %s jau pastāv. Izvēlieties citu. -ErrorSetACountryFirst=Iestatītu valsti vispirms -SelectThirdParty=Izvēlieties trešo personu +ErrorSetACountryFirst=Izvēlieties vispirms valsti +SelectThirdParty=Izvēlieties trešo pusi DeleteThirdParty=Dzēst trešo pusi -ConfirmDeleteCompany=Vai tiešām vēlaties dzēst šo uzņēmumu un visu mantoto informāciju? -DeleteContact=Izdzēstu kontaktu / adrese -ConfirmDeleteContact=Vai tiešām vēlaties dzēst šo kontaktu un visu mantoto informāciju? -MenuNewThirdParty=Jauns trešā persona +ConfirmDeleteCompany=Vai tiešām vēlaties dzēst šo uzņēmumu un visu informāciju, kas saistīta ar to? +DeleteContact=Izdzēst kontaktu / adresi +ConfirmDeleteContact=Vai tiešām vēlaties dzēst šo kontaktu un visu informāciju par šo kontaktu? +MenuNewThirdParty=Jauna trešā persona MenuNewCompany=Jauns uzņēmums MenuNewCustomer=Jauns klients MenuNewProspect=Jauns izredzes MenuNewSupplier=Jauns piegādātājs -MenuNewPrivateIndividual=Jauns privātpersona +MenuNewPrivateIndividual=Jauna privātpersona MenuSocGroup=Grupas -NewCompany=Jaunu uzņēmumu (prospekts, klients, piegādātājs) +NewCompany=Jauns uzņēmums (prospekts, klients, piegādātājs) NewThirdParty=Jauns trešā persona (prospekts, klients, piegādātājs) -NewSocGroup=Jaunu uzņēmumu grupā -NewPrivateIndividual=Jauns privātpersona (prospekts, klients, piegādātājs) +NewSocGroup=Jauna uzņēmumu grupa +NewPrivateIndividual=Jauna privātpersona (prospekts, klients, piegādātājs) ProspectionArea=Ogļūdeņražu meklēšanai platība SocGroup=Uzņēmumu grupa -IdThirdParty=Id trešā persona +IdThirdParty=Trešās personas Id IdCompany=Uzņēmuma Id IdContact=Sazinieties ar ID -Contacts=Kontakti / adreses +Contacts=Kontaktu / adreses ThirdPartyContacts=Trešās puses kontakti ThirdPartyContact=Trešās puses kontakts / adrese StatusContactValidated=Statuss kontakta / adreses -Company=Kompānija +Company=Uzņēmums CompanyName=Uzņēmuma nosaukums Companies=Uzņēmumi -CountryIsInEEC=Valsts ir iekšā Eiropas Ekonomikas kopienas +CountryIsInEEC=Valsts ir Eiropas Ekonomikas kopienas dalībvalsts ThirdPartyName=Trešās puses nosaukums -ThirdParty=Trešās puses +ThirdParty=Trešā puse ThirdParties=Trešās personas ThirdPartyAll=Trešās personas (viss) ThirdPartyProspects=Perspektīvas @@ -44,11 +44,11 @@ ThirdPartySuppliers=Piegādātāji ThirdPartyType=Trešās puses tips Company/Fundation=Kompānija / Foundation Individual=Privātpersona -ToCreateContactWithSameName=Radīs automātiski fizisku kontaktu ar pašu informations +ToCreateContactWithSameName=Izveidos automātiski kontaktu ar šo pašu informāciju ParentCompany=Mātes uzņēmumam Subsidiary=Filiāle -Subsidiaries=Meitas uzņēmumi -NoSubsidiary=Nav meitas +Subsidiaries=Filiāles +NoSubsidiary=Nav filiāles ReportByCustomers=Ziņojums, ko klienti ReportByQuarter=Ziņojums pēc kursa CivilityCode=Pieklājība kods @@ -58,7 +58,7 @@ Lastname=Uzvārds Firstname=Vārds PostOrFunction=Post / Funkcija UserTitle=Virsraksts -Surname=Uzvārds / Pseido +Surname=Uzvārds / Pseidonīms Address=Adrese State=Valsts / province Region=Rajons @@ -68,19 +68,19 @@ CountryId=Valsts id Phone=Telefons Skype=Skype Call=Zvanīt -PhonePro=Prof tālrunis +PhonePro=Darba tālrunis PhonePerso=Pers. telefons -PhoneMobile=Mobils -No_Email=Nesūtiet masu e-pasta sūtījumi -Fax=Faksa +PhoneMobile=Mobilais +No_Email=Nesūtīt masu e-pasta sūtījumus +Fax=Fakss Zip=Pasta indekss Town=Pilsēta -Web=Web +Web=Mājaslapa Poste= Amats DefaultLang=Valoda pēc noklusējuma VATIsUsed=PVN tiek izmantots VATIsNotUsed=PVN netiek izmantots -CopyAddressFromSoc=Aizpildiet adresi thirdparty adresi +CopyAddressFromSoc=Aizpildiet trešās puses adresi ##### Local Taxes ##### LocalTax1IsUsedES= RE tiek izmantota LocalTax1IsNotUsedES= RE netiek izmantots @@ -230,9 +230,9 @@ ProfId6RU=- VATIntra=PVN numurs VATIntraShort=PVN numurs VATIntraVeryShort=PVN -VATIntraSyntaxIsValid=Sintakse ir derīgs -VATIntraValueIsValid=Vērtība ir derīga -ProspectCustomer=Prospect / Klientu +VATIntraSyntaxIsValid=Sintakse ir pareiza +VATIntraValueIsValid=Vērtība ir pareizas +ProspectCustomer=Prospect / Klients Prospect=Perspektīva CustomerCard=Klienta karte Customer=Klients @@ -256,21 +256,21 @@ CompanyList=Kompānijas sarakstā AddContact=Pievienot kontaktu AddContactAddress=Pievienot kontaktu / adrese EditContact=Labot kontaktu -EditContactAddress=Labot kontaktu / adrese +EditContactAddress=Labot kontakta / adresi Contact=Sazināties ContactsAddresses=Kontakti / adreses NoContactDefinedForThirdParty=Nav kontakta definēts šīs trešās personas NoContactDefined=Nav kontakta definēts DefaultContact=Default kontakta / adrese AddCompany=Pievienot uzņēmumu -AddThirdParty=Pievienot trešo personu +AddThirdParty=Pievienot trešo pusi DeleteACompany=Dzēst uzņēmumu PersonalInformations=Personas dati AccountancyCode=Grāmatvedība kods CustomerCode=Klienta kods -SupplierCode=Piegādātājs kods -CustomerAccount=Klienta konta -SupplierAccount=Piegādātājs kontu +SupplierCode=Piegādātāja kods +CustomerAccount=Klienta konts +SupplierAccount=Piegādātāja konts CustomerCodeDesc=Klienta kods, unikāls visiem klientiem SupplierCodeDesc=Piegādātājs kods, unikāli visiem piegādātājiem RequiredIfCustomer=Nepieciešams, ja trešā puse ir klients vai izredzes @@ -289,7 +289,7 @@ ListOfCompanies=Uzņēmumu sarakstu ListOfThirdParties=Saraksts ar trešajām personām ShowCompany=Rādīt uzņēmumu ShowContact=Rādīt sazināties -ContactsAllShort=Visas (Nr. filtrs) +ContactsAllShort=Visi (Bez filtra) ContactType=Sazinieties tipa ContactForOrders=Ordeņa kontakts ContactForProposals=Priekšlikuma kontakts @@ -314,7 +314,7 @@ VATIntraCheckDesc=Saite %s ļauj lūgt Eiropas PVN pārbaudītājs pakalp VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do VATIntraCheckableOnEUSite=Pārbaudiet Intracomunnautary PVN par Eiropas komisijā vietas VATIntraManualCheck=Jūs varat arī pārbaudīt manuāli no eiropas mājas lapas %s -ErrorVATCheckMS_UNAVAILABLE=Pārbaudiet nav iespējams. Pārbaudiet pakalpojums netiek nodrošināts ar dalībvalsts (%s). +ErrorVATCheckMS_UNAVAILABLE=Pārbaude nav iespējams. Pārbaudes pakalpojums netiek nodrošināts no dalībvalsts (%s). NorProspectNorCustomer=Tāpat arī izredzes, ne klientu JuridicalStatus=Juridiskais statuss Staff=Personāls @@ -334,10 +334,10 @@ TE_UNKNOWN=- TE_STARTUP=Starta TE_GROUP=Liels uzņēmums TE_MEDIUM=Vidēja uzņēmums -TE_ADMIN=Valdības +TE_ADMIN=Valsts iestāde TE_SMALL=Mazs uzņēmums TE_RETAIL=Mazumtirgotājs -TE_WHOLE=Wholetailer +TE_WHOLE=Vairumtrirgotājs TE_PRIVATE=Privātpersona TE_OTHER=Cits StatusProspect-1=Nesazināties @@ -352,8 +352,8 @@ ChangeContactInProcess=Mainīt statusu uz "Kontaktēties procesā" ChangeContactDone=Mainīt statusu uz "Kontaktēties jādara" ProspectsByStatus=Perspektīvas pēc statusa BillingContact=Norēķinu kontakts -NbOfAttachedFiles=Skaits pievienotos failus -AttachANewFile=Pievienojiet jaunu failu +NbOfAttachedFiles=Pievienoto failu skaits +AttachANewFile=Pievienot jaunu failu NoRIB=Nav noteikts BAN NoParentCompany=Neviens ExportImport=Import-Export @@ -372,7 +372,7 @@ DeliveryAddress=Piegādes adrese DeliveryAddressLabel=Piegādes adrese etiķete DeleteDeliveryAddress=Dzēst piegādes adresi ConfirmDeleteDeliveryAddress=Vai tiešām vēlaties dzēst šo piegādes adresi? -NewDeliveryAddress=Jauns piegādes adrese +NewDeliveryAddress=Jauna piegādes adrese AddDeliveryAddress=Pievienot adresi AddAddress=Pievienot adresi NoOtherDeliveryAddress=Nav alternatīvu piegādes definēts adrese @@ -380,15 +380,15 @@ SupplierCategory=Piegādātājs kategorija JuridicalStatus200=Neatkarīga DeleteFile=Izdzēst failu ConfirmDeleteFile=Vai jūs tiešām vēlaties izdzēst šo failu? -AllocateCommercial=Piešķirts pārdošanas pārstāvis -SelectCountry=Izvēlēties valsti +AllocateCommercial=Piešķirts pārdošanas pārstāvim +SelectCountry=Izvēlieties valsti SelectCompany=Izvēlieties trešo personu Organization=Organizēšana -AutomaticallyGenerated=Automātiski ģenerē -FiscalYearInformation=Informācija par fiskālajā gadā -FiscalMonthStart=Sākot mēnesis fiskālajā gadā +AutomaticallyGenerated=Automātiski ģenerēts +FiscalYearInformation=Informācija par fiskālo gadu +FiscalMonthStart=Fiskālā gada pirmais mēnesis YouMustCreateContactFirst=Jums ir izveidot e-pastus kontaktus trešās puses vispirms, lai varētu pievienot e-pastus paziņojumus. -ListSuppliersShort=Piegādātāju +ListSuppliersShort=Piegādātāju saraksts ListProspectsShort=Saraksts perspektīvas ListCustomersShort=Klientu saraksts ThirdPartiesArea=Trešām pusēm platība @@ -397,9 +397,9 @@ UniqueThirdParties=Kopā unikālu trešajām personām InActivity=Atvērt ActivityCeased=Slēgts ActivityStateFilter=Aktivitātes statuss -ProductsIntoElements=To produktu saraksts, uz +ProductsIntoElements=Produktu saraksts uz OutstandingBill=Maks. par izcilu rēķinu # Monkey MonkeyNumRefModelDesc=Atgriešanās Numero ar formātu %syymm-NNNN par klientu kodu un %syymm-NNNN forsupplier kodu, kur gg ir gads, MM ir mēnesis, un nnnn ir secība bez pārtraukuma un bez atgriezties 0. # Leopard -LeopardNumRefModelDesc=Kods ir bez maksas. Šis kods var grozīt jebkurā laikā. +LeopardNumRefModelDesc=Kods ir bez maksas. Šo kodu var mainīt jebkurā laikā. diff --git a/htdocs/langs/lv_LV/externalsite.lang b/htdocs/langs/lv_LV/externalsite.lang index f8549f7c2e1..2c84feb75bb 100644 --- a/htdocs/langs/lv_LV/externalsite.lang +++ b/htdocs/langs/lv_LV/externalsite.lang @@ -1,4 +1,4 @@ # Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup saite uz ārējo vietni +ExternalSiteSetup=Ārējo vietņu iestatīšana ExternalSiteURL=Ārējā Vietnes URL -ExternalSiteModuleNotComplete=Modulis ExternalSite nebija pareizi konfigurēts. +ExternalSiteModuleNotComplete=Modulis ExternalSite nav pareizi konfigurēts. diff --git a/htdocs/langs/lv_LV/ftp.lang b/htdocs/langs/lv_LV/ftp.lang index a867df4fdce..5ca26d72706 100644 --- a/htdocs/langs/lv_LV/ftp.lang +++ b/htdocs/langs/lv_LV/ftp.lang @@ -1,12 +1,12 @@ # Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client modulis iestatīšana -NewFTPClient=Jauns FTP savienojumu iestatīšana -FTPArea=FTP vieta -FTPAreaDesc=Šis ekrāns parādīs saturu FTP servera skatu -SetupOfFTPClientModuleNotComplete=Setup FTP klienta modulis, šķiet, nav pabeigta -FTPFeatureNotSupportedByYourPHP=Jūsu PHP neatbalsta FTP funkcijas -FailedToConnectToFTPServer=Neizdevās izveidot savienojumu ar FTP serveri (servera %s, ostu %s) -FailedToConnectToFTPServerWithCredentials=Neizdevās, lai pieteiktos uz FTP serveri ar noteiktu login / paroli +FTPClientSetup=FTP Klienta moduļa iestatīšana +NewFTPClient=Jauna FTP savienojuma iestatīšana +FTPArea=FTP sadaļa +FTPAreaDesc=Šis logs attēlo FTP servera saturu +SetupOfFTPClientModuleNotComplete=FTP klienta moduļa konfigurēšana, nav pabeigta +FTPFeatureNotSupportedByYourPHP=Jūsu PHP neatbalsta FTP funkciju +FailedToConnectToFTPServer=Neizdevās izveidot savienojumu ar FTP serveri (serveris %s, posts %s) +FailedToConnectToFTPServerWithCredentials=Neizdevās pieslēgties FTP serverim ar norādīto lietotāju / paroli FTPFailedToRemoveFile=Neizdevās noņemt failu %s. -FTPFailedToRemoveDir=Neizdevās noņemt direktoriju %s (Pārbaudiet atļaujas un tas katalogs ir tukša). -FTPPassiveMode=Pasīvā režīmā +FTPFailedToRemoveDir=Neizdevās noņemt direktoriju %s (Pārbaudiet atļaujas un to vai katalogs ir tukšs). +FTPPassiveMode=Pasīvais režīms diff --git a/htdocs/langs/lv_LV/install.lang b/htdocs/langs/lv_LV/install.lang index 860af386e33..bd5e9acfbad 100644 --- a/htdocs/langs/lv_LV/install.lang +++ b/htdocs/langs/lv_LV/install.lang @@ -1,14 +1,14 @@ # Dolibarr language file - Source file is en_US - install InstallEasy=Vienkārši sekojiet instrukcijām soli pa solim. -MiscellaneousChecks=Priekšnoteikumi pārbaude +MiscellaneousChecks=Priekšnoteikumu pārbaude DolibarrWelcome=Laipni lūdzam Dolibarr -ConfFileExists=Konfigurācijas failu %s eksistē. -ConfFileDoesNotExists=Konfigurācijas failu %s neeksistē! -ConfFileDoesNotExistsAndCouldNotBeCreated=Konfigurācijas failu %s nav un nevar tikt izveidots! -ConfFileCouldBeCreated=Konfigurācijas failu %s varētu izveidot. -ConfFileIsNotWritable=Konfigurācijas fails %s nav rakstāms. Pārbaudiet atļaujas. Par pirmo instalēt, jūsu tīmekļa serveris ir jāpiešķir, lai varētu rakstīt šajā failā laikā konfigurācijas process ("chmod 666", piemēram, uz kā OS UNIX). -ConfFileIsWritable=Konfigurācijas fails %s ir rakstāms. -ConfFileReload=Pārlādēt visu informāciju no konfigurācijas failu. +ConfFileExists=Konfigurācijas fails %s eksistē. +ConfFileDoesNotExists=Konfigurācijas fails %s neeksistē! +ConfFileDoesNotExistsAndCouldNotBeCreated=Konfigurācijas fails %s nav un nevar tikt izveidots! +ConfFileCouldBeCreated=Konfigurācijas failu %s nevar izveidot. +ConfFileIsNotWritable=Konfigurācijas failam %s nav rakstīšanas tiesības. Pārbaudiet atļaujas. Par pirmo instalēt, jūsu tīmekļa serveris ir jāpiešķir, lai varētu rakstīt šajā failā laikā konfigurācijas process ("chmod 666", piemēram, uz kā OS UNIX). +ConfFileIsWritable=Konfigurācijas failā %s var ierakstīt. +ConfFileReload=Pārlādēt visu informāciju no konfigurācijas faila. PHPSupportSessions=Šis PHP atbalsta sesijas. PHPSupportPOSTGETOk=Šis PHP atbalsta mainīgie POST un GET. PHPSupportPOSTGETKo=Tas ir iespējams, jūsu PHP uzstādīšana neatbalsta mainīgie POST un / vai GET. Pārbaudiet savu parametrs variables_order in php.ini. @@ -25,40 +25,40 @@ ErrorGoBackAndCorrectParameters=Iet atpakaļ un labot nepareizus parametrus. ErrorWrongValueForParameter=Iespējams, esat ievadījis nepareizu vērtību parametra "%s". ErrorFailedToCreateDatabase=Neizdevās izveidot datubāzi '%s ". ErrorFailedToConnectToDatabase=Neizdevās izveidot savienojumu ar datu bāzi "%s". -ErrorDatabaseVersionTooLow=Datu bāzes versija (%s) pārāk vecs. Versija %s vai augstāka ir nepieciešama. +ErrorDatabaseVersionTooLow=Datu bāzes versija (%s) pārāk veca. Versija %s vai augstāka ir nepieciešama. ErrorPHPVersionTooLow=PHP versija ir pārāk veca. Versija %s ir nepieciešama. WarningPHPVersionTooLow=PHP versija ir pārāk veca. Versija %s vai vairāk ir sagaidāms. Šī versija ļaus uzstādīt, bet netiek atbalstīta. ErrorConnectedButDatabaseNotFound=Savienojums ar serveri sekmīgi pabeigta, bet datubāze "%s" nav atrasts. ErrorDatabaseAlreadyExists=Datubāze "%s" jau eksistē. IfDatabaseNotExistsGoBackAndUncheckCreate=Ja datu bāzē neeksistē, dodieties atpakaļ un pārbaudiet opciju "Izveidot datu bāzi". -IfDatabaseExistsGoBackAndCheckCreate=Ja datu bāze jau pastāv, dodieties atpakaļ un atzīmēšanu "Izveidot datu bāzi" variantu. +IfDatabaseExistsGoBackAndCheckCreate=Ja datu bāze jau pastāv, dodieties atpakaļ un izņemiet ķeksi "Izveidot datu bāzi" . WarningBrowserTooOld=Pārāk vecs versiju. Uzlabot savu pārlūkprogrammu, lai jaunāko versiju Firefox, Chrome vai Opera ir ļoti recommanded. PHPVersion=PHP versija YouCanContinue=Jūs varat turpināt ... PleaseBePatient=Lūdzu, esiet pacietīgi ... License=Izmantojot licenci -ConfigurationFile=Konfigurācijas failu -WebPagesDirectory=Katalogs kur web lapas tiek uzglabāti +ConfigurationFile=Konfigurācijas fails +WebPagesDirectory=Katalogs kur web lapas tiek uzglabātas DocumentsDirectory=Direktorijā uzglabāt augšupielādēto un rada dokumentus URLRoot=URL Root ForceHttps=Force drošus savienojumus (https) CheckToForceHttps=Pārbaudiet šo opciju, lai piespiestu drošus savienojumus (https).
Tas nozīmē, ka tīmekļa serveris ir konfigurēts ar SSL sertifikātu. -DolibarrDatabase=Dolibarr datu bāze -DatabaseChoice=Datu bāzes izvēle -DatabaseType=Datu bāzes tips +DolibarrDatabase=Dolibarr datubāze +DatabaseChoice=Datubāzes izvēle +DatabaseType=Datubāzes tips DriverType=Driver tips Server=Serveris ServerAddressDescription=Nosaukums vai IP adrese datu bāzes serveri, parasti "localhost", kad datu bāzes serveris ir izvietots uz paša servera, kā web serveri -ServerPortDescription=Datu bāzes servera portu. Saglabājiet tukšu, ja nav zināms. -DatabaseServer=Datu bāzes serveris -DatabaseName=Datu bāzes nosaukums -DatabasePrefix=Datu bāzes prefiksu tabula +ServerPortDescription=Datu bāzes servera ports. Atstājiet tukšu, ja nav zināms. +DatabaseServer=Datubāzes serveris +DatabaseName=Datubāzes nosaukums +DatabasePrefix=Datubāzes tabulu prefikss Login=Login AdminLogin=Pieteikšanās uz Dolibarr datu bāzes īpašnieks. Password=Parole PasswordAgain=Atkārtot paroli otrreiz AdminPassword=Parole Dolibarr datu bāzes īpašnieks. -CreateDatabase=Izveidot datu bāzi +CreateDatabase=Izveidot datubāzi CreateUser=Izveidot īpašnieks DatabaseSuperUserAccess=Datu bāzes serveris - superlietotājs piekļuve CheckToCreateDatabase=Rūtiņu, ja datu bāze neeksistē, un ir izveidots.
Tādā gadījumā, jums ir jāaizpilda pieteikšanās / paroli SuperUser kontā pie šīs lapas apakšā. @@ -84,8 +84,8 @@ PleaseTypePassword=Lūdzu, ievadiet paroli, tukšas paroles ir aizliegts! PleaseTypeALogin=Lūdzu ierakstiet pieteikšanās! PasswordsMismatch=Paroles atšķiras, lūdzu, mēģiniet vēlreiz! SetupEnd=Beigas iestatīšanas -SystemIsInstalled=Šī instalācija ir pabeigta. -SystemIsUpgraded=Dolibarr ir modernizēta veiksmīgi. +SystemIsInstalled=Instalācija ir pabeigta. +SystemIsUpgraded=Dolibarr ir atjaunota veiksmīgi. YouNeedToPersonalizeSetup=Jums ir nepieciešams, lai konfigurētu Dolibarr, lai atbilstu jūsu vajadzībām (izskats, funkcijas, ...). Lai to izdarītu, lūdzu, sekojiet saitei zemāk: AdminLoginCreatedSuccessfuly=Dolibarr Administrator Login "%s" izveidots successfuly. GoToDolibarr=Iet uz Dolibarr @@ -109,7 +109,7 @@ ProcessMigrateScript=Skripts apstrāde ChooseYourSetupMode=Izvēlies savu iestatīšanas režīmu un noklikšķiniet uz "Start" ... FreshInstall=Svaigi instalēt FreshInstallDesc=Izmantojiet šo režīmu, ja tas ir jūsu pirmo reizi instalēt. Ja nē, šis režīms var izlabot nepilnīgu iepriekšējo instalēt, bet, ja jūs vēlaties uzlabot savu versiju, izvēlieties "Upgrade" režīmā. -Upgrade=Upgrade +Upgrade=Atjaunot UpgradeDesc=Izmantojiet šo režīmu, ja esat nomainījis veco Dolibarr failus ar failiem no jaunāku versiju. Tas būs uzlabot savu datu bāzi un datus. Start=Sākums InstallNotAllowed=Setup nav atļauts ar conf.php atļaujas @@ -165,7 +165,7 @@ MigrationSupplierOrder=Datu migrācija uz piegādātāja pasūtījumiem MigrationProposal=Datu migrācija komerciāliem priekšlikumus MigrationInvoice=Datu migrācija uz klienta rēķiniem MigrationContract=Datu migrācija līgumiem -MigrationSuccessfullUpdate=Upgrade veiksmīga +MigrationSuccessfullUpdate=Atjaunošana veiksmīga MigrationUpdateFailed=Neizdevās jaunināšanas process MigrationRelationshipTables=Datu migrācija uz attiecībām tabulām (%s) MigrationPaymentsUpdate=Maksājumu datu korekcija @@ -206,4 +206,4 @@ MigrationProjectUserResp=Datu migrācija jomā fk_user_resp no llx_projet lai ll MigrationProjectTaskTime=Update pavadītais laiks sekundēs MigrationActioncommElement=Atjaunināt informāciju par pasākumiem MigrationPaymentMode=Datu migrācija uz maksājumu režīmā -MigrationCategorieAssociation=Migrācija kategoriju +MigrationCategorieAssociation=Kategoriju migrācija diff --git a/htdocs/langs/lv_LV/languages.lang b/htdocs/langs/lv_LV/languages.lang index 0c288eb9767..c5d5793b061 100644 --- a/htdocs/langs/lv_LV/languages.lang +++ b/htdocs/langs/lv_LV/languages.lang @@ -2,19 +2,19 @@ Language_ar_AR=Arābu Language_ar_SA=Arābu -Language_bg_BG=Bulgārijas +Language_bg_BG=Bulgāru Language_ca_ES=Katalāņu Language_cs_CZ=Čehu -Language_da_DA=Dānijas -Language_da_DK=Dānijas +Language_da_DA=Dāņu +Language_da_DK=Dāņu Language_de_DE=Vācu Language_de_AT=Vācu (Austrija) Language_el_GR=Grieķu Language_en_AU=Angļu (Austrālija) -Language_en_GB=English (United Kingdom) +Language_en_GB=Angļu (Apvienotā Karaliste) Language_en_IN=Angļu (Indija) Language_en_NZ=Angļu (Jaunzēlande) -Language_en_SA=English (Saūda Arābija) +Language_en_SA=Angļu (Saūda Arābija) Language_en_US=Angļu (ASV) Language_en_ZA=English (Dienvidāfrika) Language_es_ES=Spāņu @@ -26,22 +26,23 @@ Language_es_PE=Spāņu (Peru) Language_es_PR=Spāņu (Puertoriko) Language_et_EE=Igauņu Language_fa_IR=Persiešu -Language_fi_FI=Fins +Language_fi_FI=Somu Language_fr_BE=Franču (Beļģija) Language_fr_CA=Franču (Kanāda) -Language_fr_CH=Franču (Šveice) -Language_fr_FR=Francijas +Language_fr_CH=Franču (Šveices) +Language_fr_FR=Franču Language_fr_NC=Franču (Jaunkaledonija) Language_he_IL=Ebreju -Language_hu_HU=Ungārijas +Language_hu_HU=Ungāru Language_is_IS=Islandiešu -Language_it_IT=Itālijas +Language_it_IT=Itāļu Language_ja_JP=Japāņu -Language_ko_KR=Korejas +Language_ko_KR=Korejiešu +Language_lv_LV=Latviešu Language_nb_NO=Norvēģu (bukmols) -Language_nl_BE=Holandiešu (Beļģija) -Language_nl_NL=Holandiešu (Nīderlande) -Language_pl_PL=Pulēšana +Language_nl_BE=Holandiešu (Beļģijas) +Language_nl_NL=Holandiešu (Nīderlandes) +Language_pl_PL=Poļu Language_pt_BR=Portugāļu (Brazīlija) Language_pt_PT=Portugāļu Language_ro_RO=Rumāņu @@ -51,6 +52,7 @@ Language_tr_TR=Turku Language_sl_SI=Slovēņu Language_sv_SV=Zviedru Language_sv_SE=Zviedru +Language_sk_SK=Slovāku Language_vi_VN=Vjetnamiešu Language_zh_CN=Ķīniešu Language_zh_TW=Ķīniešu (tradicionālā) diff --git a/htdocs/langs/lv_LV/link.lang b/htdocs/langs/lv_LV/link.lang index b868996db5d..65f81c8548d 100644 --- a/htdocs/langs/lv_LV/link.lang +++ b/htdocs/langs/lv_LV/link.lang @@ -1,18 +1,18 @@ -/* - * Language code: lv_LV - * Automatic generated via autotranslator.php tool - * Generation date 2013-11-08 23:35:59 - */ - - -// START - Lines generated via autotranslator.php tool (2013-11-09 12:40:15). -// Reference language: en_US -> lv_LV -LinkANewFile=Saite jaunu failu / dokumentu -LinkedFiles=Saistīts failus un dokumentus -NoLinkFound=Nav reģistrētu saites -LinkComplete=Fails ir saistīts veiksmīgi -ErrorFileNotLinked=Failu nevar saistīt -LinkRemoved=Saite %s ir noņemta -ErrorFailedToDeleteLink=Neizdevās noņemt saiti "%s" -ErrorFailedToUpdateLink=Neizdevās atjaunināt saikne "%s" -// STOP - Lines generated via autotranslator.php tool (2013-11-09 12:40:57). +/* + * Language code: lv_LV + * Automatic generated via autotranslator.php tool + * Generation date 2013-11-08 23:35:59 + */ + + +// START - Lines generated via autotranslator.php tool (2013-11-09 12:40:15). +// Reference language: en_US -> lv_LV +LinkANewFile=Saite jaunu failu / dokumentu +LinkedFiles=Saistīts failus un dokumentus +NoLinkFound=Nav reģistrētu saites +LinkComplete=Fails ir saistīts veiksmīgi +ErrorFileNotLinked=Failu nevar saistīt +LinkRemoved=Saite %s ir noņemta +ErrorFailedToDeleteLink=Neizdevās noņemt saiti "%s" +ErrorFailedToUpdateLink=Neizdevās atjaunināt saikne "%s" +// STOP - Lines generated via autotranslator.php tool (2013-11-09 12:40:57). diff --git a/htdocs/langs/lv_LV/main.lang b/htdocs/langs/lv_LV/main.lang index a22a4ad9f97..59e2ef5a194 100644 --- a/htdocs/langs/lv_LV/main.lang +++ b/htdocs/langs/lv_LV/main.lang @@ -7,7 +7,7 @@ DIRECTION=ltr FONTFORPDF=Helvetica FONTSIZEFORPDF=10 SeparatorDecimal=, -SeparatorThousand=None +SeparatorThousand=Neviens FormatDateShort=%m/%d/%Y FormatDateShortInput=%m/%d/%Y FormatDateShortJava=MM/dd/yyyy @@ -23,58 +23,58 @@ FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p DatabaseConnection=Savienojums ar datubāzi -NoTranslation=Nav tulkošana -NoRecordFound=Neviens ieraksts atrasts -NoError=Nav kļūda +NoTranslation=Nav iztulkots +NoRecordFound=Nav atrasti ieraksti +NoError=Nav kļūdu Error=Kļūda -ErrorFieldRequired=Lauks "%s" ir nepieciešama -ErrorFieldFormat=Lauks "%s" ir slikta vērtība -ErrorFileDoesNotExists=Failu %s neeksistē +ErrorFieldRequired=Lauks "%s" ir obligāti aizpildams +ErrorFieldFormat=Laukā "%s" ir nepareiza vērtība +ErrorFileDoesNotExists=Fails %s neeksistē ErrorFailedToOpenFile=Neizdevās atvērt failu %s -ErrorCanNotCreateDir=Nevar izveidot dir %s -ErrorCanNotReadDir=Nevar nolasīt dir %s -ErrorConstantNotDefined=Parametrs %s nav noteikts -ErrorUnknown=Unkown kļūda +ErrorCanNotCreateDir=Nevar izveidot direktoriju %s +ErrorCanNotReadDir=Nevar nolasīt direktoriju %s +ErrorConstantNotDefined=Parametrs %s nav definēts +ErrorUnknown=Nezināma kļūda ErrorSQL=SQL kļūda -ErrorLogoFileNotFound=Logotipa faila "%s" netika atrasts +ErrorLogoFileNotFound=Logotipa fails "%s" nav atrasts ErrorGoToGlobalSetup=Iet uz "Sabiedrībai / nodibinājums" uzstādīšana, lai novērstu šo ErrorGoToModuleSetup=Iet uz moduļa uzstādīšanas, lai atrisinātu šo ErrorFailedToSendMail=Neizdevās nosūtīt pastu (sūtītājs = %s, uztvērējs = %s) -ErrorAttachedFilesDisabled=Failu pievienojot ir izslēgta šajā serverī -ErrorFileNotUploaded=Fails netika augšupielādēts. Pārbaudiet, izmēri nepārsniedz maksimāli pieļaujamo, ka brīvas vietas ir pieejama uz diska, un ka nav jau failu ar tādu pašu nosaukumu, kas šajā direktorijā. -ErrorInternalErrorDetected=Atklātā kļūda +ErrorAttachedFilesDisabled=Failu pievienšana nav atļauta šajā serverī +ErrorFileNotUploaded=Fails netika augšupielādēts. Pārbaudiet vai izmērs nepārsniedz maksimāli pieļaujamo un, ka brīvas vietas ir pieejama uz diska, un nav jau failu ar tādu pašu nosaukumu, kas šajā direktorijā. +ErrorInternalErrorDetected=Atklāta kļūda ErrorNoRequestRan=Nav pieprasījums skrēja ErrorWrongHostParameter=Nepareizs uzņēmēja parametrs -ErrorYourCountryIsNotDefined=Jūsu valsts nav definēts. Iet uz Home-Setup-Edit un post atkal formu. +ErrorYourCountryIsNotDefined=Jūsu valsts nav definēta. Ejiet uz Home-Setup-Edit un post atkal formu. ErrorRecordIsUsedByChild=Neizdevās dzēst šo ierakstu. Šis ieraksts tiek izmantots vismaz viens bērns ierakstus. ErrorWrongValue=Nepareizs vērtība ErrorWrongValueForParameterX=Nepareiza vērtība parametru %s ErrorNoRequestInError=Nav pieprasījums kļūda ErrorServiceUnavailableTryLater=Pakalpojums nav pieejams uz šo brīdi. Mēģiniet vēlreiz vēlāk. ErrorDuplicateField=Dublikātu vērtību unikālā jomā -ErrorSomeErrorWereFoundRollbackIsDone=Dažas kļūdas netika atrasts. Mēs atritināt izmaiņas. -ErrorConfigParameterNotDefined=Parametrs %s nav definētas iekšpusē Dolibarr config failu conf.php. -ErrorCantLoadUserFromDolibarrDatabase=Neizdevās atrast lietotāju %s ar Dolibarr datu bāzē. -ErrorNoVATRateDefinedForSellerCountry=Kļūda, PVN likmēm, kas noteiktas valsts "%s". +ErrorSomeErrorWereFoundRollbackIsDone=Dažas kļūdas tika atrastas. Mēs atgriezām atpakaļ visu izejas pozīcijā. +ErrorConfigParameterNotDefined=Parametrs %s nav definētas Dolibarr konfigurācijas failā conf.php. +ErrorCantLoadUserFromDolibarrDatabase=Neizdevās atrast lietotāju %s Dolibarr datu bāzē. +ErrorNoVATRateDefinedForSellerCountry=Kļūda, PVN likme nav definēta sekojošai valstij "%s". ErrorNoSocialContributionForSellerCountry=Kļūda, ne sociālās iemaksas veids definēta valsts "%s". ErrorFailedToSaveFile=Kļūda, neizdevās saglabāt failu. -ErrorOnlyPngJpgSupported=Kļūda, tikai. Png un. Jpg attēla formāta failu, tiek atbalstītas. +ErrorOnlyPngJpgSupported=Kļūda, tikai. Png un. Jpg attēla formāti ir atļauti. ErrorImageFormatNotSupported=Jūsu PHP neatbalsta funkcijas, lai pārvērstu attēlus šajā formātā. SeeAlso=Skatīt arī %s BackgroundColorByDefault=Noklusējuma fona krāsu FileWasNotUploaded=Fails ir izvēlēts arestu, bet vēl nav augšupielādēti. Noklikšķiniet uz "Pievienot failu" par to. -NbOfEntries=Nb ierakstu -GoToWikiHelpPage=Lasīt tiešsaistes palīdzību (nepieciešams interneta piekļuves) -GoToHelpPage=Lasīt palīdzēt +NbOfEntries=Ierakstu sk +GoToWikiHelpPage=Lasīt tiešsaistes palīdzību (nepieciešams interneta piekļuve) +GoToHelpPage=Lasīt palīdzību RecordSaved=Ieraksts saglabāts -RecordDeleted=Ierakstīt svītrots +RecordDeleted=Ieraksts dzēsts LevelOfFeature=Līmeņa funkcijas -NotDefined=Nav noteikts +NotDefined=Nav definēts DefinedAndHasThisValue=Definēti un vērtību -IsNotDefined=undefined +IsNotDefined=nav definēts DolibarrInHttpAuthenticationSoPasswordUseless=Dolibarr autentifikācijas režīms ir setup, lai %s konfigurācijas failu conf.php.
Tas nozīmē, ka parole datubāze ir extern uz Dolibarr, tāpēc, mainot šai jomā nav nekādas ietekmes. Administrator=Administrators -Undefined=Undefined +Undefined=Nav definēts PasswordForgotten=Aizmirsāt paroli? SeeAbove=Skatīt iepriekš HomeArea=Mājas platība @@ -89,11 +89,11 @@ RequestLastAccess=Pieprasījums pēdējo datu bāzes piekļuvi RequestLastAccessInError=Pieprasījums pēdējo datu bāzes piekļuvi kļūda ReturnCodeLastAccessInError=Atgriešanās kodu pēdējo datu bāzes piekļuvi kļūda InformationLastAccessInError=Informācija pēdējo datu bāzes piekļuvi kļūda -DolibarrHasDetectedError=Dolibarr ir atklāts tehnisku kļūdu -InformationToHelpDiagnose=Šī ir informācija, kas var palīdzēt diagnostikas +DolibarrHasDetectedError=Dolibarr ir atklājis tehnisku kļūdu +InformationToHelpDiagnose=Šī informācija, kas var palīdzēt diagnostikai MoreInformation=Vairāk informācijas -NotePublic=Piezīme (valsts) -NotePrivate=Piezīme (privāts) +NotePublic=Piezīme (publiska) +NotePrivate=Piezīme (privāta) PrecisionUnitIsLimitedToXDecimals=Dolibarr bija setup, lai ierobežotu precizitāti vienības cenām %s zīmēm aiz komata. DoTest=Pārbaude ToFilter=Filtrs @@ -103,8 +103,8 @@ Yes=Jā no=nē No=Nē All=Visi -Home=Mājas -Help=Palīdzēt +Home=Mājās +Help=Palīdzība OnlineHelp=Tiešsaistes palīdzība PageWiki=Wiki lapa Always=Vienmēr @@ -122,7 +122,7 @@ Disable=Atslēgt Disabled=Invalīdiem Add=Pievienot AddLink=Pievienot saiti -Update=Modernizēt +Update=Atjaunot AddActionToDo=Pievienot notikumu darīt AddActionDone=Pievienot notikumu darīts Close=Aizvērt @@ -137,11 +137,11 @@ Modify=Modificēt Edit=Rediģēt Validate=Apstiprināt ToValidate=Lai apstiprinātu -Save=Glābt +Save=Saglabāt SaveAs=Saglabāt kā TestConnection=Testa savienojums -ToClone=Klons -ConfirmClone=Izvēlieties datus, kurus vēlaties klons: +ToClone=Klonēt +ConfirmClone=Izvēlieties datus, kurus vēlaties klonēt: NoCloneOptionsSpecified=Nav datu klons noteikts. Of=no Go=Iet @@ -153,21 +153,21 @@ Search=Meklēšana SearchOf=Meklēšana Valid=Derīgs Approve=Apstiprināt -ReOpen=Re-Atvērt +ReOpen=Atvērt par jaunu Upload=Sūtīt failu ToLink=Saite Select=Atlasīt Choose=Izvēlēties -ChooseLangage=Lūdzu, izvēlieties savu valodu -Resize=Resize -Recenter=Ievirzītu +ChooseLangage=Lūdzu, izvēlieties valodu +Resize=Samazināt +Recenter=Centrēt Author=Autors User=Lietotājs Users=Lietotāji Group=Grupa Groups=Grupas Password=Parole -PasswordRetype=Atkārtojiet paroli +PasswordRetype=PArole atkārtoti NoteSomeFeaturesAreDisabled=Ņemiet vērā, ka funkcijas / modules daudz ir invalīdi šajā demonstrācijā. Name=Nosaukums Person=Persona @@ -183,7 +183,7 @@ Type=Tips Language=Valoda MultiLanguage=Multi-valodu Note=Piezīme -CurrentNote=Pašreizējais piezīme +CurrentNote=Pašreizējā piezīme Title=Virsraksts Label=Etiķete RefOrLabel=Ref. vai etiķete @@ -200,24 +200,24 @@ NumberByMonth=Numurs pēc mēneša AmountByMonth=Summa pēc mēneša Numero=Numurs Limit=Ierobežot -Limits=Robežas -DevelopmentTeam=Attīstības Team -Logout=Logout +Limits=Ierobežojums +DevelopmentTeam=Izstrādātāju komanda +Logout=Iziet Connection=Saistība -Setup=Setup +Setup=Iestatījumi Alert=Brīdināt Previous=Iepriekšējais Next=Nākamais -Cards=Kārtis +Cards=Kartes Card=Karte Now=Tagad Date=Datums -DateStart=Šim sākums -DateEnd=Datums beigas -DateCreation=Izveides datums +DateStart=Sākuma datums +DateEnd=Beigu datums +DateCreation=Izveidošanas datums DateModification=Modificēšanas datums DateModificationShort=Modif. datums -DateLastModification=Pēdējās izmaiņas datums +DateLastModification=Pēdējo izmaiņu datums DateValidation=Apstiprināšanas datums DateClosing=Beigu datums DateDue=Izpildes datums @@ -236,7 +236,7 @@ DurationYear=gads DurationMonth=mēnesis DurationWeek=nedēļa DurationDay=diena -DurationYears=gadiem +DurationYears=gadi DurationMonths=mēneši DurationWeeks=nedēļas DurationDays=dienas @@ -246,13 +246,13 @@ Week=Nedēļa Day=Diena Hour=Stunda Minute=Minūte -Second=Otrais -Years=Gadiem +Second=Sekunde +Years=Gadi Months=Mēneši Days=Dienas days=dienas -Hours=Laiks -Minutes=Protokols +Hours=Stundas +Minutes=Minūtes Seconds=Sekundes Today=Šodien Yesterday=Vakar @@ -261,21 +261,21 @@ Quadri=Quadri MonthOfDay=Mēnesis dienas HourShort=H Rate=Likme -UseLocalTax=Iekļaut nodokli +UseLocalTax=Ar PVN Bytes=Baiti KiloBytes=Kilobaiti MegaBytes=Megabaiti -GigaBytes=Gigabaitiem -TeraBytes=Terabaitiem +GigaBytes=Gigabaiti +TeraBytes=Terabaiti b=b. Kb=Kb Mb=Mb Gb=Gb -Tb=Tuberkuloze -Cut=Samazināt +Tb=Tb +Cut=Izgriezt Copy=Kopēt -Paste=Pasta -Default=Default +Paste=Ielīmēt +Default=Noklusējums DefaultValue=Noklusējuma vērtība DefaultGlobalValue=Globālā vērtība Price=Cena @@ -307,19 +307,19 @@ Percentage=Procentuālā attiecība Total=Kopsumma SubTotal=Starpsumma TotalHTShort=Kopējais (neto) -TotalTTCShort=Pavisam (ieskaitot nodokli) -TotalHT=Kopā (bez nodokļiem) -TotalTTC=Pavisam (ieskaitot nodokli) +TotalTTCShort=Pavisam (ar PVN) +TotalHT=Pavisam (bez PVN) +TotalTTC=Pavisam (ar PVN) TotalTTCToYourCredit=Pavisam (ieskaitot nodokli), lai jūsu kredīta TotalVAT=Kopējā nodokļu TotalLT1=Kopējā nodokļu 2 TotalLT2=Kopējā nodokļu 3 TotalLT1ES=Kopējais RE TotalLT2ES=Kopējais IRPF -IncludedVAT=Iekļauts nodoklis -HT=Pēc nodokļiem -TTC=Inc nodoklis -VAT=Pārdošanas nodoklis +IncludedVAT=Ar PVN +HT=Bez PVN +TTC=Ar PVN +VAT=PVN LT1ES=RE LT2ES=IRPF VATRate=Nodokļa likme @@ -327,7 +327,7 @@ Average=Vidējais Sum=Summa Delta=Delta Module=Modulis -Option=Izvēle +Option=Iespējas List=Saraksts FullList=Pilns saraksts Statistics=Statistika @@ -337,22 +337,22 @@ ShortInfo=Info. Ref=Ref. RefSupplier=Ref. piegādātājs RefPayment=Ref. maksājums -CommercialProposalsShort=Commercial priekšlikumi +CommercialProposalsShort=Komerciālie priekšlikumi Comment=Komentēt Comments=Komentāri ActionsToDo=Pasākumi, kas darīt ActionsDone=Pasākumi darīts -ActionsToDoShort=Lai to izdarītu -ActionsRunningshort=Sākās +ActionsToDoShort=Vēl jādara +ActionsRunningshort=Sākts ActionsDoneShort=Done ActionNotApplicable=Nav piemērojams -ActionRunningNotStarted=Lai sāktu -ActionRunningShort=Sākās +ActionRunningNotStarted=Jāsāk +ActionRunningShort=Sākts ActionDoneShort=Pabeigts CompanyFoundation=Kompānija / Foundation ContactsForCompany=Kontakti šīs trešās personas ContactsAddressesForCompany=Kontakti / adreses par šīs trešās personas -AddressesForCompany=Adreses šīs trešās personas +AddressesForCompany=Šīs trešās puses adreses ActionsOnCompany=Pasākumi par šīs trešās personas ActionsOnMember=Pasākumi par šo locekli NActions=%s notikumi @@ -361,7 +361,7 @@ Filter=Filtrs RemoveFilter=Noņemt filtru ChartGenerated=Attēls radīts ChartNotGenerated=Attēls nav radīts -GeneratedOn=Balstīties uz %s +GeneratedOn=Izveidots %s Generate=Radīt Duration=Ilgums TotalDuration=Kopējais pasākuma ilgums @@ -372,7 +372,7 @@ DolibarrBoard=Dolibarr padome DolibarrStateBoard=Statistika DolibarrWorkBoard=Darba uzdevumi padome Available=Pieejams -NotYetAvailable=Nav pieejams +NotYetAvailable=Nav vēl pieejams NotAvailable=Nav pieejams Popularity=Popularitāte Categories=Kategorijas @@ -383,18 +383,18 @@ to=līdz and=un or=vai Other=Cits -Others=Pārējie +Others=Citi OtherInformations=Citas informācija Quantity=Daudzums Qty=Daudz -ChangedBy=Mainīt +ChangedBy=Labojis ReCalculate=Pārrēķināt -ResultOk=Veiksme +ResultOk=Veiksmīgi ResultKo=Neveiksme Reporting=Pārskata Reportings=Pārskata -Draft=Projekts -Drafts=Dambrete +Draft=Melnraksts +Drafts=Melnraksti Validated=Validēta Opened=Atvērts New=Jauns @@ -402,11 +402,11 @@ Discount=Atlaide Unknown=Nezināms General=Vispārējs Size=Lielums -Received=Saņemti -Paid=Apmaksātais +Received=Saņemts +Paid=Apmaksāts Topic=Subjekts -ByCompanies=Trešās personas -ByUsers=Ar lietotājiem +ByCompanies=Pēc trešajām personām +ByUsers=Pēc lietotājiem Links=Saites Link=Saite Receipts=Ieņēmumi @@ -436,22 +436,22 @@ October=Oktobris November=Novembris December=Decembris JanuaryMin=Jan -FebruaryMin=Februāris -MarchMin=Sagandēt -AprilMin=Aprīlis -MayMin=Maijs -JuneMin=Jūnijs -JulyMin=Jūlijs -AugustMin=Augusts -SeptemberMin=Septembris -OctoberMin=Oktobris -NovemberMin=Novembris -DecemberMin=Decembris +FebruaryMin=Feb +MarchMin=Mar +AprilMin=Apr +MayMin=Mai +JuneMin=Jūn +JulyMin=Jūl +AugustMin=Aug +SeptemberMin=Sep +OctoberMin=Okt +NovemberMin=Nov +DecemberMin=Dec Month01=janvāris Month02=februāris -Month03=gājiens +Month03=marts Month04=aprīlis -Month05=var +Month05=maijs Month06=jūnijs Month07=jūlijs Month08=augusts @@ -459,30 +459,30 @@ Month09=septembris Month10=oktobris Month11=novembris Month12=decembris -MonthShort01=janvāris -MonthShort02=februāris -MonthShort03=sagandēt -MonthShort04=aprīlis -MonthShort05=var -MonthShort06=jūnijs -MonthShort07=jūlijs -MonthShort08=augusts -MonthShort09=septembris -MonthShort10=oktobris -MonthShort11=novembris -MonthShort12=decembris +MonthShort01=jan +MonthShort02=feb +MonthShort03=mar +MonthShort04=apr +MonthShort05=mai +MonthShort06=jūn +MonthShort07=jūl +MonthShort08=aug +MonthShort09=sep +MonthShort10=okt +MonthShort11=nov +MonthShort12=dec AttachedFiles=Pievienotie faili un dokumenti -FileTransferComplete=Fails tika augšupielādēts successfuly +FileTransferComplete=Fails tika augšupielādēts veiksmīgi DateFormatYYYYMM=YYYY-MM DateFormatYYYYMMDD=YYYY-MM-DD DateFormatYYYYMMDDHHMM=YYYY-MM-DD HH: SS -ReportName=Pārskata nosaukums +ReportName=Atskaites nosaukums ReportPeriod=Atskaites periods ReportDescription=Apraksts Report=Ziņojums -Keyword=Mot Clé +Keyword=Atslēgas vārdi Legend=Leģenda -FillTownFromZip=Aizpildiet pilsētu no rāvējslēdzēju +FillTownFromZip=Aizpildiet pilsētu no pasta indeksa Fill=Aizpildīt Reset=Reset ShowLog=Rādīt log @@ -493,9 +493,9 @@ ReadPermissionNotAllowed=Lasīt atļauja nav atļauts AmountInCurrency=Summa %s valūtā Example=Piemērs Examples=Piemēri -NoExample=Nav piemērs -FindBug=Paziņo par kļūdu -NbOfThirdParties=Skaits trešajām personām +NoExample=Nav piemēra +FindBug=Ziņot par kļūdu +NbOfThirdParties=Trešo personu skaits NbOfCustomers=Klientu skaits NbOfLines=Līniju skaits NbOfObjects=Objektu skaits @@ -545,21 +545,21 @@ TextUsedInTheMessageBody=E-pasts ķermeņa SendAcknowledgementByMail=Send Ack. pa e-pastu NoEMail=Nav e-pasta Owner=Īpašnieks -DetectedVersion=Atklātie versija +DetectedVersion=Noteiktā versija FollowingConstantsWillBeSubstituted=Šādas konstantes tiks aizstāts ar atbilstošo vērtību. Refresh=Atsvaidzināt BackToList=Atpakaļ uz sarakstu GoBack=Iet atpakaļ CanBeModifiedIfOk=Var mainīt, ja ir spēkā CanBeModifiedIfKo=Var mainīt, ja nav derīga -RecordModifiedSuccessfully=Reģistrēt izmaiņas veiksmīgi -RecordsModified=%s ieraksti modificēts +RecordModifiedSuccessfully=ieraksts modificēts veiksmīgi +RecordsModified=%s ieraksti modificēti AutomaticCode=Automātiskās kods NotManaged=Nepārvalda -FeatureDisabled=Funkcija izslēgta +FeatureDisabled=Funkcija bloķēta MoveBox=Pārvietot kastes %s Offered=Piedāvā -NotEnoughPermissions=Jums nav atļaujas šai darbībai +NotEnoughPermissions=Jums nav atļauta šī darbība SessionName=Sesijas nosaukums Method=Metode Receive=Saņemt @@ -567,57 +567,57 @@ PartialWoman=Daļējs PartialMan=Daļējs TotalWoman=Kopsumma TotalMan=Kopsumma -NeverReceived=Nekad nav saņēmusi +NeverReceived=Nekad nav saņemts Canceled=Atcelts -YouCanChangeValuesForThisListFromDictionnarySetup=Jūs varat mainīt vērtības šajā sarakstā no izvēlnes Setup - dictionnary +YouCanChangeValuesForThisListFromDictionnarySetup=Jūs varat mainīt vērtības šajā sarakstā no izvēlnes Iestatījumi - vārdnīca Color=Krāsa -Documents=Piesaistītu failu -DocumentsNb=Piesaistītu failu (%s) +Documents=Piesaistītie faili +DocumentsNb=Piesaistītie faili (%s) Documents2=Dokumenti -BuildDocuments=Radītais dokumenti -UploadDisabled=Pievienot invalīdiem +BuildDocuments=Izveidotie dokumenti +UploadDisabled=Augšupielāde bloķēta MenuECM=Dokumenti MenuAWStats=AWStats MenuMembers=Dalībnieki MenuAgendaGoogle=Google programma ThisLimitIsDefinedInSetup=Dolibarr robeža (Menu mājas uzstādīšana-drošība): %s Kb, PHP robeža: %s Kb -NoFileFound=Neviens dokuments, kas saglabāti šajā direktorijā +NoFileFound=Neviens dokuments nav saglabāts šajā direktorijā CurrentUserLanguage=Pašreizējā valoda CurrentTheme=Pašreizējā tēma CurrentMenuManager=Pašreizējais izvēlne vadītājs -DisabledModules=Invalīdiem moduļi +DisabledModules=Bloķētie moduļi For=Uz ForCustomer=Klientam Signature=Paraksts HidePassword=Rādīt komanda ar paroli slēptās UnHidePassword=Parādīt savu patieso komandu ar skaidru paroli Root=Sakne -Informations=Informations +Informations=Informācija Page=Lappuse Notes=Piezīmes AddNewLine=Pievienot jaunu līniju AddFile=Pievienot failu -ListOfFiles=Saraksts pieejamo failu -FreeZone=Brīva teksta -CloneMainAttributes=Klons objekts ar tās galvenajiem atribūtiem -PDFMerge=PDF sapludināšana +ListOfFiles=Saraksts ar pieejamiem failiem +FreeZone=Brīvs teksts +CloneMainAttributes=Klonēt objektu ar tā galvenajiem atribūtiem +PDFMerge=Apvienot PDF Merge=Apvienot PrintContentArea=Rādīt lapu drukāt galveno satura jomā MenuManager=Izvēlne vadītājs -NoMenu=Nav sub-menu -WarningYouAreInMaintenanceMode=Uzmanību, jums ir uzturēšanas režīmā, lai tikai pieteikšanās %s ir atļauts lietot pieteikumu brīdī. +NoMenu=Nav apakš izvēlnes +WarningYouAreInMaintenanceMode=Uzmanību, jūs esat uzturēšanas režīmā, t.i. tikai pieteikšanās %s ir atļauts lietot programmu. CoreErrorTitle=Sistēmas kļūda CoreErrorMessage=Atvainojiet, radās kļūda. Pārbaudiet žurnālus vai sazinieties ar sistēmas administratoru. CreditCard=Kredītkarte -FieldsWithAreMandatory=Lauki ar %s ir obligāti -FieldsWithIsForPublic=Lauki ar %s tiek parādīta sabiedrības locekļu sarakstu. Ja jūs nevēlaties, lai tas, pārbaudīt pie "sabiedrības" lodziņā. -AccordingToGeoIPDatabase=(Saskaņā ar GeoIP konversiju) +FieldsWithAreMandatory=Lauki ar %s ir obligāti aizpildāmi +FieldsWithIsForPublic=Lauki ar %s parāda sabiedrības locekļu sarakstu. Ja jūs nevēlaties to, tad izņemiet ķeksi pie "sabiedrības" lodziņa. +AccordingToGeoIPDatabase=(Saskaņā ar GeoIP) Line=Līnija -NotSupported=Netiek atbalstīti -RequiredField=Obligāts lauks +NotSupported=Netiek atbalstīts +RequiredField=Obligāti aizpildāms lauks Result=Rezultāts ToTest=Pārbaude -ValidateBefore=Karte ir jāapstiprina, pirms lietojat šo funkciju +ValidateBefore=Kartiņa ir jāapstiprina, pirms lietojat šo funkciju Visibility=Redzamība Private=Privāts Hidden=Slēpts @@ -627,24 +627,24 @@ Prefix=Priedēklis Before=Pirms After=Pēc IPAddress=IP adrese -Frequency=Frekvence +Frequency=Biežums IM=Tūlītējā ziņapmaiņa NewAttribute=Jauns atribūts -AttributeCode=Atribūts kodu -OptionalFieldsSetup=Extra atribūti iestatīšana +AttributeCode=Atribūts kods +OptionalFieldsSetup=Papildus atribūtu iestatīšana URLPhoto=URL foto / logo -SetLinkToThirdParty=Saite citai trešajai pusei +SetLinkToThirdParty=Saite uz citu trešo pusei CreateDraft=Izveidot projektu ClickToEdit=Klikšķiniet, lai rediģētu -ObjectDeleted=Objektu %s svītrots +ObjectDeleted=Objekts %s dzēsts ByCountry=Pēc valsts -ByTown=Ar pilsētu +ByTown=Pēc pilsētas ByDate=Pēc datuma -ByMonthYear=Pēc mēneša / gadā +ByMonthYear=Pēc mēneša / gada ByYear=Pēc gada ByMonth=pēc mēneša -ByDay=Līdz dienai -BySalesRepresentative=Ar tirdzniecības pārstāvja +ByDay=Pēc dienas +BySalesRepresentative=Pēc tirdzniecības pārstāvja LinkedToSpecificUsers=Saistītas ar noteiktu lietotāja kontaktu DeleteAFile=Izdzēst failu ConfirmDeleteAFile=Vai jūs tiešām vēlaties izdzēst failu @@ -652,15 +652,15 @@ NoResults=Nav rezultātu ModulesSystemTools=Moduļi instrumenti Test=Pārbaude Element=Elements -NoPhotoYet=Nav bildes pieejamas vēl +NoPhotoYet=Nav bildes HomeDashboard=Sākums kopsavilkums Deductible=Pašrisks from=no toward=uz Access=Pieeja -HelpCopyToClipboard=Izmantot taustiņu kombināciju Ctrl + C, lai kopētu uz starpliktuvi +HelpCopyToClipboard=Izmantot taustiņu kombināciju Ctrl + C, lai kopētu SaveUploadedFileWithMask=Saglabāt failu uz servera ar nosaukumu "%s" (citādi "%s") -OriginFileName=Nom d'origine +OriginFileName=Sākotnējais nosaukums # Week day Monday=Pirmdiena @@ -684,10 +684,10 @@ Day4=Ceturtdiena Day5=Piektdiena Day6=Sestdiena Day0=Svētdiena -ShortMonday=M -ShortTuesday=T -ShortWednesday=W -ShortThursday=T -ShortFriday=F -ShortSaturday=S -ShortSunday=S +ShortMonday=P +ShortTuesday=O +ShortWednesday=Tr +ShortThursday=Ce +ShortFriday=P +ShortSaturday=Se +ShortSunday=Sv diff --git a/htdocs/langs/lv_LV/oscommerce.lang b/htdocs/langs/lv_LV/oscommerce.lang index e90dc7eb20f..3841b934eb6 100644 --- a/htdocs/langs/lv_LV/oscommerce.lang +++ b/htdocs/langs/lv_LV/oscommerce.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - oscommerce OSCommerce=OS Commerce -OSCommerceSetup=OS Commerce modulis iestatīšana -OSCommerceSetupSaved=OS Commerce uzstādīšana saglabāts -OSCommerceServer=OS Commerce servera uzņēmējas / ip -OSCommerceDatabaseName=OS Commerce datu bāzes nosaukums -OSCommercePrefix=OS Commerce tabulas prefiksu -OSCommerceUser=OS Commerce datu bāzes pieteikšanās +OSCommerceSetup=OS Commerce moduļa konfigurēšana +OSCommerceSetupSaved=OS Commerce uzstādīšanas konfigurācija saglabāta +OSCommerceServer=OS Commerce servera nosaukums / ip adrese +OSCommerceDatabaseName=OS Commerce datubāzes nosaukums +OSCommercePrefix=OS Commerce tabulas prefikss +OSCommerceUser=OS Commerce datu bāzes pieteikšanās vārds diff --git a/htdocs/langs/lv_LV/printipp.lang b/htdocs/langs/lv_LV/printipp.lang index bba261c4d07..4a1fa4d4ed3 100644 --- a/htdocs/langs/lv_LV/printipp.lang +++ b/htdocs/langs/lv_LV/printipp.lang @@ -1,18 +1,18 @@ -/* - * Language code: lv_LV - * Automatic generated via autotranslator.php tool - * Generation date 2013-11-09 12:40:15 - */ - - -// START - Lines generated via autotranslator.php tool (2013-11-09 12:40:15). -// Reference language: en_US -> lv_LV -PrintIPPSetup=Setup moduļa Direct Print -PrintIPPDesc=Ce modulis Përmet d'Ajouter ANO Bouton d'iespaids tieši des dokumenti vers votre imprimante. Il requiert ANO systeme Linux équipé de Kausi. -PRINTIPP_ENABLED=Rādīt Picto "Direct print" par dokumentu saraksts -PRINTIPP_HOST=Drukas serveris -PRINTIPP_PORT=Osta -PRINTIPP_USER=Login -PRINTIPP_PASSWORD=Parole -NoPrinterFound=Nav printeri atrasts (pārbaudiet savu tases etup) -// STOP - Lines generated via autotranslator.php tool (2013-11-09 12:49:40). +/* + * Language code: lv_LV + * Automatic generated via autotranslator.php tool + * Generation date 2013-11-09 12:40:15 + */ + + +// START - Lines generated via autotranslator.php tool (2013-11-09 12:40:15). +// Reference language: en_US -> lv_LV +PrintIPPSetup=Setup moduļa Direct Print +PrintIPPDesc=Ce modulis Përmet d'Ajouter ANO Bouton d'iespaids tieši des dokumenti vers votre imprimante. Il requiert ANO systeme Linux équipé de Kausi. +PRINTIPP_ENABLED=Rādīt Picto "Direct print" par dokumentu saraksts +PRINTIPP_HOST=Drukas serveris +PRINTIPP_PORT=Osta +PRINTIPP_USER=Login +PRINTIPP_PASSWORD=Parole +NoPrinterFound=Nav printeri atrasts (pārbaudiet savu tases etup) +// STOP - Lines generated via autotranslator.php tool (2013-11-09 12:49:40). diff --git a/htdocs/langs/lv_LV/products.lang b/htdocs/langs/lv_LV/products.lang index e296ba1d8cc..4ecbeb608a8 100644 --- a/htdocs/langs/lv_LV/products.lang +++ b/htdocs/langs/lv_LV/products.lang @@ -1,57 +1,57 @@ # Dolibarr language file - Source file is en_US - products ProductRef=Produkta ref. -ProductLabel=Produkta marķējumā -ProductServiceCard=Produkti / Pakalpojumi karte +ProductLabel=Produkta marķējums +ProductServiceCard=Produktu / Pakalpojumu kartiņa Products=Produkti Services=Pakalpojumi Product=Produkts Service=Apkalpošana -ProductId=Produkts / pakalpojums id +ProductId=Produkta / pakalpojuma id Create=Izveidot -Reference=Atsauces +Reference=Atsauce NewProduct=Jauns produkts NewService=Jauns pakalpojums ProductCode=Preces kods -ServiceCode=Pakalpojumu kods +ServiceCode=Pakalpojuma kods ProductAccountancyBuyCode=Grāmatvedība kods (pirkt) ProductAccountancySellCode=Grāmatvedība kods (pārdot) ProductOrService=Produkts vai pakalpojums ProductsAndServices=Produkti un pakalpojumi -ProductsOrServices=Produkti un pakalpojumi +ProductsOrServices=Produkti vai pakalpojumi ProductsAndServicesOnSell=Pieejamie produkti un pakalpojumi -ProductsAndServicesNotOnSell=Novecojušas Produkti un pakalpojumi -ProductsAndServicesStatistics=Produkti un pakalpojumi statistika -ProductsStatistics=Produkti statistika +ProductsAndServicesNotOnSell=Novecojušie Produkti un Pakalpojumi +ProductsAndServicesStatistics=Produktu un pakalpojumu statistika +ProductsStatistics=Produktu statistika ProductsOnSell=Pieejamie produkti -ProductsNotOnSell=Novecojušas ierīces +ProductsNotOnSell=Novecojušie produkti ServicesOnSell=Pieejamie pakalpojumi -ServicesNotOnSell=Novecojušas pakalpojumi +ServicesNotOnSell=Novecojušie pakalpojumi InternalRef=Iekšējā atsauce LastRecorded=Jaunākie produkti / pakalpojumi par pārdot reģistrē -LastRecordedProductsAndServices=Pēdējās %s reģistrē produktu / pakalpojumu -LastModifiedProductsAndServices=Pēdējās %s modificēta produktu / pakalpojumu -LastRecordedProducts=Pēdējās %s produkti reģistrē -LastRecordedServices=Pēdējās %s ierakstītas pakalpojumi +LastRecordedProductsAndServices=Pēdējie %s reģistrētie produkti / pakalpojumi +LastModifiedProductsAndServices=Pēdējie %s labotie produkti / pakalpojumi +LastRecordedProducts=Pēdējie %s reģistrētie produkti +LastRecordedServices=Pēdējie %s reģistrētie pakalpojumi LastProducts=Pēdējie produkti -CardProduct0=Produkta karte -CardProduct1=Dienesta apliecība -CardContract=Līgums karte +CardProduct0=Produkta kartiņa +CardProduct1=Paikalpojuma kartiņa +CardContract=Līguma kartiņa Warehouse=Noliktava Warehouses=Noliktavas -WarehouseOpened=Noliktava atvērts -WarehouseClosed=Noliktava slēgts +WarehouseOpened=Noliktava atvērta +WarehouseClosed=Noliktava slēgta Stock=Krājums Stocks=Krājumi Movement=Kustība Movements=Kustības Sell=Pārdošanas Buy=Iepirkumi -OnSell=Pārdod -OnBuy=Iegādei +OnSell=Pārdošanai +OnBuy=Pirkšanai NotOnSell=Nav paredzēts pārdošanai -ProductStatusOnSell=Pārdod +ProductStatusOnSell=Pārdošanai ProductStatusNotOnSell=Nav paredzēts pārdošanai -ProductStatusOnSellShort=Pārdod +ProductStatusOnSellShort=Pārdošanai ProductStatusNotOnSellShort=Nav paredzēts pārdošanai ProductStatusOnBuy=Iegādei ProductStatusNotOnBuy=Nav iegādei @@ -60,14 +60,14 @@ ProductStatusNotOnBuyShort=Nav iegādei UpdatePrice=Precizēt cenu AppliedPricesFrom=Piemērotās cenas no SellingPrice=Pārdošanas cena -SellingPriceHT=Pārdošanas cena (bez nodokļiem) -SellingPriceTTC=Pārdošanas cena (ieskaitot PVN) +SellingPriceHT=Pārdošanas cena (bez PVN) +SellingPriceTTC=Pārdošanas cena (ar PVN) PublicPrice=Sabiedrības cena CurrentPrice=Pašreizējā cena NewPrice=Jaunā cena -MinPrice=Minim. pārdošanas cena -CantBeLessThanMinPrice=Pārdošanas cena nevar būt zemāka par minimālo pieļaujamo šī produkta (%s bez nodokļiem). Šis ziņojums var būt arī parādās, ja esat ievadījis pārāk liela atlaide. -ContractStatus=Līgums statuss +MinPrice=Min. pārdošanas cena +CantBeLessThanMinPrice=Pārdošanas cena nevar būt zemāka par minimālo pieļaujamo šī produkta (%s bez PVN). Šis ziņojums var būt arī parādās, ja esat ievadījis pārāk lielu atlaidi. +ContractStatus=Līguma statuss ContractStatusClosed=Slēgts ContractStatusRunning=Ekspluatācijas ContractStatusExpired=beidzies @@ -78,9 +78,9 @@ ErrorProductAlreadyExists=Ar atsauci %s produkts jau pastāv. ErrorProductBadRefOrLabel=Nepareiza vērtība atsauces vai etiķeti. ErrorProductClone=Radās problēma, mēģinot klons produktu vai pakalpojumu. Suppliers=Piegādātāji -SupplierRef=Piegādātāja produktu ref. +SupplierRef=Piegādātāja produkta ref. ShowProduct=Rādīt preci -ShowService=Rādīt pakalpojumus +ShowService=Rādīt pakalpojumu ProductsAndServicesArea=Produktu un pakalpojumu jomā ProductsArea=Ražojumu jomā ServicesArea=Pakalpojumu jomā @@ -88,7 +88,7 @@ AddToMyProposals=Pievienot pie maniem priekšlikumiem AddToOtherProposals=Pievienot pie citiem priekšlikumiem AddToMyBills=Pievienot rēķinus AddToOtherBills=Pievienot pie citiem rēķiniem -CorrectStock=Pareiza krājumu +CorrectStock=Labot krājumus AddPhoto=Pievienot foto ListOfStockMovements=Saraksts krājumu pārvietošanu BuyingPrice=Pirkšanas cena @@ -98,11 +98,11 @@ AllWays=Ceļš, lai atrastu savu produktu noliktavā NoCat=Jūsu produkts nav nevienā kategorijā PrimaryWay=Primārā ceļš PriceRemoved=Cena noņemts -BarCode=Svītrkodu +BarCode=Svītrkods BarcodeType=Svītrkoda veids SetDefaultBarcodeType=Uzstādīt svītrkoda tipu -BarcodeValue=Svītrkodu vērtība -NoteNotVisibleOnBill=Piezīme (nav redzama rēķinos, priekšlikumiem ...) +BarcodeValue=Svītrkoda vērtība +NoteNotVisibleOnBill=Piezīme (nav redzama rēķinos, priekšlikumos ...) CreateCopy=Izveidot kopiju ServiceLimitedDuration=Ja produkts ir pakalpojums ir ierobežots darbības laiks: MultiPricesAbility=Aktivizēt multi-cenas @@ -121,7 +121,7 @@ CategoryFilter=Kategorijas filtrs ProductToAddSearch=Meklēt produktu, lai pievienotu AddDel=Pievienot / Dzēst Quantity=Daudzums -NoMatchFound=Sakritības atrasts +NoMatchFound=Nekas netika atrasts ProductAssociationList=Saraksts saistītu produktu / pakalpojumu: nosaukums, produkta / pakalpojuma (daudzums ietekmē) ProductParentList=Saraksts virtuālo produktu / pakalpojumu ar šo produktu kā sastāvdaļu ErrorAssociationIsFatherOfThis=Viens no izvēlētā produkta mātes ar pašreizējo produktu @@ -129,23 +129,23 @@ DeleteProduct=Dzēst produktu / pakalpojumu ConfirmDeleteProduct=Vai tiešām vēlaties dzēst šo produktu / pakalpojumu? ProductDeleted=Produkts / Pakalpojums "%s" svītro no datu bāzes. DeletePicture=Izdzēstu attēlu -ConfirmDeletePicture=Vai tiešām vēlaties dzēst šo attēlu? +ConfirmDeletePicture=Vai tiešām vēlaties izdzēst šo attēlu? ExportDataset_produit_1=Produkti ExportDataset_service_1=Pakalpojumi ImportDataset_produit_1=Produkti ImportDataset_service_1=Pakalpojumi DeleteProductLine=Dzēst produktu līniju ConfirmDeleteProductLine=Vai tiešām vēlaties dzēst šo produktu līniju? -NoProductMatching=Neviens produkts / pakalpojums atbilst jūsu kritērijiem +NoProductMatching=Neviens produkts / pakalpojums neatbilst jūsu kritērijiem MatchingProducts=Matching produktus / pakalpojumus NoStockForThisProduct=Nav akciju šim produktam NoStock=Nav noliktavā Restock=Atjaunotu ProductSpecial=Īpašs -QtyMin=Minimālā Daudzums +QtyMin=Minimālais Daudzums PriceQty=Cena par šo daudzumu PriceQtyMin=Cena par šo min. Daudzums (w / o atlaide) -VATRateForSupplierProduct=PVN likme (šī piegādātāja / produkta) +VATRateForSupplierProduct=PVN likme (šim piegādātājam / produktam) DiscountQtyMin=Noklusējuma atlaide qty NoPriceDefinedForThisSupplier=Nē cena / gab definētas šim piegādātājam / produktu NoSupplierPriceDefinedForThisProduct=Piegādātājs cena / gab definētas šo produktu @@ -167,8 +167,8 @@ ClonePricesProduct=Klons galvenos informations un cenas CloneCompositionProduct=Klons produkta / pakalpojuma sastāvu ProductIsUsed=Šis produkts tiek izmantots NewRefForClone=Ref. jaunu produktu / pakalpojumu -CustomerPrices=Klienti cenas -SuppliersPrices=Piegādātāji cenas +CustomerPrices=Klientu cenas +SuppliersPrices=Piegādātāju cenas CustomCode=Muitas kodekss CountryOrigin=Izcelsmes valsts HiddenIntoCombo=Slēpta vērā izvēlieties sarakstos diff --git a/htdocs/langs/lv_LV/shop.lang b/htdocs/langs/lv_LV/shop.lang index 9ee0a73d23e..0b2f6697161 100644 --- a/htdocs/langs/lv_LV/shop.lang +++ b/htdocs/langs/lv_LV/shop.lang @@ -1,10 +1,10 @@ # Dolibarr language file - Source file is en_US - shop Shop=Veikals ShopWeb=Interneta veikals -LastOrders=Pēdējās pasūtījumi +LastOrders=Pēdējie pasūtījumi OnStandBy=Gaidīšanas režīmā -TreatmentInProgress=Ārstēšana notiek -LastCustomers=Pēdējās klientiem +TreatmentInProgress=Apstrādāšana procesā +LastCustomers=Pēdējais klients OSCommerceShop=OsCommerce veikals OSCommerce=OsCommerce AddProd=Pārdot internetā diff --git a/htdocs/langs/lv_LV/sms.lang b/htdocs/langs/lv_LV/sms.lang index f1cdebbfc17..4d5167678f0 100644 --- a/htdocs/langs/lv_LV/sms.lang +++ b/htdocs/langs/lv_LV/sms.lang @@ -3,7 +3,7 @@ Sms=Sms SmsSetup=Sms iestatīšana SmsDesc=Šī lapa ļauj definēt Globālie iespējas, SMS funkcijas SmsCard=SMS Card -AllSms=Visi SMS campains +AllSms=Visas SMS kampaņas SmsTargets=Mērķi SmsRecipients=Mērķi SmsRecipient=Mērķis @@ -16,18 +16,18 @@ SmsMessage=SMS ziņojumu ShowSms=Rādīt Sms ListOfSms=Saraksts SMS campains NewSms=Jauna SMS informācijas kampaņas -EditSms=Edit Sms +EditSms=Labot Sms ResetSms=Jauns sūtīšana DeleteSms=Dzēst Sms informācijas kampaņas DeleteASms=Noņemt Sms informācijas kampaņas PreviewSms=Previuw Sms PrepareSms=Sagatavot sms -CreateSms=Izveidojiet SMS +CreateSms=Izveidot SMS SmsResult=Rezultāts SMS nosūtīšanas TestSms=Testa Sms ValidSms=Apstiprināt Sms ApproveSms=Apstiprināt Sms -SmsStatusDraft=Projekts +SmsStatusDraft=Melnraksts SmsStatusValidated=Validēta SmsStatusApproved=Apstiprināts SmsStatusSent=Nosūtīts @@ -44,10 +44,10 @@ ConfirmDeleteMailing=Vai varat apstiprināt, likvidējot informācijas kampaņas NbOfRecipients=Skaits mērķus NbOfUniqueSms=Nb DOF unikālo tālruņa numuriem NbOfSms=Nbre no fona numuru -ThisIsATestMessage=Šis ir testa ziņojums +ThisIsATestMessage=Šī ir testa ziņa SendSms=Sūti SMS SmsInfoCharRemain=Nb atlikušo rakstzīmju SmsInfoNumero= (Formāts starptautiskā ti: 33899701761) -DelayBeforeSending=Kavēšanās pirms nosūtīšanas (minūtes) +DelayBeforeSending=Kavēšanās pirms nosūtīšanas (minūtēs) SmsNoPossibleRecipientFound=Nav mērķa pieejams. Pārbaudiet iestatījumus jūsu SMS pakalpojumu sniedzēja. diff --git a/htdocs/langs/lv_LV/workflow.lang b/htdocs/langs/lv_LV/workflow.lang index 666f00c0ead..72bc6139c72 100644 --- a/htdocs/langs/lv_LV/workflow.lang +++ b/htdocs/langs/lv_LV/workflow.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - admin -WorkflowSetup=Darbplūsmu modulis uzstādīšana -WorkflowDesc=Šis modulis ir paredzēts, lai mainītu uzvedību automātisko darbību stāšanās spēkā. Pēc noklusējuma, darbplūsma ir atvērts (veicat lieta, lai jūs vēlaties). Jūs varat ļāva automātiskas darbības, kas jums ir interesantas collas -ThereIsNoWorkflowToModify=Nav darbplūsma jūs varat mainīt, lai modulis ir aktivizēts. -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Izveidot klienta pasūtījumu automātiski pēc komerciāla priekšlikums ir parakstīts -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Izveidot klientu rēķinu automātiski pēc komerciāla priekšlikums ir parakstīts +WorkflowSetup=Darbplūsmu moduļa iestatīšana +WorkflowDesc=Šis modulis ir paredzēts, lai mainītu uzvedību automātisko darbību stāšanās spēkā. Pēc noklusējuma, darbplūsma ir atvērta (Jūs varat veikt visu ko vēlaties). Jūs varat automatizēt darbības, kuras Jums ir nepieciešamas +ThereIsNoWorkflowToModify=Nav darbplūsma kuru Jūs varat mainīt sim modulim. +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Izveidot klienta pasūtījumu automātiski pēc komerciālā priekšlikuma parakstīšanas +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Izveidot klienta rēķinu automātiski pēc komerciāla priekšlikuma parakstīšanas descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Izveidot klientu rēķinu automātiski pēc tam, kad līgums ir apstiprināts -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Izveidot klientu rēķinu automātiski pēc klienta pasūtījuma tiek slēgts +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Izveidot klientu rēķinu automātiski pēc klienta pasūtījuma slēgšanas descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Klasificēt saistīta avota priekšlikumu Jāmaksā, ja klientu rīkojumu ir iestatīts uz apmaksātu descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Klasificēt saistīts avots klienta pasūtījumu (s) Jāmaksā, ja klients rēķins ir iestatīts uz apmaksātu descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Klasificēt saistīta avota klienta pasūtījumu (s) Jāmaksā, ja klients rēķins ir apstiprināts diff --git a/htdocs/langs/sk_SK/link.lang b/htdocs/langs/sk_SK/link.lang index 910d15af974..abfa69d7e2a 100644 --- a/htdocs/langs/sk_SK/link.lang +++ b/htdocs/langs/sk_SK/link.lang @@ -1,18 +1,18 @@ -/* - * Language code: sk_SK - * Automatic generated via autotranslator.php tool - * Generation date 2013-11-08 23:25:26 - */ - - -// START - Lines generated via autotranslator.php tool (2013-11-08 23:25:26). -// Reference language: en_US -> sk_SK -LinkANewFile=Prepojenie nový súbor / dokument -LinkedFiles=Prepojené súbory a dokumenty -NoLinkFound=Žiadny registrovaný odkazy -LinkComplete=Súbor bol úspešne pripojil -ErrorFileNotLinked=Súbor nemohol byť spojená -LinkRemoved=Odkaz %s bol odstránený -ErrorFailedToDeleteLink=Nepodarilo sa odstrániť odkaz "%s" -ErrorFailedToUpdateLink=Nepodarilo sa aktualizovať odkaz "%s" -// STOP - Lines generated via autotranslator.php tool (2013-11-08 23:35:10). +/* + * Language code: sk_SK + * Automatic generated via autotranslator.php tool + * Generation date 2013-11-08 23:25:26 + */ + + +// START - Lines generated via autotranslator.php tool (2013-11-08 23:25:26). +// Reference language: en_US -> sk_SK +LinkANewFile=Prepojenie nový súbor / dokument +LinkedFiles=Prepojené súbory a dokumenty +NoLinkFound=Žiadny registrovaný odkazy +LinkComplete=Súbor bol úspešne pripojil +ErrorFileNotLinked=Súbor nemohol byť spojená +LinkRemoved=Odkaz %s bol odstránený +ErrorFailedToDeleteLink=Nepodarilo sa odstrániť odkaz "%s" +ErrorFailedToUpdateLink=Nepodarilo sa aktualizovať odkaz "%s" +// STOP - Lines generated via autotranslator.php tool (2013-11-08 23:35:10). diff --git a/htdocs/langs/sk_SK/printipp.lang b/htdocs/langs/sk_SK/printipp.lang index 824e51a686b..1b051dae6cb 100644 --- a/htdocs/langs/sk_SK/printipp.lang +++ b/htdocs/langs/sk_SK/printipp.lang @@ -1,18 +1,18 @@ -/* - * Language code: sk_SK - * Automatic generated via autotranslator.php tool - * Generation date 2013-11-08 23:25:26 - */ - - -// START - Lines generated via autotranslator.php tool (2013-11-08 23:25:26). -// Reference language: en_US -> sk_SK -PrintIPPSetup=Nastavenie modulu Priama tlač -PrintIPPDesc=Ce modul Permet d'un ajouter Bouton d'dojem priame des dokumenty vers votre imprimante. Il requiert un systeme Linux Equipe de poháre. -PRINTIPP_ENABLED=Zobraziť Piktogram "Priama tlač" do zoznamu dokumentov -PRINTIPP_HOST=Tlačový server -PRINTIPP_PORT=Prístav -PRINTIPP_USER=Prihlásenie -PRINTIPP_PASSWORD=Heslo -NoPrinterFound=Žiadne tlačiarne nájdené (skontrolujte poháre Nasta) -// STOP - Lines generated via autotranslator.php tool (2013-11-08 23:48:51). +/* + * Language code: sk_SK + * Automatic generated via autotranslator.php tool + * Generation date 2013-11-08 23:25:26 + */ + + +// START - Lines generated via autotranslator.php tool (2013-11-08 23:25:26). +// Reference language: en_US -> sk_SK +PrintIPPSetup=Nastavenie modulu Priama tlač +PrintIPPDesc=Ce modul Permet d'un ajouter Bouton d'dojem priame des dokumenty vers votre imprimante. Il requiert un systeme Linux Equipe de poháre. +PRINTIPP_ENABLED=Zobraziť Piktogram "Priama tlač" do zoznamu dokumentov +PRINTIPP_HOST=Tlačový server +PRINTIPP_PORT=Prístav +PRINTIPP_USER=Prihlásenie +PRINTIPP_PASSWORD=Heslo +NoPrinterFound=Žiadne tlačiarne nájdené (skontrolujte poháre Nasta) +// STOP - Lines generated via autotranslator.php tool (2013-11-08 23:48:51). diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index fac6402e300..f770e48b715 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -376,7 +376,7 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans("TotalBuyingPriceMin").': '; if ($atleastonenotdefined) print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')'; print ''.($atleastonenotdefined?'':price($total,'','',0,0,-1,$conf->currency)).''.($atleastonenotdefined?'':price($total,'','',0,0,-1,$conf->currency)).' 
'; diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 330ea0c3273..2933bac2dbc 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -698,7 +698,7 @@ else $tmpcode=''; if (! empty($modCodeProduct->code_auto)) $tmpcode=$modCodeProduct->getNextValue($object,$type); - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; if ($_error) { print $langs->trans("RefAlreadyExists"); @@ -706,7 +706,7 @@ else print ''; // Label - print ''.$langs->trans("Label").''; + print ''.$langs->trans("Label").''; // On sell print ''.$langs->trans("Status").' ('.$langs->trans("Sell").')'; diff --git a/htdocs/public/cron/cron_run_jobs.php b/htdocs/public/cron/cron_run_jobs.php index 7473720ed10..0f56be678a7 100644 --- a/htdocs/public/cron/cron_run_jobs.php +++ b/htdocs/public/cron/cron_run_jobs.php @@ -92,7 +92,7 @@ else exit; } } -$id = GETPOST('id','int'); +$id = GETPOST('id','alpha'); // We accept non numeric id. We will filter later. // create a jobs object diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index 1cc32d1ff50..8b8e3b382c7 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -1,8 +1,8 @@ - * Copyright (C) 2010 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013 Peter Fontaine +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2010-2013 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2013 Peter Fontaine * * 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 @@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php'; /** - * \brief Class to manage bank accounts description of third parties + * Class to manage bank accounts description of third parties */ class CompanyBankAccount extends Account { @@ -232,48 +232,56 @@ class CompanyBankAccount extends Account /** * Set RIB as Default * - * @param int $id RIB id + * @param int $rib RIB id * @return int 0 if KO, 1 if OK */ - function setAsDefault($id) + function setAsDefault($rib=0) { - if ($id) { - $sql1 = "SELECT fk_soc FROM ".MAIN_DB_PREFIX."societe_rib"; - $sql1.= " WHERE rowid = ".$id; + $sql1 = "SELECT rowid as id, fk_soc FROM ".MAIN_DB_PREFIX."societe_rib"; + $sql1.= " WHERE rowid = ".($rib?$rib:$this->id); - $result1 = $this->db->query($sql1); - if ($result1) { - if ($this->db->num_rows($result1) == 0) { - return 0; - } else { - $obj = $this->db->fetch_object($result1); - $sql2 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 0 "; - $sql2.= "WHERE fk_soc = ".$obj->fk_soc; + dol_syslog(get_class($this).'::setAsDefault sql='.$sql1); + $result1 = $this->db->query($sql1); + if ($result1) + { + if ($this->db->num_rows($result1) == 0) + { + return 0; + } + else + { + $obj = $this->db->fetch_object($result1); - $sql3 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 1 "; - $sql3.= "WHERE rowid = ".$id; + $this->db->begin(); - $this->db->begin(); + $sql2 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 0 "; + $sql2.= "WHERE fk_soc = ".$obj->fk_soc; + dol_syslog(get_class($this).'::setAsDefault sql='.$sql2); + $result2 = $this->db->query($sql2); - $result2 = $this->db->query($sql2); - $result3 = $this->db->query($sql3); + $sql3 = "UPDATE ".MAIN_DB_PREFIX."societe_rib SET default_rib = 1 "; + $sql3.= "WHERE rowid = ".$obj->id; + dol_syslog(get_class($this).'::setAsDefault sql='.$sql3); + $result3 = $this->db->query($sql3); - if (!$result2 || !$result3) { - dol_print_error($this->db); - $this->db->rollback(); - return 0; - } else { - $this->db->commit(); - return 1; - } - } - } else { - dol_print_error($this->db); - return 0; - } - } else { - return 0; - } + if (!$result2 || !$result3) + { + dol_print_error($this->db); + $this->db->rollback(); + return -1; + } + else + { + $this->db->commit(); + return 1; + } + } + } + else + { + dol_print_error($this->db); + return -1; + } } } diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php index c85bb8272b5..04925ddd603 100644 --- a/test/phpunit/CompanyBankAccountTest.php +++ b/test/phpunit/CompanyBankAccountTest.php @@ -131,9 +131,9 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase $localobject->initAsSpecimen(); $result=$localobject->create($user); + print __METHOD__." result=".$result." id=".$localobject->id."\n"; $this->assertLessThan($result, 0); - print __METHOD__." result=".$result."\n"; - return $result; + return $localobject->id; } /** @@ -155,9 +155,8 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase $localobject=new CompanyBankAccount($this->savdb); $result=$localobject->fetch($id); - - $this->assertLessThan($result, 0); print __METHOD__." id=".$id." result=".$result."\n"; + $this->assertLessThan($result, 0); return $localobject; } @@ -178,7 +177,6 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase $db=$this->savdb; $result=$localobject->setAsDefault($localobject->id); - print __METHOD__." id=".$localobject->id." result=".$result."\n"; $this->assertLessThan($result, 0); return $localobject; diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index eb3fa40f98d..470b74df861 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -258,7 +258,7 @@ class DateLibTest extends PHPUnit_Framework_TestCase // Check %a and %b format for en_US $result=dol_print_date(0,'%a %b',true,$outputlangs); print __METHOD__." result=".$result."\n"; - $this->assertEquals('Thu jan',$result); + $this->assertEquals('Thu Jan',$result); return $result; } diff --git a/test/phpunit/DateLibTzFranceTest.php b/test/phpunit/DateLibTzFranceTest.php index 889c6be3c3c..17db4e3e164 100644 --- a/test/phpunit/DateLibTzFranceTest.php +++ b/test/phpunit/DateLibTzFranceTest.php @@ -193,7 +193,7 @@ class DateLibTzFranceTest extends PHPUnit_Framework_TestCase // Check %a and %b format for en_US $result=dol_print_date(0,'%a %b',false,$outputlangs); print __METHOD__." result=".$result."\n"; - $this->assertEquals('Thu jan',$result); + $this->assertEquals('Thu Jan',$result); return $result; } diff --git a/test/phpunit/WebservicesOrdersTest.php b/test/phpunit/WebservicesOrdersTest.php index c3e382a85e7..787a6086c27 100755 --- a/test/phpunit/WebservicesOrdersTest.php +++ b/test/phpunit/WebservicesOrdersTest.php @@ -174,183 +174,5 @@ class WebservicesOrdersTest extends PHPUnit_Framework_TestCase return $result; } - - - /** - * testWSOtherGetVersions - * - * @return int - */ - public function testWSOtherGetVersions() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_other.php'; - $WS_METHOD = 'getVersions'; - $ns='http://www.dolibarr.org/ns/'; - - // Set the WebService URL - print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) - { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } - - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>''); - - // Test URL - $result=''; - if ($WS_METHOD) - { - $parameters = array('authentication'=>$authentication); - print __METHOD__." call method ".$WS_METHOD."\n"; - $result = $soapclient->call($WS_METHOD,$parameters,$ns,''); - if (! $result) - { - //var_dump($soapclient); - print $soapclient->error_str; - print "
\n\n"; - print $soapclient->request; - print "
\n\n"; - print $soapclient->response; - } - - print __METHOD__." result=".$result."\n"; - $this->assertEquals('OK',$result['result']['result_code']); - } - - return $result; - } - - - /** - * testWSThirdparty - * - * @return int - */ - public function testWSThirdparty() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_thirdparty.php'; - $WS_METHOD = ''; - $ns='http://www.dolibarr.org/ns/'; - - // Set the WebService URL - print __METHOD__."create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) - { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } - - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>''); - - // Test URL - $result=''; - if ($WS_METHOD) - { - $parameters = array('authentication'=>$authentication); - print __METHOD__." call method ".$WS_METHOD."\n"; - $result = $soapclient->call($WS_METHOD,$parameters,$ns,''); - if (! $result) - { - //var_dump($soapclient); - print $soapclient->error_str; - print "
\n\n"; - print $soapclient->request; - print "
\n\n"; - print $soapclient->response; - } - - print __METHOD__." result=".$result."\n"; - $this->assertEquals('OK',$result['result']['result_code']); - } - - return $result; - } - - - /** - * testWSUser - * - * @return int - */ - public function testWSUser() - { - global $conf,$user,$langs,$db; - $conf=$this->savconf; - $user=$this->savuser; - $langs=$this->savlangs; - $db=$this->savdb; - - $WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_user.php'; - $WS_METHOD = ''; - $ns='http://www.dolibarr.org/ns/'; - - // Set the WebService URL - print __METHOD__." create nusoap_client for URL=".$WS_DOL_URL."\n"; - $soapclient = new nusoap_client($WS_DOL_URL); - if ($soapclient) - { - $soapclient->soap_defencoding='UTF-8'; - $soapclient->decodeUTF8(false); - } - - // Call the WebService method and store its result in $result. - $authentication=array( - 'dolibarrkey'=>$conf->global->WEBSERVICES_KEY, - 'sourceapplication'=>'DEMO', - 'login'=>'admin', - 'password'=>'admin', - 'entity'=>''); - - // Test URL - $result=''; - if ($WS_METHOD) - { - $parameters = array('authentication'=>$authentication); - print __METHOD__." call method ".$WS_METHOD."\n"; - $result = $soapclient->call($WS_METHOD,$parameters,$ns,''); - if (! $result) - { - //var_dump($soapclient); - print $soapclient->error_str; - print "
\n\n"; - print $soapclient->request; - print "
\n\n"; - print $soapclient->response; - } - - print __METHOD__." result=".$result."\n"; - //$this->assertEquals('OK',$result['result']['result_code']); - } - - return $result; - } - } ?> \ No newline at end of file