ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilInvoiceNumberPlaceholdersPropertyGUI Class Reference
+ Inheritance diagram for ilInvoiceNumberPlaceholdersPropertyGUI:
+ Collaboration diagram for ilInvoiceNumberPlaceholdersPropertyGUI:

Public Member Functions

 __construct ()
 insert ($a_tpl)
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor.
executeCommand ()
 Execute command.
 getType ()
 Get Type.
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setPostVar ($a_postvar)
 Set Post Variable.
 getPostVar ()
 Get Post Variable.
 getFieldId ()
 Get Post Variable.
 setInfo ($a_info)
 Set Information Text.
 getInfo ()
 Get Information Text.
 setAlert ($a_alert)
 Set Alert Text.
 getAlert ()
 Get Alert Text.
 setRequired ($a_required)
 Set Required.
 getRequired ()
 Get Required.
 setDisabled ($a_disabled)
 Set Disabled.
 getDisabled ()
 Get Disabled.
 checkInput ()
 Check input, strip slashes etc.
 setParentForm ($a_parentform)
 Set Parent Form.
 getParentForm ()
 Get Parent Form.
 setParent ($a_val)
 Set Parent GUI object.
 getParent ()
 Get Parent GUI object.
 getSubForm ()
 Get sub form html.
 hideSubForm ()
 Sub form hidden on init?
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders)
 getHiddenTitle ()
 Get hidden title.
 getItemByPostVar ($a_post_var)
 Get item by post var.
 serializeData ()
 serialize data
 unserializeData ($a_data)
 unserialize data
 writeToSession ()
 Write to session.
 clearFromSession ()
 Clear session value.
 readFromSession ()
 Read from session.
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties)
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi.
 getMulti ()
 Get Multi.
 setMultiValues (array $a_values)
 Set multi values.
 getMultiValues ()
 Get multi values.
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g.

Static Public Member Functions

static _generateInvoiceNumber ($a_user_id=0)

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type.
 getMultiIconsHTML ()
 Get HTML for multiple value icons.
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 $title
 $postvar
 $info
 $alert
 $required = false
 $parentgui
 $parentform
 $hidden_title = ""
 $multi = false
 $multi_sortable = false
 $multi_addremove = true
 $multi_values

Detailed Description

Author
Nadia Ahmad nahma.nosp@m.d@da.nosp@m.tabay.nosp@m..de
Version
$Id:$

Definition at line 14 of file class.ilInvoiceNumberPlaceholdersPropertyGUI.php.

Constructor & Destructor Documentation

ilInvoiceNumberPlaceholdersPropertyGUI::__construct ( )

Member Function Documentation

static ilInvoiceNumberPlaceholdersPropertyGUI::_generateInvoiceNumber (   $a_user_id = 0)
static

Definition at line 49 of file class.ilInvoiceNumberPlaceholdersPropertyGUI.php.

References $ilSetting, $ilUser, and ilUserDefinedInvoiceNumber\_nextIncCurrentValue().

Referenced by ilPurchaseBaseGUI\__addBookings(), and ilObjPaymentSettingsGUI\saveCustomerObject().

{
global $ilSetting;
if($a_user_id == 0)
{
global $ilUser;
$a_user_id = $ilUser->getId();
}
$inst_id = $ilSetting->get('inst_id');
$cur_time = time();
include_once './Services/Payment/classes/class.ilUserDefinedInvoiceNumber.php';
$invObj = new ilUserDefinedInvoiceNumber();
if($invObj->getUDInvoiceNumberActive() == 1)
{
$invoice_number = $invObj->getInvoiceNumberText();
$invoice_number = str_replace('[CURRENT_TIMESTAMP]', $cur_time, $invoice_number);
$invoice_number = str_replace('[INSTALLATION_ID]', $inst_id, $invoice_number);
$invoice_number = str_replace('[USER_ID]', $a_user_id, $invoice_number);
$invoice_number = str_replace('[DAY]', date('d', $cur_time), $invoice_number);
$invoice_number = str_replace('[MONTH]', date('m', $cur_time), $invoice_number);
$invoice_number = str_replace('[YEAR]', date('Y', $cur_time), $invoice_number);
$invoice_number = str_replace('[INCREMENTAL_NUMBER]', $next_number, $invoice_number);
}
else
{
$inst_id_time = $inst_id.'_'.$a_user_id.'_'.substr((string) $cur_time,-3);
$invoice_number = $inst_id_time.substr(md5(uniqid(rand(), true)), 0, 4);
}
return $invoice_number;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilInvoiceNumberPlaceholdersPropertyGUI::insert (   $a_tpl)

Definition at line 22 of file class.ilInvoiceNumberPlaceholdersPropertyGUI.php.

References $lng.

{
global $lng;
$subtpl = new ilTemplate("tpl.invoice_number_placeholders.html", false, false, "Services/Payment");
$subtpl->setVariable('TXT_USE_PLACEHOLDERS', $lng->txt('placeholders'));
$subtpl->setVariable('TXT_PLACEHOLDERS_ADVICE', $lng->txt('inv_number_placeholder_advice'));
$subtpl->setVariable('TXT_CURRENT_TIMESTAMP', $lng->txt('current_timestamp'));
$subtpl->setVariable('TXT_INSTALLATION_ID', $lng->txt('inst_id'));
$subtpl->setVariable('TXT_USER_ID', $lng->txt('user_id'));
$subtpl->setVariable('TXT_DAY', $lng->txt('day'));
$subtpl->setVariable('TXT_MONTH', $lng->txt('month'));
$subtpl->setVariable('TXT_YEAR', $lng->txt('year'));
$subtpl->setVariable('TXT_INCREMENTAL_NUMBER', $lng->txt('incremental_number'));
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $subtpl->get());
$a_tpl->parseCurrentBlock();
}

The documentation for this class was generated from the following file: