本文整理汇总了PHP中Vendor类的典型用法代码示例。如果您正苦于以下问题:PHP Vendor类的具体用法?PHP Vendor怎么用?PHP Vendor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Vendor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
$vendorId = null;
$contactName = "Trevor Rigler";
$vendorEmail = "trier@cnm.edu";
$vendorName = "TruFork";
$vendorPhoneNumber = "5053594687";
$vendor = new Vendor($vendorId, $contactName, $vendorEmail, $vendorName, $vendorPhoneNumber);
$vendor->insert($this->getPDO());
$productId = null;
$vendorId = $vendor->getVendorId();
$description = "A glorius bead to use";
$leadTime = 10;
$sku = "TGT354";
$title = "Bead-Green-Blue-Circular";
$this->product = new Product($productId, $vendorId, $description, $leadTime, $sku, $title);
$this->product->insert($this->getPDO());
$alertId = null;
$alertCode = "WM";
$alertFrequency = "D2";
$alertOperator = "L";
$alertPoint = 100.514;
$this->alertLevel = new AlertLevel($alertId, $alertCode, $alertFrequency, $alertPoint, $alertOperator);
$this->alertLevel->insert($this->getPDO());
}
示例2: setUp
public function setUp()
{
parent::setUp();
$vendorId = null;
$contactName = "Trevor Rigler";
$vendorEmail = "trier@cnm.edu";
$vendorName = "TruFork";
$vendorPhoneNumber = "5053594687";
$vendor = new Vendor($vendorId, $contactName, $vendorEmail, $vendorName, $vendorPhoneNumber);
$vendor->insert($this->getPDO());
$productId = null;
$vendorId = $vendor->getVendorId();
$description = "A glorius bead to use";
$leadTime = 10;
$sku = "TGT354";
$title = "Bead-Green-Blue-Circular";
$this->product = new Product($productId, $vendorId, $description, $leadTime, $sku, $title);
$this->product->insert($this->getPDO());
$locationId = null;
$description = "Back Stock";
$storageCode = 7;
$this->location = new Location($locationId, $storageCode, $description);
$this->location->insert($this->getPDO());
$unitId = null;
$unitCode = "pk";
$quantity = 10.5;
$this->unitOfMeasure = new UnitOfMeasure($unitId, $unitCode, $quantity);
$this->unitOfMeasure->insert($this->getPDO());
}
示例3: setUp
/**
* Set up to create vendor, product, unitOfMeasure objects
*
**/
public function setUp()
{
parent::setUp();
$this->guzzle = new \GuzzleHttp\Client(['cookies' => true]);
$vendorId = null;
$contactName = "Trevor Rigler";
$vendorEmail = "trier@cnm.edu";
$vendorName = "TruFork";
$vendorPhoneNumber = "5053594687";
$vendor = new Vendor($vendorId, $contactName, $vendorEmail, $vendorName, $vendorPhoneNumber);
$vendor->insert($this->getPDO());
$productId = null;
$vendorId = $vendor->getVendorId();
$description = "A glorius bead to use";
$leadTime = 10;
$sku = "TGT354";
$title = "Bead-Green-Blue-Circular";
$this->product = new Product($productId, $vendorId, $description, $leadTime, $sku, $title);
$this->product->insert($this->getPDO());
$unitId = null;
$quantity = 3.5;
$unitCode = "ea";
$this->unitOfMeasure = new UnitOfMeasure($unitId, $unitCode, $quantity);
$this->unitOfMeasure->insert($this->getPDO());
}
示例4: destroy
public static function destroy($id)
{
self::check_logged_in();
$vendor = new Vendor(array('id' => $id));
$vendor->destroy();
Redirect::to('/vendors', array('message' => 'The vendor has been removed successfully!'));
}
示例5: setUp
public function setUp()
{
parent::setUp();
$vendorId = null;
$name = "TruFork";
$contactName = "Trevor Rigler";
$email = "trier@cnm.edu";
$phoneNumber = "5053594687";
$vendor = new Vendor($vendorId, $name, $contactName, $email, $phoneNumber);
$vendor->insert($this->getPDO());
$productId = null;
$vendorId = $vendor->getVendorId();
$description = "A glorius bracelet for any occasion to use";
$leadTime = 15;
$sku = "457847";
$title = "Bracelet-Green-Blue";
$this->finishedProduct = new Product($productId, $vendorId, $description, $leadTime, $sku, $title);
$this->finishedProduct->insert($this->getPDO());
$productId = null;
$vendorId = $vendor->getVendorId();
$description = "A glorius bead to use";
$leadTime = 10;
$sku = "354";
$title = "Bead-Green-Blue-Circular";
$this->rawMaterial = new Product($productId, $vendorId, $description, $leadTime, $sku, $title);
$this->rawMaterial->insert($this->getPDO());
}
示例6: actionAdmin
public function actionAdmin()
{
$model = new Vendor('search');
$model->unsetAttributes();
if (isset($_GET['Vendor'])) {
$model->setAttributes($_GET['Vendor']);
}
$this->render('admin', array('model' => $model));
}
示例7: save
function save()
{
if ($this->valid()) {
$attendee = new Vendor($this->params);
return $attendee->create_with_id();
} else {
return false;
}
}
示例8: createVendor
public function createVendor()
{
if (isset($_POST['name']) && isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])) {
$vendor = new Vendor();
$vendor->name = $_POST['name'];
$vendor->username = $_POST['username'];
$vendor->email = $_POST['email'];
$vendor->password = Hash::make($_POST['password']);
$vendor->save();
return Redirect::to('/')->with('error', 'Vendor Created!');
} else {
return Redirect::to('/')->with('error', 'Missing Information');
}
}
示例9: save
function save()
{
$id = $this->input->post("id");
if ($id == 0) {
$vendorObject = new Vendor();
} else {
$vendorObject = new Vendor($id);
}
$vendorObject->name = $vendorObject->input->post("name", TRUE);
$vendorObject->address = $vendorObject->input->post("address", TRUE);
$vendorObject->number = $vendorObject->input->post("number", TRUE);
$vendorObject->email = $vendorObject->input->post("email", TRUE);
$vendorObject->save();
echo $vendorObject->id;
}
示例10: action_emails
public function action_emails()
{
$view = View::make('admin.emails');
$view->vendor_emails = Vendor::join('users', 'user_id', '=', 'users.id')->where_null('banned_at')->where('send_emails', '=', true)->lists('email');
$view->officer_emails = Officer::join('users', 'user_id', '=', 'users.id')->where_null('banned_at')->where('send_emails', '=', true)->lists('email');
$this->layout->content = $view;
}
示例11: importData
public function importData(Vendor $vendor)
{
$vendorConfig = $vendor->getConfig();
while (!$vendor->endReached()) {
$vendorItemData = $vendor->getNextLine();
if (isset($vendorItemData['item']) && $vendorItemData['item'] != "") {
$itemIds = $this->baseData->getItemIds($vendorItemData['item'], $vendor->getBaseDataColumn());
if (!empty($itemIds)) {
foreach ($itemIds as $itemId) {
$query = "INSERT INTO " . $this->config['master-table'] . " (" . "item_id," . $vendorConfig['master-file-item-column-name'] . "," . $vendorConfig['master-file-price-column-name'] . "," . $vendorConfig['master-file-qty-column-name'] . ") VALUES (" . "'" . $itemId . "'," . "'" . $vendorItemData['item'] . "'," . $vendorItemData['price'] . "," . $vendorItemData['qty'] . ") ON DUPLICATE KEY UPDATE " . $vendorConfig['master-file-item-column-name'] . "='" . $vendorItemData['item'] . "'," . $vendorConfig['master-file-price-column-name'] . "= IF (" . $vendorConfig['master-file-price-column-name'] . "<" . $vendorItemData['price'] . "," . $vendorItemData['price'] . "," . $vendorConfig['master-file-price-column-name'] . ")," . $vendorConfig['master-file-qty-column-name'] . "=" . $vendorConfig['master-file-qty-column-name'] . "+" . $vendorItemData['qty'];
db_query($query);
}
}
}
}
}
示例12: store
/**
* Store a newly created resource in storage.
* POST /balancesheets
*
* @return Response
*/
public function store()
{
$balancesheet = new balancesheet();
/* $balancesheet->name = Input::get('name');
$balancesheet->save();
$balancesheet->vendor_type = Input::get('vendortype');
$balancesheet->save();*/
$vendor = Vendor::find(Input::get('vendor'));
$balancesheet->vendor_id = $vendor->id;
$balancesheet->save();
$balancesheet->total_amount = Input::get('Tamount');
$balancesheet->save();
$balancesheet->payable_amount = Input::get('Pamount');
$balancesheet->save();
$balancesheet->receivable_amount = Input::get('Ramount');
$balancesheet->save();
// $balancesheet->vendor_id = Input::get('vendor');
// $balancesheet->save();
if (Input::get('note') == '') {
$balancesheet->note = 'N/A';
} else {
$balancesheet->note = Input::get('note');
}
$balancesheet->save();
$balancesheet->balancesheet_id = "B0" . $balancesheet->id;
$balancesheet->save();
return Redirect::route('balancesheet.index');
}
示例13: store
public function store()
{
try {
$createOrder = Input::json()->all();
$addOrder = new Order();
$addOrder->status = 1;
$addOrder->save();
$addOrderId = $addOrder->id;
$numberOfItems = 0;
foreach ($createOrder['items'] as $OrderItem) {
$newOrderItem = new Order_Item();
$newOrderItem->order_id = $addOrderId;
$newOrderItem->item_id = $OrderItem['item_id'];
$newOrderItem->order_qty = $OrderItem['order_qty'];
$newOrderItem->save();
$numberOfItems = $numberOfItems + 1;
}
$addOrder->items = $createOrder['items'];
$addOrder->open = 'yes';
$vendorId = $createOrder['vendor_id'];
$addOrder->vendor_id = $vendorId;
$vendorName = Vendor::find($vendorId);
$addOrder->vendor_name = $vendorName->name;
$addOrder->item_count = $numberOfItems;
$this->addOrderToEmail($addOrder);
return $addOrder->toJson();
} catch (Exception $e) {
return '{"error":{"text":' . $e->getMessage() . '}}';
}
}
示例14: index
/**
* Show a list of all of the application's users.
*
* @return Response
*/
public function index()
{
$vendor = DB::table('vendors')->get();
$lap_jenis = tipe_lap::lists('tipe', 'id');
$vendor_name = Vendor::lists('nama', 'id');
return view('admin.views', ['vendor' => $vendor], compact('lap_jenis', 'vendor_name'));
}
示例15: hookCustomerAccount
public function hookCustomerAccount($params)
{
require_once dirname(__FILE__) . "/../ordervendor/Vendor.php";
if (Vendor::currentVendor() != null) {
return $this->display(__FILE__, 'menuitems.tpl');
}
}