本文整理汇总了PHP中Vendor类的典型用法代码示例。如果您正苦于以下问题:PHP Vendor类的具体用法?PHP Vendor怎么用?PHP Vendor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Vendor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
$vendorId = null;
$contactName = "Trevor Rigler";
$vendorEmail = "[email protected]";
$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());
}
开发者ID:sandidgec,项目名称:foodinventory,代码行数:26,代码来源:product-alert-test.php
示例2: setUp
public function setUp()
{
parent::setUp();
$vendorId = null;
$contactName = "Trevor Rigler";
$vendorEmail = "[email protected]";
$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());
}
开发者ID:sandidgec,项目名称:foodinventory,代码行数:29,代码来源:product-location-test.php
示例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 = "[email protected]";
$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());
}
开发者ID:sandidgec,项目名称:foodinventory,代码行数:29,代码来源:location-api-test.php
示例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!'));
}
开发者ID:jackrl,项目名称:Tsoha-Bootstrap,代码行数:7,代码来源:vendors_controller.php
示例5: setUp
public function setUp()
{
parent::setUp();
$vendorId = null;
$name = "TruFork";
$contactName = "Trevor Rigler";
$email = "[email protected]";
$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());
}
开发者ID:sandidgec,项目名称:foodinventory,代码行数:27,代码来源:finished-product-test.php
示例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));
}
开发者ID:hanihh,项目名称:vvs_v2,代码行数:9,代码来源:VendorController.php
示例7: save
function save()
{
if ($this->valid()) {
$attendee = new Vendor($this->params);
return $attendee->create_with_id();
} else {
return false;
}
}
开发者ID:epochwolf,项目名称:kairos,代码行数:9,代码来源:csvimport_vendor_form.php
示例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');
}
}
开发者ID:GeorgeBroadley,项目名称:caffeine-vendor,代码行数:14,代码来源:AuthController.php
示例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;
}
开发者ID:narendranag,项目名称:Profectus,代码行数:15,代码来源:vendors.php
示例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;
}
开发者ID:ajb,项目名称:rfpez,代码行数:7,代码来源:admin.php
示例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);
}
}
}
}
}
开发者ID:diedsmiling,项目名称:busenika,代码行数:16,代码来源:DBMasterData.php
示例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');
}
开发者ID:saqibtalib,项目名称:EMR-ex-,代码行数:34,代码来源:BalancesheetsController.php
示例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() . '}}';
}
}
开发者ID:p-tricky,项目名称:CAEWeb,代码行数:30,代码来源:OrderApiController.php
示例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'));
}
开发者ID:ajisantoso,项目名称:Project,代码行数:12,代码来源:vendorController.php
示例15: hookCustomerAccount
public function hookCustomerAccount($params)
{
require_once dirname(__FILE__) . "/../ordervendor/Vendor.php";
if (Vendor::currentVendor() != null) {
return $this->display(__FILE__, 'menuitems.tpl');
}
}
开发者ID:redb,项目名称:prestashop,代码行数:7,代码来源:serialnrmanager.php
示例16: delete
public function delete()
{
$ids = explode(',', Input::get('javascriptArrayString'));
Vendor::destroy($ids);
$data['status'] = 'success';
$data['message'] = count($ids) . ' Row(s) was deleted successfully';
return Response::json($data);
}
开发者ID:sliekasirdis79,项目名称:POS,代码行数:8,代码来源:AdminVendorController.php
示例17: forMode
public function forMode($mode_id)
{
$mode = Mode::FromId($mode_id);
$vendor = Vendor::FromId($mode->vendor_id());
$url = $vendor->csetURL();
if (strpos($url, "hg.mozilla.org") !== false) {
return new HGWeb($url);
}
throw new Exception("Not implemented version control system.");
}
开发者ID:stoklund,项目名称:arewefastyet,代码行数:10,代码来源:VersionControl.php
示例18: action_index
public function action_index()
{
$view = View::make('vendors.index');
$page = intval(Input::get('page') ?: 1);
$view->vendors = Vendor::join('users', 'user_id', '=', 'users.id')->where_null('users.banned_at')->raw_where("EXISTS (SELECT service_id from service_vendor WHERE `vendor_id` = `vendors`.`id`)")->where(function ($q) {
$q->where(DB::raw("RIGHT(image_url, 4)"), '=', 'jpeg');
$q->or_where_in(DB::raw("RIGHT(image_url, 3)"), array('jpg', 'gif', 'png'));
})->select(array('*', 'vendors.id as vendor_id'))->skip(($page - 1) * 10)->take(10)->order_by('vendors.created_at', 'desc')->get();
$this->layout->content = $view;
}
开发者ID:ajb,项目名称:rfpez,代码行数:10,代码来源:vendors.php
示例19: update
public function update($id)
{
$vendor = Vendor::find($id);
$data = Input::all();
$vendor->update($data);
if (!$vendor) {
return Redirect::to('admin.vendor.show')->with('message', 'gagal update vendor (ngga tau kenapa, panggil tegar)');
}
return Redirect::back()->with('message', 'berhasil update vendor (mungkin)');
}
开发者ID:shittyc0de,项目名称:AplikasiLC,代码行数:10,代码来源:VendorsController.php
示例20: setUp
public function setUp()
{
parent::setUp();
$vendorId = null;
$contactName = "Trevor Rigler";
$vendorEmail = "[email protected]";
$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());
}
开发者ID:sandidgec,项目名称:foodinventory,代码行数:19,代码来源:alert-level-test.php
注:本文中的Vendor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论