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

AR > Sales Invoice [New] (Customer) link not working #4754

Closed
gwhitney opened this issue Jun 25, 2020 · 4 comments
Closed

AR > Sales Invoice [New] (Customer) link not working #4754

gwhitney opened this issue Jun 25, 2020 · 4 comments

Comments

@gwhitney
Copy link

gwhitney commented Jun 25, 2020

On github master, with a brand-new database (company name "chunk") with Services COA installed, go to the AR > Sales Invoice screen. Type "Sally" in the Customer box and then hit the "[New]" link.

Expected outcome: popup or new tab/window or temporary visit to the Contacts > Add Contact screen or a form similar thereto that would allow some data on Customer "Sally" to be entered and saved, with a return to the AR > Sales Invoice screen with that new Customer entity filled in for the Customer entry box.

Observed outcome: New window visiting URL "https://mydomain.tld/login.pl?action=login&company=chunk#contact.pl?action=add&entity_class=2", producing a page that consists only of "Error!
Action Not Defined: login"

Commentary: I might guess that the URL should be "https://mydomain.tld/contact.pl?action=add&entity_class=2", i.e. that the "?action=login&company=chunk#" in the middle of the URL should be deleted. However, if I visit that URL, I get a screen that looks a bit like Contact > Add Contact but none of the boxes have labels. So I guess that's not quite right either. If someone knows and can provide a clear description of what needs to be fixed here, I'd be happy to give it a shot.

@ehuelsmann
Copy link
Member

Hi, I'll look at providing you with the input later today. If you would like to engage in more direct interaction, please feel free to join our developers chat: https://riot.im/app/#/room/#ledgersmb:matrix.org .

@ehuelsmann
Copy link
Member

ok. back to describe what you're seeing.

The [New] link has a target attribute. This makes the JS in our application open the link in a new window. However, since that new window lacks all JS that's required to "run" the page. By removing the target attribute from the a tag (and removing the login.pl URL prefix, retaining only the contact.pl... bit after the #-sign), the target page opens in the current window, within the "maindiv" (the right area next to the menu).

The code which generates a [New] link is in is.pl; similar instances of the same code are likely in ir.pl, oe.pl and aa.pl. All in a function named form_header. On master, the line in is.pl to look at is 342; for the others, I haven't looked it up.

In a later response to this ticket, I'll need to explain about the behaviour of the callback URL argument which is used by the code in the old/ directory. My thinking is that the above at least helps you find your way around in the code for the initial bits.

@ehuelsmann
Copy link
Member

To be honest, I think adding the filter to the balance sheet to filter reporting units as required for #4750 is likely simpler than this change.

@ehuelsmann
Copy link
Member

Resolved in #4762

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants