billmax documentation   BillMax Billing Solutions
  877.245.5629
  sales@billmax.com
 

Name

BillMax_AccountPut — Insert or update an Account record in the account table

Synopsis

#include "billmax.h"
int BillMax_AccountPut( account,  
  account,  
  flags);  
  account;
  flags;

DESCRIPTION

If account->number is 0, then a new record is inserted into the account table. If account->number is NOT 0 and there exists a record in the account table of which account.number is the same value as account->number, then the database fields of that record are updated with the values in ACCOUNT structure. Otherwise a new record is inserted with the values in ACCOUNT structure.

PARAMETERS

ACCOUNT *account

The data for inserting or updating a record in account table. See ACCOUNT structure.

int flags

flags is used when updating an existing Account. The following values OR'd together are recognized:

  • FLAGS_FORCE - Used when the new State is Open State.

    • if ((flags & FLAGS_FORCE) == 0 ) - change all Users that have Suspended State to Open State.

    • if ((flags & FLAGS_FORCE) == 1 ) - change ALL Users to Open State, regardless of state.

    This behavior cascades down to the Service's that belong to the Users.

  • FLAGS_NONOTE

    • if ((flags & FLAGS_NONOTE) == 0 ) - create a Note for this Account on a database update or insertion.

    • if ((flags & FLAGS_NONOTE) == 1 ) - do not create a Note for this Account on a database update or insertion.

RETURN VALUE

0 for success.

NOTES

Executes /usr/local/billmax/local/account_hook if it exists and is executable.

SEE ALSO

BillMax_AccountPutIntoEnviron BillMax_ConfigPutIntoEnviron BillMax Hook


Document Revision A for BillMax 2.2.0   -   Copyright © 1997-2006 The iSpark Group, Inc.

All rights reserved. No part of this documentation may be reproduced or transmitted in any fashion without written permission by The iSpark Group, Inc. This documentation is for the sole use of licensees of the BillMax billing software created by The iSpark Group, Inc. Making the documentation available to a non-licensee of BillMax without written permission of The iSpark Group, Inc. is a violation of the use of this documentation.

While precautions have been taken in the preparation of this documentation, The iSpark Group, Inc. assumes neither liability nor responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

All terms mentioned that are known to be trademarks have been appropriately capitalized. Use of the a trademark does not affect the validity of any trademark or service mark.

Links to third-party Web sites are provided for convenience. The iSpark Group, Inc. is not responsible for any content contained in the third-party Web sites.

Comments about this documentation may be sent to doc@billmax.com