---
name: "LedgerSMB::DBObject::Draft"
section: "3pm"
platform: "linux"
package: "ledgersmb"
version: "1.3.40-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/LedgerSMB::DBObject::Draft"
---

# LedgerSMB::DBObject::Draft(3pm)

LedgerSMB base class for managing "drafts."

## NAME

LedgerSMB::DBObject::Draft - LedgerSMB base class for managing "drafts."

## SYNOPSIS

This module contains the methods for managing unapproved, unbatched financial  transactions.  This does not contain facities for creating such transactions,  only searching for them, and posting them to the books.

## METHODS

- *search()*

  returns a list of results for the search criteria.  This list is also stored  in `$draft`-\>{search\_resuts}

  Requres `$self`-\>{type} to be one of 'ar', 'ap', or 'gl'

  Optional hash entries for search criteria are:

  with\_accno: Draft transaction against a specific account. from\_date:  Earliest date for match to\_date: Latest date for match amount\_le: total less than or equal to amount\_ge: total greater than or equal to

- *approve()*

  Approves the draft identified by the transaction id in `$draft`-\>{id}.  Once approved, the draft shows up in financial reports.

- *delete()*

  Deletes the draft associated with transaction id in `$draft`-\>{id}.

  Naturally, only unapproved transactions can be deleted.  Once posted to the books, a draft may not be deleted.

## COPYRIGHT

Copyright (C) 2009 LedgerSMB Core Team.  This file is licensed under the GNU  General Public License version 2, or at your option any later version.  Please see the included License.txt for details.
