You are on page 1of 9

Deze pagina bekijken in het: Nederlands Vertalen Uitzetten voor: Engels Opties ▼

进入哔哩哔哩,观看更高清

<?php
/**********************************************************************
Description: Item Inquiry extension, a simple demo program for
illustrate the procedure of creating an extension in FA
***********************************************************************/

$page_security = 'SA_OPEN';

$path_to_root = "../..";
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/ui.inc");

page(_("Item Inquiry"));
<?php
class hooks_items_inquiry extends hooks {
var $module_name = 'Items Inquiry';

/*
Install additonal menu options provided by module
*/
function install_options($app) {
global $path_to_root;

switch($app->id) {
case 'stock':
$app->add_rapp_function(1, _('Items Inquiry'),
define ('SS_ITEMINQ', 110<<8 );
function install_options($app) {
..
..
$app->add_rapp_function(1, _('Item Inquiry'),
$path_to_root.'/modules/item_inquiry/item_inquiry.php', 'SA_ITEMINQ');
..
function install_access()
{
$security_sections[SS_ITEMINQ] = _("Item Inquiry");
$security_areas['SA_ITEMINQ'] = array(SS_ITEMINQ|111, _("Item Inquiry"));
return array($security_areas, $security_sections);
}

$page_security = 'SA_ITEMINQ';
.
.
include_once($path_to_root . "/includes/session.inc");
add_access_extensions()
DROP TABLE IF EXISTS `0_item_inquiry`;
CREATE TABLE IF NOT EXISTS `0_item_inquiry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`inquiry_date` TIMESTAMP NOT NULL DEFAULT current_timestamp(),
`stock_id` varchar(20) NOT NULL DEFAULT '',
`description` varchar(200) NOT NULL DEFAULT '',
`qoh` double NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `inquiry_date` (`inquiry_date`,`id`)
) ENGINE=InnoDB;

DROP TABLE IF EXISTS `0_item_inquiry`;

function activate_extension($company, $check_only=true) {


global $db_connections;
$updates = array( 'update.sql' => array('inquiry'));
return $this->update_databases($company, $updates, $check_only);
}

function deactivate_extension($company, $check_only=true) {


global $db_connections;
$updates = array('remote.sql' => array('inquiry'));
return $this->update_databases($company, $updates, $check_only);
}
function add_item_inquiry($stock_id,$description,$qoh)
{
$sql = "insert into ". TB_PREF."item_inquiry
(stock_id,description,qoh) values
(". db_escape($stock_id). "," .
db_escape($description). "," .
db_escape($qoh). ")";

if (db_query($sql,"inquiry item could not be added"))


display_notification(_('Inquired item has been added'));
}

<?php
include_once($path_to_root . "/modules/item_inquiry/includes/item_inquiry_db.inc");
if (isset($_POST['add_query']))
add_item_inquiry($_POST['stock_id'],$_SESSION['desc'],$_SESSION['qoh']);

$_SESSION['desc'] = $row['description'];
$_SESSION['qoh'] = $qoh;

submit_center('add_query', _("Save Inquired Item"), true);


<?php
global $reports;
$reports->addReport(RC_INVENTORY, "1001", _('Inquired Items Report'),
array( _('Start Date') => 'DATEBEGINM',
_('End Date') => 'DATEENDM',
_('Orientation') => 'ORIENTATION',
_('Destination') => 'DESTINATION'));
?>
<?php

$page_security = 'SA_ITEMINQ';
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
add_access_extensions();

include_once($path_to_root . "/includes/date_functions.inc");
//---------------------------------------------------------------------------------
-------------------
print_inquired_items();

function getTransactions( $from, $to)

<?php
header("Location: ../index.php");
Selecteer een taal
Mogelijk gemaakt door Translate

You might also like