Venture ERP Documentation : AddEditCustomer

Venture :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

01 vAPI_add_edit_customer


Add/Edit a customer master record

Inputs:
Input Name Required Type Max Length Details
$arg_array YES ASSOC -- Details follow:
$arg_array / company_id YES INT -- references: company_master.company_id
$arg_array / employee_id YES INT -- references: employee_master.employee_id
$arg_array / customer_code YES STRING 128 references: customer_master.customer_code
$arg_array / customer_name YES STRING 64 references: customer_master.customer_name
$arg_array / address_1 YES STRING 64 references: customer_master.address_1
$arg_array / address_2 YES STRING 64 references: customer_master.address_2
$arg_array / address_3 YES STRING 64 references: customer_master.address_3
$arg_array / city YES STRING 32 references: customer_master.city
$arg_array / locality YES STRING 32 references: customer_master.locality




State, province, etc...
$arg_array / mailing_code YES STRING 16 references: customer_master.mailing_code




Zip Code, mailing code, etc...
$arg_array / country YES STRING 32 references: customer_master.country
$arg_array / phone YES STRING 32 references: customer_master.phone
$arg_array / fax YES STRING 32 references: customer_master.fax
$arg_array / email YES STRING 128 references: customer_master.email
$arg_array / statement_email YES STRING 64 references: customer_master.statement_email




Optional email address for e-statements
$arg_array / invoice_email YES STRING 64 references: customer_master.invoice_email




Optional email address for e-invoices
$arg_array / quote_email YES STRING 64 references: customer_master.quote_email




Optional email address for e-quotes
$arg_array / statement_fax YES STRING 32 references: customer_master.statement_fax




Optional fax # for faxed statements
$arg_array / invoice_fax YES STRING 32 references: customer_master.invoice_fax




Optional fax # for faxed invoices
$arg_array / quote_fax YES STRING 64 references: customer_master.quote_fax




Optional fax # for faxed quotes
$arg_array / shipping_instructions YES STRING 75 references: customer_master.shipping_instructions
$arg_array / comments YES STRING 75 references: customer_master.comments
$arg_array / cc_type YES STRING 16 references: customer_master.cc_type




Should match a value in configuration
$arg_array / cc_number YES TEXT -- Will be encrypted when stored in DB
$arg_array / cc_expiration YES STRING 4 references: customer_master.cc_expiration




Format: MMYY
$arg_array / cvv2 YES STRING 8 references: customer_master.cvv2




Security code on back of credit card
$arg_array / customer_terms_code YES STRING 8 references: customer_terms_master.customer_terms_code
$arg_array / tax_jurisdiction_code YES STRING 16 references: tax_jurisdiction_master.tax_jurisdiction_code
$arg_array / tax_exempt_flag YES BOOLEAN -- references: customer_master.tax_exempt_flag
$arg_array / tax_exempt_id YES STRING 32 references: customer_master.tax_exempt_id
$arg_array / tax_expiration_date YES DATE -- references: customer_master.tax_expiration_date
$arg_array / customer_matrix YES NUMERIC 3.0+ references: customer_master.customer_matrix




Valid values: 0-999
$arg_array / active_flag YES BOOLEAN -- references: customer_master.active_flag




If FALSE, customer is prevented from adding orders
$arg_array / ecomm_flag YES BOOLEAN -- references: customer_master.ecomm_flag
$arg_array / credit_limit YES MONETARY -- references: customer_master.credit_limit




0 credit limit = No credit limit
$arg_array / credit_date YES DATE -- references: customer_master.credit_date




Date credit was established
$arg_array / early_pay_discount_percent YES NUMERIC 6.4+ references: customer_master.early_pay_discount_percent
$arg_array / email_list YES BOOLEAN -- references: customer_master.email_list




If TRUE, customer accepts promotional email
$arg_array / backorder_permit_flag YES BOOLEAN -- references: customer_master.backorder_permit_flag




If FALSE, customer is prevented from adding backordered items
$arg_array / statement_code YES ENUM -- references: customer_master.statement_code




A: Always send statement




N: Never send statement




D: Send statement if amount due or credit balance
$arg_array / statement_output_process YES ENUM -- references: customer_master.statement_output_process




EMAILTXT: Send statements as plain email




EMAILPDF: Send statements as PDF attachment to email




FAX: Send statements as FAX




PRINT: Print statements
$arg_array / invoice_output_process YES ENUM -- references: customer_master.invoice_output_process




EMAILTXT: Send invoices as plain email




EMAILPDF: Send invoices as PDF attachment to email




FAX: Send invoices as FAX
$arg_array / quote_output_process YES ENUM -- references: customer_master.quote_output_process




EMAILTXT: Send quotes as plain email




EMAILPDF: Send quotes as PDF attachment to email




FAX: Send quotess as FAX
$arg_array / opt1_value YES INT -- references: customer_master.opt1_value
$arg_array / opt2_value YES INT -- references: customer_master.opt2_value
$arg_array / opt3_value YES INT -- references: customer_master.opt3_value




Opt values are not used by the system. They exist for ad-hoc reporting.
$dbconn YES DBHANDLE -- Database Connection


Outputs:
Output Name Type Details
$record ASSOC Details follow:
$record / action STRING ADD: A new record was added


EDIT: An existing record was updated


Error Codes:
PGQUERY Failed SQL query
BLANK_CUSTOMER_CODE Customer code cannot be blank
RESERVED_CUSTOMER_CODE Supplied customer code is reserved (NEW)
INVALID_TAX_CODE Supplied tax code is invalid
CHECKPOINT Error when calling the checkpoint function


Called API Functions:
logAPI:vAPI_checkpoint_table_revision

Return to:
Customer_API Reference

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.3
Page was generated in 0.1292 seconds