Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: Takepos issue with cash method and dictionnaries #18635

Closed
loxK opened this issue Sep 7, 2021 · 1 comment
Closed

Regression: Takepos issue with cash method and dictionnaries #18635

loxK opened this issue Sep 7, 2021 · 1 comment
Labels
Bug This is a bug (something does not work as expected) Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open

Comments

@loxK
Copy link
Contributor

loxK commented Sep 7, 2021

Bug

There is a mess in payment methods. First, in the dictionaries, changing a payment method's label has no visible effect (for any payment method):

Peek 07-09-2021 17-30

Also, it has no visible effect on TakePos UI. Whatever is set in the dictionaries, the button always shows "Espèce" as the label.

Worst, for "Espèces" if the label value is not set to "cash", takepos will not accept the payment, complaining about bank account not set for that method. (also seen in the forum)

image

This was notices after upgrading from version 12 to 13, and it is still an issue in 14.0.1

I looked at the code, and it looks messy to me with many things like:

if ($paycode == 'LIQ') $paycode = 'CASH';
if ($paycode == 'CB')  $paycode = 'CB';
if ($paycode == 'CHQ') $paycode = 'CHEQUE';
	if ($paycode == 'LIQ') {
		$paycode = 'cash';
$paycode = $pay;
if ($pay == 'cash')   $paycode = 'LIQ'; // For backward compatibility
if ($pay == 'card')   $paycode = 'CB'; // For backward compatibility
if ($pay == 'cheque') $paycode = 'CHQ'; // For backward compatibility

Environment

  • Version: 14.0.1, 13.0.4, develop
  • OS: Ubuntu
  • Web server: Apache, any version
  • PHP: 7.4
  • Database: MySQL
  • URL(s): /htdocs/admin/dict.php?id=13 , /htdocs/takepos/index.php?idmenu=186&mainmenu=takepos&leftmenu=

Expected and actual behavior

Well, a label is a label, and it has a "code" to abstract its usage. The set labels should be used for payment method's labels in the UI, and changing it shouldn't affect core functionalities.

@loxK loxK added the Bug This is a bug (something does not work as expected) label Sep 7, 2021
@loxK loxK changed the title Breaking: Takepos issue with cash method and dictionnaries Regression: Takepos issue with cash method and dictionnaries Sep 7, 2021
@github-actions
Copy link

github-actions bot commented Sep 7, 2022

This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).

@github-actions github-actions bot added the Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open label Sep 7, 2022
@loxK loxK closed this as completed Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected) Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant