<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Customer
 *
 * @author abrah_000
 */
class InventoryDev extends ActiveRecord\Model {

    static $connection = 'pesaje';
    static $table_name = 'inventory_returns';
    static $primary_key = 'dev_num';

static function NewInsert($data){
		$sql ="
INSERT INTO [dbo].[inventory_returns]
           ([motive]
           ,[dev_num]
           ,[co_cli]
           ,[current_state]
           ,[created_by]
           ,[created_at]
           ,[updated_by]
           ,[updated_at])
     VALUES
           (''
           ,?
           ,''
           ,0
           ,?
           ,GETDATE()
           ,?
           ,GETDATE())
"; 
			$pdo = self::connection()->connection;
			$Exe = $pdo->prepare($sql);
			return $Exe->execute(array($data['dev_num'],$data['created_by'],$data['updated_by']));
		   
	}


}
