diff --git a/dev/detectduplicatelangkey.sh b/dev/detectduplicatelangkey.sh deleted file mode 100755 index 06d9cd8a69e..00000000000 --- a/dev/detectduplicatelangkey.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Helps find duplicate translation keys in language files -# -# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr - -for file in `find . -type f` -do - dupes=$( - sed "s/^\s*//" "$file" | # Remove any leading whitespace - sed "s/\s*\=/=/" | # Remove any whitespace before = - grep -Po "(^.*?)=" | # Non greedeely match everything before = - sed "s/\=//" | # Remove trailing = so we get the key - sort | uniq -d # Find duplicates - ) - - if [ -n "$dupes" ] - then - echo "Duplicates found in $file" - echo "$dupes" - fi -done diff --git a/dev/fixnotabfiles.sh b/dev/detectnotabfiles.sh similarity index 91% rename from dev/fixnotabfiles.sh rename to dev/detectnotabfiles.sh index 3e5d28966c9..c89b999b03d 100755 --- a/dev/fixnotabfiles.sh +++ b/dev/detectnotabfiles.sh @@ -1,6 +1,6 @@ #!/bin/sh #------------------------------------------------------ -# Script to find files that are not Unix encoded +# Detect files that does not contains any tab inside # # Laurent Destailleur - eldy@users.sourceforge.net #------------------------------------------------------ diff --git a/dev/fixduplicatelangkey.sh b/dev/fixduplicatelangkey.sh new file mode 100755 index 00000000000..2d9cb7f7a85 --- /dev/null +++ b/dev/fixduplicatelangkey.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# Helps find duplicate translation keys in language files +# +# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr + + +# Syntax +if [ "x$1" != "xlist" -a "x$1" != "xfix" ] +then + echo "Usage: detectduplicatelangkey.sh (list|fix)" +fi + + +if [ "x$1" = "xlist" ] +then + for file in `find htdocs/langs/en_US -name *.lang -type f` + do + dupes=$( + sed "s/^\s*//" "$file" | # Remove any leading whitespace + sed "s/\s*\=/=/" | # Remove any whitespace before = + grep -Po "(^.*?)=" | # Non greedeely match everything before = + sed "s/\=//" | # Remove trailing = so we get the key + sort | uniq -d # Find duplicates + ) + + if [ -n "$dupes" ] + then + echo "Duplicates found in $file" + echo "$dupes" + fi + done +fi + +# To convert +if [ "x$1" = "xfix" ] +then + echo Feature not implemented. Please fix files manually. +fi diff --git a/dev/optimize_images.sh b/dev/optimize_images.sh index 616eec75757..0d532d054ad 100755 --- a/dev/optimize_images.sh +++ b/dev/optimize_images.sh @@ -10,6 +10,7 @@ INPLACE='0' max_input_size=0 max_output_size=0 + usage() { cat </dev/null rm -fr $2.firstpass fi @@ -67,6 +69,25 @@ get_max_file_length() main() { + test=`type pngcrush >/dev/null 2>&1` + result=$? + if [ "x$result" == "x1" ]; then + echo "Tool pngcrush not found" && exit + fi + + test=`type optipng >/dev/null 2>&1` + result=$? + if [ "x$result" == "x1" ]; then + echo "Tool optipng not found" && exit + fi + + test=`type jpegtran >/dev/null 2>&1` + result=$? + if [ "x$result" == "x1" ]; then + echo "Tool jpegtran not found" && exit + fi + + # If $INPUT is empty, then we use current directory if [[ "$INPUT" == "" ]]; then INPUT=$(pwd) @@ -81,6 +102,8 @@ main() OUTPUT='/tmp/optimize' fi + echo "Mode is $INPLACE (1=Images are replaced, 0=New images are stored into $OUTPUT)" + # We create the output directory mkdir -p $OUTPUT @@ -96,6 +119,7 @@ main() # Search of all jpg/jpeg/png in $INPUT # We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT + echo "Scan $INPUT to find images" IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT) if [ "$QUIET" == "0" ]; then @@ -103,6 +127,7 @@ main() echo fi for CURRENT_IMAGE in $IMAGES; do + echo "Process $CURRENT_IMAGE" filename=$(basename $CURRENT_IMAGE) if [ "$QUIET" == "0" ]; then printf '%s ' "$filename" @@ -155,6 +180,13 @@ SHORTOPTS="h,i:,o:,q,s,p" LONGOPTS="help,input:,output:,quiet,no-stats,inplace" ARGS=$(getopt -s bash --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@") +# Syntax +if [ "x$1" != "xlist" -a "x$1" != "xfix" ] +then + echo "Usage: optimize_images.sh (list|fix) -i dirtoscan" + exit +fi + eval set -- "$ARGS" while true; do case $1 in @@ -191,5 +223,11 @@ while true; do shift done +# To convert +if [ "x$1" = "xlist" ] +then + INPLACE=0 +fi + main diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index dd57a2fd988..6d8f5ca83ee 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -45,13 +45,13 @@ else -$obj_facturation->calculTotaux(); // Redefine prix_total_ttc, prix_total_ht et montant_tva from $_SESSION['poscart'] +$obj_facturation->calculTotaux(); // Redefine prix_total_ttc, prix_total_ht et montant_tva from $_SESSION['poscart'] -$total_ttc = $obj_facturation->prixTotalTtc(); +$total_ttc = $obj_facturation->prixTotalTtc(); -/*var_dump($obj_facturation); +/*var_dump($obj_facturation); var_dump($_SESSION['poscart']); -var_dump($total_ttc); +var_dump($total_ttc); exit;*/ diff --git a/htdocs/cashdesk/include/environnement.php b/htdocs/cashdesk/include/environnement.php index 7411b998272..3e6a88f252a 100644 --- a/htdocs/cashdesk/include/environnement.php +++ b/htdocs/cashdesk/include/environnement.php @@ -32,7 +32,7 @@ $conf_db_base = $dolibarr_main_db_name; $conf_fksoc = (! empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))?$_SESSION["CASHDESK_ID_THIRDPARTY"]:($conf->global->CASHDESK_ID_THIRDPARTY>0?$conf->global->CASHDESK_ID_THIRDPARTY:0); // Identifiant unique correspondant a l'entrepot a utiliser $conf_fkentrepot = (! empty($_SESSION["CASHDESK_ID_WAREHOUSE"]))?$_SESSION["CASHDESK_ID_WAREHOUSE"]:($conf->global->CASHDESK_ID_WAREHOUSE>0?$conf->global->CASHDESK_ID_WAREHOUSE:0); -if (! empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $conf_fkentrepot = 0; // If option to disable stock decrease is on, we set warehouse id to 0. +if (! empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $conf_fkentrepot = 0; // If option to disable stock decrease is on, we set warehouse id to 0. // Identifiant unique correspondant au compte caisse / liquide $conf_fkaccount_cash = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]))?$_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]:($conf->global->CASHDESK_ID_BANKACCOUNT_CASH>0?$conf->global->CASHDESK_ID_BANKACCOUNT_CASH:0); diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index fa943acda96..27ce3380dd4 100644 --- a/htdocs/cashdesk/validation_verif.php +++ b/htdocs/cashdesk/validation_verif.php @@ -226,25 +226,25 @@ switch ($action) if ($warehouseidtodecrease > 0) { // Decrease - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; - $langs->load("agenda"); - // Loop on each line - $cpt=count($invoice->lines); - for ($i = 0; $i < $cpt; $i++) - { - if ($invoice->lines[$i]->fk_product > 0) - { - $mouvP = new MouvementStock($db); - $mouvP->origin = &$invoice; - // We decrease stock for product - if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); - else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); - if ($result < 0) { - $error++; - } - } + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + $langs->load("agenda"); + // Loop on each line + $cpt=count($invoice->lines); + for ($i = 0; $i < $cpt; $i++) + { + if ($invoice->lines[$i]->fk_product > 0) + { + $mouvP = new MouvementStock($db); + $mouvP->origin = &$invoice; + // We decrease stock for product + if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + if ($result < 0) { + $error++; + } + } } - } + } } else { @@ -263,28 +263,28 @@ switch ($action) $resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), 0); - if ($warehouseidtodecrease > 0) - { - // Decrease - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; - $langs->load("agenda"); - // Loop on each line - $cpt=count($invoice->lines); - for ($i = 0; $i < $cpt; $i++) - { - if ($invoice->lines[$i]->fk_product > 0) - { - $mouvP = new MouvementStock($db); - $mouvP->origin = &$invoice; - // We decrease stock for product - if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); - else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); - if ($result < 0) { - $error++; - } - } - } - } + if ($warehouseidtodecrease > 0) + { + // Decrease + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + $langs->load("agenda"); + // Loop on each line + $cpt=count($invoice->lines); + for ($i = 0; $i < $cpt; $i++) + { + if ($invoice->lines[$i]->fk_product > 0) + { + $mouvP = new MouvementStock($db); + $mouvP->origin = &$invoice; + // We decrease stock for product + if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + if ($result < 0) { + $error++; + } + } + } + } $id = $invoice->id; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 56511f43c97..115b3248a05 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1998,7 +1998,7 @@ if ($action == 'create' && $user->rights->commande->creer) { $rowspan ++; // Bank Account - if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled)) + if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled)) { print ''; print ''; // Bank Account - if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && ! empty($conf->banque->enabled)) + if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && ! empty($conf->banque->enabled)) { print '
'; diff --git a/htdocs/core/modules/modSyncSupplierWebServices.class.php b/htdocs/core/modules/modSyncSupplierWebServices.class.php old mode 100755 new mode 100644 diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index f1e5449cca7..f85a7a042f2 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1544,7 +1544,7 @@ elseif (! empty($object->id)) print '
'; print '
'; diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php old mode 100755 new mode 100644 diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php old mode 100755 new mode 100644 diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 2751cc4c7b6..af61e62c31c 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1039,7 +1039,6 @@ YesInSummer=Yes in summer OnlyFollowingModulesAreOpenedToExternalUsers=Note, only following modules are opened to external users (whatever are permission of such users): SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s -TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. @@ -1548,7 +1547,6 @@ MAIN_APPLICATION_TITLE=Force visible name of application (warning: setting your NbMajMin=Minimum number of uppercase characters NbNumMin=Minimum number of numeric characters NbSpeMin=Minimum number of special characters -NbSpeMin=Minimum number of special characters NbIteConsecutive=Maximum number of repeating same characters NoAmbiCaracAutoGeneration=Do not use ambiguous characters ("1","l","i","|","0","O") for automatic generation SalariesSetup=Setup of module salaries diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 5c16e18e4cf..9429a682857 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -137,8 +137,6 @@ BillFrom=From BillTo=To ActionsOnBill=Actions on invoice NewBill=New invoice -Prélèvements=Standing order -Prélèvements=Standing orders LastBills=Last %s invoices LastCustomersBills=Last %s customers invoices LastSuppliersBills=Last %s suppliers invoices @@ -219,7 +217,6 @@ NoInvoice=No invoice ClassifyBill=Classify invoice SupplierBillsToPay=Suppliers invoices to pay CustomerBillsUnpaid=Unpaid customers invoices -DispenseMontantLettres=The bill drafted by mechanographical are exempt from the order in letters DispenseMontantLettres=The written invoices through mecanographic procedures are dispensed by the order in letters NonPercuRecuperable=Non-recoverable SetConditions=Set payment terms diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index 0fe3b72b81f..7a3c7f0c288 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -101,9 +101,6 @@ CatSupLinks=Links between suppliers and categories CatCusLinks=Links between customers/prospects and categories CatProdLinks=Links between products/services and categories CatMemberLinks=Links between members and categories -CatProdLinks=Products -CatCusLinks=Customer/Prospects -CatSupLinks=Suppliers DeleteFromCat=Remove from category DeletePicture=Picture delete ConfirmDeletePicture=Confirm picture deletion? diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang index e06aadef531..511516dc755 100644 --- a/htdocs/langs/en_US/contracts.lang +++ b/htdocs/langs/en_US/contracts.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - contracts ContractsArea=Contracts area ListOfContracts=List of contracts -LastContracts=Last %s modified contracts +LastModifiedContracts=Last %s modified contracts AllContracts=All contracts ContractCard=Contract card ContractStatus=Contract status diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 69cf8e0491c..5432c5b5b52 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -18,9 +18,8 @@ CronExplainHowToRunUnix=On Unix environment you should use crontab to run Comman CronExplainHowToRunWin=On Microsoft(tm) Windows environement you can use Scheduled task tools to run Command line each minutes # Menu CronJobs=Scheduled jobs -CronListActive= List of active jobs -CronListInactive= List of disabled jobs -CronListActive= List of scheduled jobs +CronListActive=List of active/scheduled jobs +CronListInactive=List of disabled jobs # Page list CronDateLastRun=Last run CronLastOutput=Last run output diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 76986b67621..3eab6893735 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -53,7 +53,7 @@ ShippingExist=A shipment exists DraftOrWaitingApproved=Draft or approved not yet ordered DraftOrWaitingShipped=Draft or validated not yet shipped MenuOrdersToBill=Orders delivered -MenuOrdersToBill2=Orders to bill +MenuOrdersToBill2=Billable orders SearchOrder=Search order SearchACustomerOrder=Search a customer order ShipProduct=Ship product @@ -154,7 +154,6 @@ OrderByPhone=Phone CreateInvoiceForThisCustomer=Bill orders NoOrdersToInvoice=No orders billable CloseProcessedOrdersAutomatically=Classify "Processed" all selected orders. -MenuOrdersToBill2=Billables orders OrderCreation=Order creation Ordered=Ordered OrderCreated=Your orders have been created diff --git a/htdocs/langs/en_US/resource.lang b/htdocs/langs/en_US/resource.lang index 3fbe6e4fb23..d64075dfbf5 100755 --- a/htdocs/langs/en_US/resource.lang +++ b/htdocs/langs/en_US/resource.lang @@ -16,11 +16,8 @@ ResourceType=Resource type ResourceFormLabel_description=Resource description ResourcesLinkedToElement=Resources linked to element -RessourceLineSuccessfullyUpdated=Resource successfully updated -RessourceLineSuccessfullyDeleted=Resource successfully deleted ShowResourcePlanning=Show resource planning -NoResourceInDatabase=No resource in database GotoDate=Go to date ResourceElementPage=Element resources diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index c13e3e767bb..9670d002be6 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -63,7 +63,6 @@ ShowGroup=Show group ShowUser=Show user NonAffectedUsers=Non assigned users UserModified=User modified successfully -GroupModified=Group modified successfully PhotoFile=Photo file UserWithDolibarrAccess=User with Dolibarr access ListOfUsersInGroup=List of users in this group diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index 35cfa23d9e2..fd4305bbd0b 100644 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -41,14 +41,13 @@ TransMetod=Transmission method Send=Send Lines=Lines StandingOrderReject=Issue a rejection -InvoiceRefused=Invoice 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 RefusedInvoicing=Billing the rejection NoInvoiceRefused=Do not charge the rejection -InvoiceRefused=Charge the rejection to customer +InvoiceRefused=Invoice refused (Charge the rejection to customer) Status=Status StatusUnknown=Unknown StatusWaiting=Waiting diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index cc20610b991..6fd6d834497 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -82,7 +82,7 @@ if ($action == 'add' && $user->rights->stock->creer) if (! empty($backtopage)) { - header("Location: ".$backtopage); + header("Location: ".$backtopage); exit; } else @@ -93,7 +93,7 @@ if ($action == 'add' && $user->rights->stock->creer) } else { - $action = 'create'; + $action = 'create'; setEventMessage($object->error, 'errors'); } } @@ -179,7 +179,7 @@ if ($action == 'create') print "
\n"; print ''; print ''; - print ''; + print ''; dol_fiche_head(); diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index af5f3393672..0ace96c6719 100755 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -824,32 +824,32 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase $this->assertEquals(dol_nl2br($string, 1, 1), "a
a"); } - /** - * testDolPrice2Num - * - * @return boolean - */ - public function testDolPrice2Num() + /** + * testDolPrice2Num + * + * @return boolean + */ + public function testDolPrice2Num() { - $this->assertEquals(1000, price2num('1 000.0')); - $this->assertEquals(1000, price2num('1 000','MT')); - $this->assertEquals(1000, price2num('1 000','MU')); + $this->assertEquals(1000, price2num('1 000.0')); + $this->assertEquals(1000, price2num('1 000','MT')); + $this->assertEquals(1000, price2num('1 000','MU')); $this->assertEquals(1000.123456, price2num('1 000.123456')); // Round down - $this->assertEquals(1000.12, price2num('1 000.123452','MT')); - $this->assertEquals(1000.12345, price2num('1 000.123452','MU'),"Test MU"); + $this->assertEquals(1000.12, price2num('1 000.123452','MT')); + $this->assertEquals(1000.12345, price2num('1 000.123452','MU'),"Test MU"); - // Round up - $this->assertEquals(1000.13, price2num('1 000.125456','MT')); - $this->assertEquals(1000.12546, price2num('1 000.125456','MU'),"Test MU"); + // Round up + $this->assertEquals(1000.13, price2num('1 000.125456','MT')); + $this->assertEquals(1000.12546, price2num('1 000.125456','MU'),"Test MU"); // Text can't be converted $this->assertEquals('12.4$',price2num('12.4$')); - $this->assertEquals('12r.4$',price2num('12r.4$')); + $this->assertEquals('12r.4$',price2num('12r.4$')); - return true; + return true; } }