LedgerSMB-API

 view release on metacpan or  search on metacpan

t/tmpl/12-lsmb-api-ic-inventory.t  view on Meta::CPAN

               partnumber => $partnumber,
              description => 'Widgets, 250 to the pack',
          selectIC_income => '4410--General Sales',
                IC_income => '4410--General Sales',
              IC_tax_2150 => 1,
  IC_tax_2150_description => '2150--Sales Tax',
                    notes => '',
                oldmarkup => '1,215.8',
              priceupdate => $date,
                sellprice => '62.50',
                listprice => 'NaN.00',
                 lastcost => '24.50',
                   markup => '1,215.8',
               weightunit => 'lbs',
           customercurr_1 => 'USD',
            customer_rows => 1,
           makemodel_rows => 1,
             partnumber_1 => $part_id,
           # partnumber_1 => 'Widget-0001',
              sellprice_1 => '0.25',
               lastcost_1 => '0.098',

t/tmpl/12-lsmb-api-ic-inventory.t  view on Meta::CPAN

        tests => { 'eq' => { description => 'Widgets, 250 to the pack',
                               sellprice => '62.5', 
                                lastcost => '24.5' }
           },
        label => "Assembly no. $assy_250_part_id successfully inserted into LSMB inventory."
    );

$fields{'partnumber'} = 'Widgets-0500';
$fields{'description'} = 'Widgets, 500 to the pack';
$fields{'sellprice'} = '125.00';
$fields{'listprice'} = 'NaN.00';
$fields{'lastcost'} = '49.00';
$fields{'qty_1'} = '500';

# Create another new Assembly 
my $assy_500_part_id = LedgerSMB::API->create_new_assembly($myconfig,$lsmb,\%fields);

row_ok( table => 'parts',
        where => [ partnumber => $assy_500_part_id ],
        tests => { 'eq' => { description => 'Widgets, 500 to the pack',
                               sellprice => '125', 
                                lastcost => '49' }
           },
        label => "Assembly no. $assy_500_part_id successfully inserted into LSMB inventory."
    );

$fields{'partnumber'} = 'Widgets-1000';
$fields{'description'} = 'Widgets, 1000 to the pack';
$fields{'sellprice'} = '250.00';
$fields{'listprice'} = 'NaN.00';
$fields{'lastcost'} = '98.00';
$fields{'qty_1'} = '1000';

# Create still another new Assembly 
my $assy_1000_part_id = LedgerSMB::API->create_new_assembly($myconfig,$lsmb,\%fields);

row_ok( table => 'parts',
        where => [ partnumber => $assy_1000_part_id ],
        tests => { 'eq' => { description => 'Widgets, 1000 to the pack',
                               sellprice => '250', 

t/tmpl/12-lsmb-api-ic-inventory.t  view on Meta::CPAN

       defaultcurrency => 'USD',
                 forex => 0,
                vendor => 'The Widget Source--10143',
             transdate => $date,
          oldtransdate => $date,
                  path => 'bin/mozilla',
                 login => 'LSMB_USER',
              rowcount => 2,
              oldqty_1 => 5102,
                  id_1 => $part_id,
           listprice_1 => 'NaN.00',
            lastcost_1 => 'NaN.00',
       # taxaccounts_1 => '2150',
                 sku_1 => 'Widget-0001',
  inventory_accno_id_1 => '10013',
     income_accno_id_1 => '10049',
    expense_accno_id_1 => '10057',
       runningnumber_1 => 1,
          partnumber_1 => 'Widget-0001',
         description_1 => 'Widget, single',
                 qty_1 => 5102,
           sellprice_1 => '0.098'

t/tmpl/15-lsmb-api-ic-assy.t  view on Meta::CPAN

              taxaccounts => '2150',
           selectcurrency => 'USD',
               partnumber => $partnumber,
              description => 'Widgets, 250 to the pack',
          selectIC_income => '4410--General Sales',
                IC_income => '4410--General Sales',
              IC_tax_2150 => 1,
  IC_tax_2150_description => '2150--Sales Tax',
              priceupdate => $date,
                sellprice => '62.50',
                listprice => 'NaN.00',
                 lastcost => '37.00',
                   markup => '1,215.8',
               weightunit => 'lbs',
             partnumber_1 => 'YMD-0001',
              sellprice_1 => '0.25',
               lastcost_1 => '0.148',
                 weight_1 => 0,
          runningnumber_1 => 1,
                    qty_1 => 250,
                    bom_1 => 1,

t/tmpl/17-lsmb-api-oe-po.t  view on Meta::CPAN

       defaultcurrency => 'USD',
                 forex => 0,
                vendor => 'The Widget Source--10129',
             transdate => $date,
          oldtransdate => $date,
                  path => 'bin/mozilla',
                 login => 'LSMB_USER',
              rowcount => 2,
              oldqty_1 => 5102,
                  id_1 => 10119,
           listprice_1 => 'NaN.00',
            lastcost_1 => 'NaN.00',
       # taxaccounts_1 => '2150',
                 sku_1 => 'Widget-0001',
  inventory_accno_id_1 => '10013',
     income_accno_id_1 => '10049',
    expense_accno_id_1 => '10057',
       runningnumber_1 => 1,
          partnumber_1 => 'Widget-0001',
         description_1 => 'Widget, single',
                 qty_1 => 5102,
           sellprice_1 => '0.098'



( run in 0.581 second using v1.01-cache-2.11-cpan-2b0bae70ee8 )