<?php

require_once '../phpobjects/common/global.php';

echo '1';

$aInsert = array (
  'client_type' => 'Owner',
  '_sk_client_id' => '1',
  '_sk_contact_id' => '1',
  'payment_method' => '',
  'payment_reference' => 'A70R6CA9D2B8',
  'approve' => 'Yes',
  'Invoice Status' => 'Closed',
  'invoice_paid_date' => '06/30/2014'
);

echo '2';

$fmcInvoice = fFMPerformInsert('petsafe', 'Web - Invoice', $aInsert);

echo '3';

$invoice_id = $fmcInvoice->getField('_pk_invoice_id');
echo '<br>Invoice ID: '.$invoice_id;

fCleanup();

?>


