<?php
/**
 * The config file of batch module of ZDOO.
 *
 * @copyright   Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     商业软件，非开源软件
 * @author      Gang Liu <liugang@cnezsoft.com>
 * @package     batch 
 * @version     $Id$
 * @link        http://www.zdoo.com
 */
$config->batch->printItems = 8;

$config->batch->require = new stdclass();
$config->batch->require->deliver = 'pickedBy,pickedDate,expressedBy,expressedDate';
$config->batch->require->receive = 'expressedBy,expressedDate';

$config->batch->editor = new stdclass();
$config->batch->editor->deliver = array('id' => 'comment', 'tools' => 'simple');
$config->batch->editor->editdeliver = array('id' => 'comment', 'tools' => 'simple');

$config->batch->action = new stdclass();
$config->batch->action->receive = array(); 
$config->batch->action->receive['expressedBy']   = 'receivedBy';
$config->batch->action->receive['expressedDate'] = 'receivedDate'; 

$config->batch->action->update = array();
$config->batch->action->update['editPick']    = 'editedPick';
$config->batch->action->update['editDeliver'] = 'editedDeliver';
$config->batch->action->update['editReceive'] = 'editedReceive';

$config->batch->action->recordProductsChange = array();
$config->batch->action->recordProductsChange['editPick']    = 'editproductinpick';
$config->batch->action->recordProductsChange['editReceive'] = 'editproductinrecive';

global $lang, $app;
$app->loadLang('product');

$config->batch->search['module'] = 'batch';

$config->batch->search['fields']['batchNo']       = $lang->batch->batchNo;
$config->batch->search['fields']['type']          = $lang->batch->type;
$config->batch->search['fields']['trader']        = $lang->batch->trader;
$config->batch->search['fields']['order']         = $lang->batch->order;
$config->batch->search['fields']['money']         = $lang->batch->money;
$config->batch->search['fields']['express']       = $lang->batch->express;
$config->batch->search['fields']['waybill']       = $lang->batch->waybill;
$config->batch->search['fields']['pickedBy']      = $lang->batch->pickedBy;
$config->batch->search['fields']['pickedDate']    = $lang->batch->pickedDate;
$config->batch->search['fields']['expressedBy']   = $lang->batch->expressedBy;
$config->batch->search['fields']['expressedDate'] = $lang->batch->expressedDate;
$config->batch->search['fields']['createdBy']     = $lang->batch->createdBy;
$config->batch->search['fields']['createdDate']   = $lang->batch->createdDate;
$config->batch->search['fields']['assignedTo']    = $lang->batch->assignedTo;
$config->batch->search['fields']['assignedBy']    = $lang->batch->assignedBy;
$config->batch->search['fields']['assignedDate']  = $lang->batch->assignedDate;
$config->batch->search['fields']['status']        = $lang->batch->status;
$config->batch->search['fields']['id']            = $lang->batch->id;

$config->batch->search['params']['batchNo']       = array('operator' => 'include', 'control' => 'input',  'values' => '');
$config->batch->search['params']['type']          = array('operator' => '=',       'control' => 'select', 'values' => $lang->batch->typeList);
$config->batch->search['params']['trader']        = array('operator' => '=',       'control' => 'select', 'values' => 'set in control');
$config->batch->search['params']['order']         = array('operator' => '=',       'control' => 'select', 'values' => 'set in control');
$config->batch->search['params']['money']         = array('operator' => '=',       'control' => 'input',  'values' => '');
$config->batch->search['params']['express']       = array('operator' => '=',       'control' => 'select', 'values' => array('' => '') + $lang->product->expresses);
$config->batch->search['params']['waybill']       = array('operator' => 'include', 'control' => 'input',  'values' => '');
$config->batch->search['params']['pickedBy']      = array('operator' => '=',       'control' => 'select', 'values' => 'users');
$config->batch->search['params']['pickedDate']    = array('operator' => '>=',      'control' => 'input',  'values' => '', 'class' => 'date'); 
$config->batch->search['params']['expressedBy']   = array('operator' => '=',       'control' => 'select', 'values' => 'users');
$config->batch->search['params']['expressedDate'] = array('operator' => '>=',      'control' => 'input',  'values' => '', 'class' => 'date'); 
$config->batch->search['params']['createdBy']     = array('operator' => '=',       'control' => 'select', 'values' => 'users');
$config->batch->search['params']['createdDate']   = array('operator' => '>=',      'control' => 'input',  'values' => '', 'class' => 'date'); 
$config->batch->search['params']['assignedTo']    = array('operator' => '=',       'control' => 'select', 'values' => 'users');
$config->batch->search['params']['assignedBy']    = array('operator' => '=',       'control' => 'select', 'values' => 'users');
$config->batch->search['params']['assignedDate']  = array('operator' => '>=',      'control' => 'input',  'values' => '', 'class' => 'date'); 
$config->batch->search['params']['status']        = array('operator' => '=',       'control' => 'select', 'values' => $lang->batch->statusList);
$config->batch->search['params']['id']            = array('operator' => '=',       'control' => 'input',  'values' => '');
