#109 fix LedgerSMB::OE::save()

closed
nobody
None
5
2011-05-25
2010-03-11
No

This is a patch to a recent checkout of Trunk from CVS.

Attempt to save a purchase order failed with:

INSERT INTO oe
(id, ordnumber, quonumber, transdate,
reqdate, shippingpoint, shipvia,
notes, intnotes, curr, closed, department_id,
person_id, language_code, ponumber, terms,
quotation, oe_class_id, entity_credit_account)
VALUES
(4, ?, ?, ?,
?, ?, ?,
?, ?, ?, ?, ?,
?, ?, ?, ?,
?, ?, ?)
ERROR: null value in column "oe_class_id" violates not-null constraint

The parameter passed for oe_class_id is a local variable, initialized in
the case of customer (I take it a sales order) but uninitialized in the
the case of customer (I take it a sales order) but uninitialized in the
case of a vendor (like in the case of a purchase order).

With this change, the local variable $class_id is set to 1 in the case
of a customer or 2 otherwise, and the purchase order is saved without
obvious error.

Discussion

  • Chris Travers

    Chris Travers - 2011-05-25

    Previously applied/

     
  • Chris Travers

    Chris Travers - 2011-05-25
    • status: open --> closed
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks