diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 391ea580b3a..68c4b14ee01 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1101,7 +1101,7 @@ if ($_GET['propalid'] > 0) print ''; print ''; // ancre pour retourner sur la ligne print ''; - if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); + if ($objp->fk_product_type==1) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.''; print ' - '.nl2br($objp->product); @@ -1226,7 +1226,7 @@ if ($_GET['propalid'] > 0) if ($objp->fk_product > 0) { print ''; - if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); + if ($objp->fk_product_type==1) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.''; print ' - '.nl2br($objp->product); diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 5cc7535776b..772430d0a7c 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -107,14 +107,17 @@ if ($_POST['action'] == 'add' && $user->rights->commande->creer) $commande->adresse_livraison_id = $_POST['adresse_livraison_id']; $commande->contactid = $_POST['contactidp']; - $commande->add_product($_POST['idprod1'],$_POST['qty1'],$_POST['remise_percent1']); - $commande->add_product($_POST['idprod2'],$_POST['qty2'],$_POST['remise_percent2']); - $commande->add_product($_POST['idprod3'],$_POST['qty3'],$_POST['remise_percent3']); - $commande->add_product($_POST['idprod4'],$_POST['qty4'],$_POST['remise_percent4']); - $commande->add_product($_POST['idprod5'],$_POST['qty5'],$_POST['remise_percent5']); - $commande->add_product($_POST['idprod6'],$_POST['qty6'],$_POST['remise_percent6']); - $commande->add_product($_POST['idprod7'],$_POST['qty7'],$_POST['remise_percent7']); - $commande->add_product($_POST['idprod8'],$_POST['qty8'],$_POST['remise_percent8']); + $NBLINES=8; + for ($i = 1 ; $i <= $NBLINES ; $i++) + { + if ($_POST['idprod'.$i]) + { + $xid = 'idprod'.$i; + $xqty = 'qty'.$i; + $xremise = 'remise_percent'.$i; + $commande->add_product($_POST[$xid],$_POST[$xqty],$_POST[$xremise]); + } + } $commande_id = $commande->create($user); @@ -1281,7 +1284,7 @@ else print ''; print ''; // ancre pour retourner sur la ligne print ''; - if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); + if ($objp->fk_product_type==1) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.' - '.nl2br($objp->product); print ($objp->description && $objp->description!=$objp->product)?'
'.nl2br($objp->description):''; @@ -1380,7 +1383,7 @@ else if ($objp->fk_product > 0) { print ''; - if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); + if ($objp->fk_product_type==1) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.''; print ' - '.nl2br($objp->product); diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index d2710a76cf9..6b47cdf92e4 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -337,7 +337,7 @@ if ($_GET["id"] > 0) if ($objp->fk_product > 0) { print ''; - if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); + if ($objp->fk_product_type==1) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.' - '.nl2br($objp->product); print ($objp->description && $objp->description!=$objp->product)?'
'.stripslashes(nl2br($objp->description)):''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index e437692ab83..3c6c6dcc54b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2124,7 +2124,7 @@ else print ''; print ''; // ancre pour retourner sur la ligne print ''; - if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); + if ($objp->fk_product_type==1) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.''; print ' - '.nl2br(stripslashes($objp->product)); @@ -2227,7 +2227,7 @@ else if ($objp->fk_product > 0) { print ''; - if ($objp->fk_product_type) print img_object($langs->trans('ShowService'),'service'); + if ($objp->fk_product_type==1) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); print ' '.$objp->ref.''; print ' - '.nl2br($objp->product); diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index 625dd95b31d..7b163468a68 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -342,7 +342,7 @@ if ($_GET["propalid"] > 0) if ($objp->fk_product > 0) { print ''; - if ($objp->fk_product_type) + if ($objp->fk_product_type==1) print img_object($langs->trans('ShowService'),'service'); else print img_object($langs->trans('ShowProduct'),'product'); diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 31362a36428..0b6eee5c676 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -79,11 +79,11 @@ if ($_POST["mode"]=='predefined') $date_end=''; if ($_POST["date_startmonth"] && $_POST["date_startday"] && $_POST["date_startyear"]) { - $date_start=mktime(12, 0 , 0, $_POST["date_startmonth"], $_POST["date_startday"], $_POST["date_startyear"]); + $date_start=dolibarr_mktime(12, 0 , 0, $_POST["date_startmonth"], $_POST["date_startday"], $_POST["date_startyear"]); } if ($_POST["date_endmonth"] && $_POST["date_endday"] && $_POST["date_endyear"]) { - $date_end=mktime(12, 0 , 0, $_POST["date_endmonth"], $_POST["date_endday"], $_POST["date_endyear"]); + $date_end=dolibarr_mktime(12, 0 , 0, $_POST["date_endmonth"], $_POST["date_endday"], $_POST["date_endyear"]); } } diff --git a/htdocs/fourn/product/index.php b/htdocs/fourn/product/index.php index 965e0cbecc4..28d831024b7 100644 --- a/htdocs/fourn/product/index.php +++ b/htdocs/fourn/product/index.php @@ -128,7 +128,7 @@ if ($resql) $var=!$var; print ""; print "rowid\">"; - if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service"); + if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); print " rowid\">$objp->ref\n"; print "$objp->label"; diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index 6bc2e228340..9f20ac803df 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -197,7 +197,7 @@ if ($resql) { $oldid = $objp->rowid; print ''; - if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service"); + if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); print " "; print ''.$objp->ref.''; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 4a2d8ed4120..66f3c0d202e 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -331,7 +331,7 @@ NbOfDays=Nb of days AtEndOfMonth=At end of month Offset=Offset AlwaysActive=Always active -UpdateRequired=Your system need to be updated. For this click on Update now. +UpdateRequired=Your system needs to be updated. For this click on Update now. WebServer=Web server DocumentRootServer=Web server root directory DataRootServer=Data files directory diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 6573d70fd47..1e32e87d901 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -69,7 +69,7 @@ VATRate=VAT Rate Amount=Amount TotalTTCToYourCredit=Total TTC to your credit BillStatus=Invoice status -BillStatusDraft=Draft (need to be validated) +BillStatusDraft=Draft (needs to be validated) BillStatusPayed=Payed BillStatusCanceled=Abandonned BillStatusValidated=Validated (needs to be payed) diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 15320ca8ca5..d740e1a9314 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -34,7 +34,7 @@ MemberTypeLabel=Member type label MembersTypes=Members types MembersAttributes=Members attributes SearchAMember=Search a member -MemberStatusDraft=Draft (need to be validated) +MemberStatusDraft=Draft (needs to be validated) MemberStatusDraftShort=To validate MemberStatusActive=Validated MemberStatusActiveShort=Validated diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 5dd5a64df04..c7782a722e8 100755 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -30,7 +30,7 @@ StatusOrderRefusedShort=Refused StatusOrderReceivedPartiallyShort=Partially received StatusOrderReceivedAllShort=Everything received StatusOrderCanceled=Canceled -StatusOrderDraft=Draft (need to be validated) +StatusOrderDraft=Draft (needs to be validated) StatusOrderValidated=Validated StatusOrderOnProcess=On process StatusOrderProcessed=Processed diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index 0b2d81fa1b4..65d6c5b4411 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -30,11 +30,11 @@ ShowPropal=Show proposal PropalsDraft=Drafts PropalsOpened=Opened PropalsNotBilled=Closed not billed -PropalStatusDraft=Draft (need to be validated) +PropalStatusDraft=Draft (needs to be validated) PropalStatusValidated=Validated (proposal is opened) PropalStatusOpened=Validated (proposal is opened) PropalStatusClosed=Closed -PropalStatusSigned=Signed (need to be billed) +PropalStatusSigned=Signed (needs to be billed) PropalStatusNotSigned=Not signed (closed) PropalStatusBilled=Billed PropalStatusDraftShort=Draft diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 73d73b2cc3f..51f657a20d5 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -157,7 +157,7 @@ if ($result) $var=!$var; print ""; print ''; - if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service"); + if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); print " rowid\">$objp->ref\n"; print ''.dolibarr_trunc($objp->label,40).''; diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 49fde3a0088..49b47088111 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -268,7 +268,7 @@ if ($resql) $var=!$var; print ''; print "rowid\">"; - if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service"); + if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); print ' '; print ''.$objp->ref."\n"; diff --git a/htdocs/product/popuprop.php b/htdocs/product/popuprop.php index 9bcefd43d7e..91d1e0b57aa 100644 --- a/htdocs/product/popuprop.php +++ b/htdocs/product/popuprop.php @@ -112,7 +112,7 @@ if ($result) $var=!$var; print ""; print ''; - if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service"); + if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); print " "; print $objp->ref.''; diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 25b83516497..2946a784ee3 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -249,7 +249,7 @@ if ($resql) $var=!$var; print ''; print "rowid\">"; - if ($objp->fk_product_type) + if ($objp->fk_product_type==1) { print img_object($langs->trans("ShowService"),"service"); } diff --git a/htdocs/telephonie/client/facture.php b/htdocs/telephonie/client/facture.php index 1a96ca348a8..860da477ded 100644 --- a/htdocs/telephonie/client/facture.php +++ b/htdocs/telephonie/client/facture.php @@ -406,7 +406,7 @@ if ($_GET["facid"] > 0) if ($objp->fk_product > 0) { print ''; - if ($objp->fk_product_type) print img_object($langs->trans("ShowService"),"service"); + if ($objp->fk_product_type==1) print img_object($langs->trans("ShowService"),"service"); else print img_object($langs->trans("ShowProduct"),"product"); print ' '.stripslashes(nl2br($objp->description)).''; if ($objp->date_start && $objp->date_end) { print " (Du ".dolibarr_print_date($objp->date_start)." au ".dolibarr_print_date($objp->date_end).")"; }