diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 123ca44a7cf..a6fba55eb63 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -38,6 +38,7 @@ $langs->load("banks"); $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"]; +$orig_account=isset($_GET["orig_account"])?$_GET["orig_account"]:$_POST["orig_account"]; $html = new Form($db); @@ -184,7 +185,7 @@ if ($result) // Confirmations if ($_GET["action"] == 'delete_categ') { - $html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"],"Supprimer dans la catégorie","Etes-vous sûr de vouloir supprimer le classement dans la catégorie ?","confirm_delete_categ"); + $html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"]."&orig_account=".$orig_account,"Supprimer dans la catégorie","Etes-vous sûr de vouloir supprimer le classement dans la catégorie ?","confirm_delete_categ"); print '
'; } @@ -197,117 +198,182 @@ if ($result) $acct->fetch($objp->fk_account); $account = $acct->id; + // Tableau sur 4 colonne si déja rapproché, sinon sur 5 colonnes + // Author - print "".$langs->trans("Author").""; + print ''.$langs->trans("Author").""; if ($objp->fk_user_author) { $author=new User($db,$objp->fk_user_author); $author->fetch(); - print ''; + print ''; print img_object($langs->trans("ShowUser"),'user').' '.$author->fullname.''; } else { - print " "; + print ' '; } print ""; $i++; - } - print "
rowid\">"; - print ""; - - // Account - print "".$langs->trans("Account").""; - if (! $objp->rappro) - { - $html->select_comptes($acct->id,'accountid',0); - print ''; - } - else - { - print "id."\">".$acct->label.""; - } - print ""; - - // Date ope - if (! $objp->rappro) - { - print ''.$langs->trans("Date").""; - $html->select_date($objp->do,'do'); - print ''; - print ''; - } - - // Value date - if (! $objp->rappro) - { - print "".$langs->trans("DateValue").""; - $html->select_date($objp->dv,'dv'); - print '   '; - print ''; - print img_edit_remove() . " "; - print ''; - print img_edit_add() .""; - print ''; - print ''; - } - - // Description - print "".$langs->trans("Label").""; - print ''; - print ''; - print ''; - - // Amount - if (! $objp->rappro) - { - print "".$langs->trans("Amount").""; - print ''; - print ''; - print ''; - } - - print "
"; - - // Type paiement - print "".$langs->trans("Type").""; - print "
rowid\">"; - print ''; - print $html->select_types_paiements($objp->fk_type,"value",'',2); - print ''; - print ''; - print "
"; - print ""; - - // Releve rappro - if ($acct->rappro) - { print "
rowid\">"; - print ''; - print "".$langs->trans("Conciliation").""; - print $langs->trans("AccountStatement").' '; - print ''; + print ""; + print ""; + + // Account + print "".$langs->trans("Account").""; +/* + if (! $objp->rappro) + { + if ($user->rights->banque->modifier && $acct->type != 2 && $acct->rappro) // Si non compte cash et si rapprochable + { + print ''; + $html->select_comptes($acct->id,'accountid',0); + print ''; + //print ''; + //print ''; + //print ''; + } + else + { + print ''; + $html->select_comptes($acct->id,'accountid',0); + print ''; + } + print ''; + } + else + { +*/ + print '".$acct->label.""; +/* + } +*/ print ''; - print '
'; + + // Date ope + print ''.$langs->trans("Date").''; + print ''; + if (! $objp->rappro) + { + $html->select_date($objp->do,'do'); + print ''; + } + else + { + print dolibarr_print_date($objp->do); + } + print ''; + + // Value date + print "".$langs->trans("DateValue").""; + print ''; + if (! $objp->rappro) + { + $html->select_date($objp->dv,'dv'); + print '   '; + print ''; + print img_edit_remove() . " "; + print ''; + print img_edit_add() .""; + print ''; + } + else + { + print dolibarr_print_date($objp->dv); + } + print ""; + + // Description + print "".$langs->trans("Label").""; + if (! $objp->rappro) + { + print ''; + } + else + { + print ''; + } + print ''; + print ''; + print ''; + print ''; + + // Amount + print "".$langs->trans("Amount").""; + print ''; + if (! $objp->rappro) + { + print ''; + print ''; + } + else + { + print price($objp->amount); + } + print ""; + + print ""; + + // Type paiement + print "".$langs->trans("Type").""; + print "
rowid\">"; + print ''; + print ""; + print $html->select_types_paiements($objp->fk_type,"value",'',2); + print ''; + print ''; + print "
"; + print ""; + + // Releve rappro + if ($acct->rappro) // Si compte rapprochable + { + print "".$langs->trans("Conciliation").""; + print "
rowid\">"; + print ''; + print ""; + print ''; + print $langs->trans("AccountStatement").' '; + print ''; + print '
'; + print ''; + } + + print ""; + } - print ""; - $db->free($result); } print ''; -print '
'; +/* + * Boutons actions + */ +/* +print '
'; + +if ($orig_account) +{ + $acct=new Account($db,$orig_account); + $acct->fetch($orig_account); + print ''.$langs->trans("BackToConciliate",$acct->label).''; +} + +print '
'; +*/ // Liste les categories +print '
'; print ''; print ""; print ""; +print ""; print ""; + print '"; } - else + else { - print ""; + print ""; } } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index f1d69eda4d1..f2933d31e18 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1193,7 +1193,7 @@ else print '
".$langs->trans("Categories").""; print " "; diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php index 8a879444f4d..4490d6f1ec1 100644 --- a/htdocs/compta/bank/rappro.php +++ b/htdocs/compta/bank/rappro.php @@ -216,28 +216,28 @@ if ($resql) } else { - // Si pas encore rapproché - if ($user->rights->banque->modifier) + // Si pas encore rapproch + if ($user->rights->banque->modifier) { - print ''; - - print ''; - print img_edit(); - print '   '; - - if ($objp->do <= mktime() ) { - print ''; - print img_delete(); - print ""; - } - else { - print " "; // On n'empeche la suppression car le raprochement ne pourra se faire qu'après la date passée et que l'écriture apparaissent bien sur le compte. - } - print "'; + + print ''; + print img_edit(); + print '   '; + + if ($objp->do <= mktime() ) { + print ''; + print img_delete(); + print ''; + } + else { + print " "; // On n'empeche la suppression car le raprochement ne pourra se faire qu'après la date passée et que l'écriture apparaissent bien sur le compte. + } + print "  
'; - if ($_GET['action'] != 'editconditions' && $fac->brouillon) print ''; + if ($_GET['action'] != 'editconditions' && $fac->brouillon) print ''; print '
'; print $langs->trans('PaymentConditions'); print ''.img_edit($langs->trans('SetConditions')).''.img_edit($langs->trans('SetConditions'),1).'
'; print ''; if ($_GET['action'] == 'editconditions') @@ -1209,7 +1209,7 @@ else print ''; - if ($_GET['action'] != 'editmode' && $fac->brouillon) print ''; + if ($_GET['action'] != 'editmode' && $fac->brouillon) print ''; print '
'; print $langs->trans('PaymentMode'); print ''.img_edit($langs->trans('SetMode')).''.img_edit($langs->trans('SetMode'),1).'
'; print ''; if ($_GET['action'] == 'editmode') @@ -1235,7 +1235,7 @@ else if ($_GET['action'] != 'classer') { print ''; - print img_edit($langs->trans('SetProject')); + print img_edit($langs->trans('SetProject'),1); print ''; } print ''; diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index d201346da10..9a494c4c81f 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -620,14 +620,17 @@ function img_edit_remove($alt = "default") /** \brief Affiche logo editer/modifier fiche \param alt Texte sur le alt de l'image + \param float Si il faut y mettre le style "float: right" \return string Retourne tag img */ -function img_edit($alt = "default") +function img_edit($alt = "default",$float=0) { - global $conf,$langs; - if ($alt=="default") $alt=$langs->trans("Modify"); -// return ''.$alt.''; - return ''; + global $conf,$langs; + if ($alt=="default") $alt=$langs->trans("Modify"); + $img=''.$alt.'trans("Warning"); - return ''.$alt.''; + global $conf,$langs; + if ($alt=="default") $alt=$langs->trans("Warning"); + $img='