#1076 internal server error AP Transaction

1.3
closed-fixed
None
5
2014-08-20
2014-02-19
Mark Deason
No

When entering a new AP Transaction without filling in Invoice Created, I get an Internal Server Error referring me to the Apache error log, which states...

Wed Feb 19 16:19:36.135360 2014] [authz_core:error] [pid 13456:tid 2903427904] [client 192.168.15.112:58463] AH01630: client denied by server configuration: /var/lib/ledgersmb/css/ledgersmb.css, referer: http://192.168.15.3/ledgersmb/ap.pl
DBD::Pg::st execute failed: ERROR: invalid input syntax for type date: ""
LINE 17: crdate = '',
^ at LedgerSMB/AA.pm line 403.
DBD::Pg::st execute failed: ERROR: current transaction is aborted, commands ignored until end of transaction block at LedgerSMB.pm line 833.
2014/02/19 16:19:42 - ERROR - LedgerSMB::dberror LedgerSMB.pm (1099) -- Logging SQL State 25P02, error 7, string ERROR: current transaction is aborted, commands ignored until end of transaction block
Can't use string ("LedgerSMB::Setting") as a HASH ref while "strict refs" in use at LedgerSMB.pm line 941.
Compilation failed in require at /usr/share/ledgersmb/ap.pl line 7.
[Wed Feb 19 16:19:42.971443 2014] [cgid:error] [pid 13456:tid 2895035200] [client 192.168.15.112:58464] Premature end of script headers: ap.pl, referer: http://192.168.15.3/ledgersmb/ap.pl

Related

Bugs: #1076

Discussion

  • Erik Huelsmann

    Erik Huelsmann - 2014-02-19

    Hi Mark,

    Which LedgerSMB version do you use? (That is, 1.3, obviously, but which patch version? 1.3.XX?)

    Bye,

    Erik.

     
    • Mark Deason

      Mark Deason - 2014-02-19

      1.3.37

      On Wed, Feb 19, 2014 at 8:44 AM, Erik Huelsmann ehuelsmann@users.sf.netwrote:

      Hi Mark,

      Which LedgerSMB version do you use? (That is, 1.3, obviously, but which
      patch version? 1.3.XX?)

      Bye,

      Erik.

      Status: open
      Created: Wed Feb 19, 2014 04:28 PM UTC by Mark Deason
      Last Updated: Wed Feb 19, 2014 04:28 PM UTC
      Owner: nobody

      When entering a new AP Transaction without filling in Invoice Created, I
      get an Internal Server Error referring me to the Apache error log, which
      states...

      Wed Feb 19 16:19:36.135360 2014] [authz_core:error] [pid 13456:tid
      2903427904]
      [client 192.168.15.112:58463] AH01630: client denied by
      server configuration: /var/lib/ledgersmb/css/ledgersmb.css, referer:
      http://192.168.15.3/ledgersmb/ap.pl
      DBD::Pg::st execute failed: ERROR: invalid input syntax for type date: ""
      LINE 17: crdate = '',
      ^ at LedgerSMB/AA.pm line 403.
      DBD::Pg::st execute failed: ERROR: current transaction is aborted,
      commands ignored until end of transaction block at LedgerSMB.pm line 833.
      2014/02/19 16:19:42 - ERROR - LedgerSMB::dberror LedgerSMB.pm (1099) --
      Logging SQL State 25P02, error 7, string ERROR: current transaction is
      aborted, commands ignored until end of transaction block
      Can't use string ("LedgerSMB::Setting") as a HASH ref while "strict refs"
      in use at LedgerSMB.pm line 941.
      Compilation failed in require at /usr/share/ledgersmb/ap.pl line 7.
      [Wed Feb 19 16:19:42.971443 2014] [cgid:error] [pid 13456:tid 2895035200] [client
      192.168.15.112:58464]
      Premature end of script headers: ap.pl, referer:
      http://192.168.15.3/ledgersmb/ap.pl


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/ledger-smb/bugs/1076/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1076

  • Pongracz Istvan

    Pongracz Istvan - 2014-02-19

    I confirmed this issue.
    Technically if the invoice does not contain when it created, it should be the transdate automatically.

    I try to figure out, where to setup the default in AP/AR transaction (not sales invoice, that already has default value):
    $form->{crdate} = $form->{transdate} if (!$form->{crdate});

     
  • Pongracz Istvan

    Pongracz Istvan - 2014-02-19

    Check the revision [r6878].
    I committed a fix for this kind of issue:
    on post we just fill empty crdate value with transdate, same as in duedate case.

    Please test it, I think it will solve AP/AR transaction issues: it will always get value.

     

    Related

    Commit: [r6878]


    Last edit: Pongracz Istvan 2014-02-19
  • Pongracz Istvan

    Pongracz Istvan - 2014-02-19
    • status: open --> pending-fixed
    • assigned_to: Pongracz Istvan
     
  • Pongracz Istvan

    Pongracz Istvan - 2014-02-19

    I close this issue, as I checked it is working in AR/AP transaction as expected:
    users can ignore this field, it will be populated with transdate.

     
  • Pongracz Istvan

    Pongracz Istvan - 2014-02-19
    • status: pending-fixed --> closed-fixed
     
  • Mark Deason

    Mark Deason - 2014-02-19

    confirmed in 1.3 branch, thanks

     
  • John Locke

    John Locke - 2014-02-19

    Hi,

    First of all, I am very happy to see this fix--it's certainly a usability issue leaving unfixed.

    However, I wonder if it's fixed correctly. I mean, I would think we would want the default date to be today, not the transaction date. That way it would reflect when the invoice was actually created, not the transaction date somebody entered.

    It's not a date I currently use or care about -- but I could see it helping track down statement balances, if we got into a dispute with a customer about a back-dated bill -- it would show when the invoice was actually added to the system, whereas the transaction date would be the effective date.

     
  • Pongracz Istvan

    Pongracz Istvan - 2014-02-20

    Hi John,

    Thanks for your comment!

    Some things about the situation:
    A company is able to issue (sales) invoice in the following ways:
    - paper based invoice, in Hungary it is typically a preprinted small book, filled by manually, it has preprinted and registered unique serial numbers
    - using any kind of computer based solution
    - ledgersmb itself

    When we use sales invoice from ledgersmb (product or services), we already force the invoice created day to the current day, the user cannot modify it and saved on post.

    Any other case, when the user enter other invoices from other systems, the invoice created date cannot be forced to today, because the field value is unknown and independent of ledgersmb. For example the operator only enters all incoming (or outgoing from other systems or book) invoices once a month: it is his responsibility to enter the correct days or ignore it.

    I found some invoice from Germany for example, where only the Transdate exists on the invoice, there is no other date on the invoice. In this case we use this date for invoice created and due date, too.

    In Hungary there are some rules, how to fill an invoice if one pays in cash or wire transfer, continuous delivery like cellphone or electricity costs or a one-time project.
    If we want to force all rules into ledgersmb, it will break other's workflow, just like this one additional field.
    In this case, the user has to know the basic, how to issue a correct invoice. Anyway, I think it is the user's responsibility to know the basic of the business.

    The Plan B could be that the user (sysadmin/app admin) makes changes to the original code to meet his/her requirements.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks