From 0be59646a848760b52d6761748187fa454617b21 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 22 Aug 2019 22:00:53 +0200 Subject: [PATCH 01/10] Update stripelive_oauthcallback.php --- htdocs/core/modules/oauth/stripelive_oauthcallback.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/oauth/stripelive_oauthcallback.php b/htdocs/core/modules/oauth/stripelive_oauthcallback.php index cf2c2418092..bbea53f9049 100644 --- a/htdocs/core/modules/oauth/stripelive_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripelive_oauthcallback.php @@ -65,7 +65,7 @@ $storage = new DoliStorage($db, $conf); // Setup the credentials for the requests $credentials = new Credentials( - $conf->global->OAUTH_STRIPE_TEST_ID, + $conf->global->OAUTH_STRIPE_LIVE_ID, $conf->global->STRIPE_LIVE_SECRET_KEY, $currentUri->getAbsoluteUri() ); From 06fdd5ddbc116a3f9894f7c25df7cfbe5265ab76 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 22 Aug 2019 22:50:41 +0200 Subject: [PATCH 02/10] Update stripelive_oauthcallback.php --- htdocs/core/modules/oauth/stripelive_oauthcallback.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/oauth/stripelive_oauthcallback.php b/htdocs/core/modules/oauth/stripelive_oauthcallback.php index bbea53f9049..a32223105b9 100644 --- a/htdocs/core/modules/oauth/stripelive_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripelive_oauthcallback.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/modules/oauth/stripe_oauthcallback.php + * \file htdocs/core/modules/oauth/stripelive_oauthcallback.php * \ingroup oauth * \brief Page to get oauth callback */ @@ -45,7 +45,7 @@ $backtourl = GETPOST('backtourl', 'alpha'); $uriFactory = new \OAuth\Common\Http\Uri\UriFactory(); //$currentUri = $uriFactory->createFromSuperGlobalArray($_SERVER); //$currentUri->setQuery(''); -$currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/stripe_oauthcallback.php'); +$currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/stripelive_oauthcallback.php'); /** From 839ba76ae4da2ee11f544e9f6e2acb733ef691b5 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 23 Aug 2019 08:58:08 +0200 Subject: [PATCH 03/10] Update stripetest_oauthcallback.php --- htdocs/core/modules/oauth/stripetest_oauthcallback.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/oauth/stripetest_oauthcallback.php b/htdocs/core/modules/oauth/stripetest_oauthcallback.php index eb7463749ae..55b532f231c 100644 --- a/htdocs/core/modules/oauth/stripetest_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripetest_oauthcallback.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/modules/oauth/stripe_oauthcallback.php + * \file htdocs/core/modules/oauth/stripetest_oauthcallback.php * \ingroup oauth * \brief Page to get oauth callback */ @@ -45,7 +45,7 @@ $backtourl = GETPOST('backtourl', 'alpha'); $uriFactory = new \OAuth\Common\Http\Uri\UriFactory(); //$currentUri = $uriFactory->createFromSuperGlobalArray($_SERVER); //$currentUri->setQuery(''); -$currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/stripe_oauthcallback.php'); +$currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/stripetest_oauthcallback.php'); /** From bb763ecb59bfafde02b8095ef4a8721dba358b86 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 14:02:25 +0200 Subject: [PATCH 04/10] Fix lang in takepos --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index e09c31664cd..4737ecbde27 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -367,7 +367,7 @@ if ($action=="valid" || $action=="history") } else { - if ($invoice->paye) $sectionwithinvoicelink.=''.$langs->trans("Payed").''; + if ($invoice->paye) $sectionwithinvoicelink.=''.$langs->trans("Paid").''; else $sectionwithinvoicelink.=$langs->trans('BillShortStatusValidated'); } $sectionwithinvoicelink.=''; From c4b18890d952a2e1611d08b419ebf295c1db6c4c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 15:12:56 +0200 Subject: [PATCH 05/10] Update invoice.php --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 4737ecbde27..1e11161e8a1 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -511,7 +511,7 @@ print '
'.$sectionwithinvoicelink; print ''; print '' . $langs->trans('ReductionShort') . ''; print '' . $langs->trans('Qty') . ''; -print '' . $langs->trans('TotalHTShort') . ''; +print '' . $langs->trans('Total') . ''; print "\n"; if ($placeid > 0) From 2be125e647daa8680559a7900cacac959b8a89c1 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 15:47:17 +0200 Subject: [PATCH 06/10] Fix display context for takepos in invoice list fix for thirdparty name and create button --- htdocs/compta/facture/list.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 284b747465d..f0c10598f82 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -605,7 +605,7 @@ if ($resql) $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; - if($user->rights->facture->creer) + if($user->rights->facture->creer && $contextpage != 'poslist') { $newcardbutton.= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/facture/card.php?action=create'); } @@ -1068,7 +1068,14 @@ if ($resql) if (! empty($arrayfields['s.nom']['checked'])) { print ''; - print $thirdpartystatic->getNomUrl(1, 'customer'); + if ($contextpage == 'poslist') + { + print $thirdpartystatic->name; + } + else + { + print $thirdpartystatic->getNomUrl(1, 'customer'); + } print ''; if (! $i) $totalarray['nbfield']++; } From 7112fcee9a6031a93294f235f132f55a3ac65906 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 15:54:14 +0200 Subject: [PATCH 07/10] Update list.php --- htdocs/compta/facture/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index f0c10598f82..653f1182d78 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -687,7 +687,7 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); + if ($massactionbutton && $contextpage != 'poslist') $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); print '
'; print ''."\n"; @@ -1237,7 +1237,7 @@ if ($resql) // Action column print ''; print ''; print ''; -print ''; +print ''; print "\n"; if ($placeid > 0)
'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + if (($massactionbutton || $massaction) && $contextpage != 'poslist') // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { $selected=0; if (in_array($obj->id, $arrayofselected)) $selected=1; From 7b5c9818f7b25b623a68b472f7f79a3083d1898d Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 15:58:33 +0200 Subject: [PATCH 08/10] Fix context display with takepos societe/list.php --- htdocs/societe/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index daff9aec557..8f352a21b28 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -670,7 +670,7 @@ if ($moreforfilter) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields -if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); +if ($massactionbutton && $contextpage != 'poslist') $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); if (empty($arrayfields['customerorsupplier']['checked'])) print ''; @@ -1287,7 +1287,7 @@ while ($i < min($num, $limit)) // Action column print ''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + if (($massactionbutton || $massaction) && $contextpage != 'poslist') // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { $selected=0; if (in_array($obj->rowid, $arrayofselected)) $selected=1; From 76691925a4796474dc8d60b36b143c01e9eb8f6c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 26 Aug 2019 15:35:20 +0200 Subject: [PATCH 09/10] FIX Missing div for buttons in tax, loan, various payment modules --- htdocs/compta/bank/various_payment/card.php | 6 +++--- htdocs/compta/salaries/card.php | 6 +++--- htdocs/compta/sociales/card.php | 12 ++++++------ htdocs/compta/tva/card.php | 6 +++--- htdocs/loan/card.php | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 67f1e2909fc..aac8f603054 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -544,16 +544,16 @@ if ($id) { if (! empty($user->rights->banque->modifier)) { - print ''.$langs->trans("Delete").''; + print ''; } else { - print ''.$langs->trans("Delete").''; + print ''; } } else { - print ''.$langs->trans("Delete").''; + print ''; } print ""; diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index c19b18bc0f0..392b90b7bb6 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -473,16 +473,16 @@ if ($id) { if (! empty($user->rights->salaries->delete)) { - print ''.$langs->trans("Delete").''; + print ''; } else { - print ''.$langs->trans("Delete").''; + print ''; } } else { - print ''.$langs->trans("Delete").''; + print ''; } print ""; } diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 0318efb7e1a..9e68e6e79a3 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -710,37 +710,37 @@ if ($id > 0) // Reopen if ($object->paye && $user->rights->tax->charges->creer) { - print "id&action=reopen\">".$langs->trans("ReOpen").""; + print ""; } // Edit if ($object->paye == 0 && $user->rights->tax->charges->creer) { - print "id&action=edit\">".$langs->trans("Modify").""; + print ""; } // Emit payment if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->tax->charges->creer) { - print "id&action=create\">".$langs->trans("DoPayment").""; + print ""; } // Classify 'paid' if ($object->paye == 0 && round($resteapayer) <=0 && $user->rights->tax->charges->creer) { - print "id&action=paid\">".$langs->trans("ClassifyPaid").""; + print ""; } // Clone if ($user->rights->tax->charges->creer) { - print "id&action=clone\">".$langs->trans("ToClone").""; + print ""; } // Delete if ($user->rights->tax->charges->supprimer) { - print "id&action=delete\">".$langs->trans("Delete").""; + print ""; } print ""; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index be738b374cf..759ed75df5e 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -385,16 +385,16 @@ if ($id) { if (! empty($user->rights->tax->charges->supprimer)) { - print ''.$langs->trans("Delete").''; + print ''; } else { - print ''.$langs->trans("Delete").''; + print ''; } } else { - print ''.$langs->trans("Delete").''; + print ''; } print ""; } diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index e826e86ea57..f4c624e0e96 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -793,25 +793,25 @@ if ($id > 0) { // print ''.$langs->trans('CreateCalcSchedule').''; - print ''.$langs->trans("Modify").''; + print ''; } // Emit payment if ($object->paid == 0 && ((price2num($object->capital) > 0 && round($staytopay) < 0) || (price2num($object->capital) > 0 && round($staytopay) > 0)) && $user->rights->loan->write) { - print ''.$langs->trans("DoPayment").''; + print ''; } // Classify 'paid' if ($object->paid == 0 && round($staytopay) <=0 && $user->rights->loan->write) { - print ''.$langs->trans("ClassifyPaid").''; + print ''; } // Delete if ($object->paid == 0 && $user->rights->loan->delete) { - print ''.$langs->trans("Delete").''; + print ''; } print ""; From 6771a2e1f9e5ec38b65088cbb95ff78ad1dde99f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Aug 2019 16:27:00 +0200 Subject: [PATCH 10/10] Update invoice.php --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 1e11161e8a1..a6ff3be5b06 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -511,7 +511,7 @@ print '
'.$sectionwithinvoicelink; print '
' . $langs->trans('ReductionShort') . '' . $langs->trans('Qty') . '' . $langs->trans('Total') . '' . $langs->trans('TotalTTCShort') . '