FacturaScripts

EditFacturaProveedor extends PurchaseDocumentController

Controller to edit a single item from the FacturaProveedor model

Table of Contents

$documentTools BusinessDocumentFormTools
$hasData Indicates if the main view has data or is empty. bool
$tabsPosition Tabs position in page: left, bottom. string
$active Indicates the active view. string
$codeModel Model to use with select and autocomplete filters. CodeModel
$current Indicates current view, when drawing. string
$exportManager Object to export data. ExportManager
$views List of views displayed by the controller. \FacturaScripts\Core\Lib\ExtendedController\BaseView[]|\FacturaScripts\Core\Lib\ExtendedController\ListView[]
$className Name of the class of the controller (although its in inheritance from this class, the name of the final class we will have here) string
$dataBase It provides direct access to the database. DataBase
$empresa Selected company. Empresa
$multiRequestProtection MultiRequestProtection
$permissions User permissions on this controller. ControllerPermissions
$request Request on which we can get data. Request
$response HTTP Response object. Response
$template Name of the file for the template. string|bool
$title Title of the page. string
$uri Given uri, default is empty. string
$user User logged in. User|bool
getModelClassName() Return the document class name. string
getPageData() Returns basic page attributes array
createAccountsView() mixed
createReceiptsView() mixed
createViews() Load views mixed
execPreviousAction() bool
generateAccountingAction() bool
generateReceiptsAction() bool
loadData() Load data view procedure mixed
newRefundAction() bool
paidAction() bool
getCustomFields() Returns an array of custom fields to add on the header. mixed
getNewSubjectUrl() Returns an url to create a new subject. mixed
getPageData() Return the basic data for this page. array
getLineXMLView() Returns the name of the XMLView file for lines. mixed
setSubject() Sets subject for this document. mixed
getModelClassName() Returns the document class name. mixed
__construct() Initialize all objects and properties. mixed
createViews() Inserts the views or tabs to display. mixed
execPreviousAction() Run the actions that alter data before reading it. bool
getBusinessFormData() array
loadData() Loads the data to display. mixed
recalculateDocumentAction() Recalculate the document total based on lines. bool
saveDocumentAction() Saves the document. bool
saveDocumentError() string
saveDocumentResult() string
saveLines() Save the lines of the document. bool
subjectChangedAction() bool
updateLine() Updates oldLine with newLine data. bool
addHtmlView() Adds a HTML type view to the controller. mixed
addFileAction() bool
createViewDocFiles() mixed
deleteFileAction() bool
editFileAction() bool
loadDataDocFiles() mixed
unlinkFileAction() bool
validateFileActionToken() bool
createViewLogAudit() mixed
loadDataLogAudit() mixed
getImageUrl() string
privateCore() Runs the controller's private logic. mixed
setTabsPosition() Sets the tabs position, by default is setted to 'left', also supported 'bottom' and 'top'. mixed
addEditListView() Adds a EditList type view to the controller. mixed
addEditView() Adds a Edit type view to the controller. mixed
addGridView() Adds a Grid type view to the controller. mixed
addListView() Adds a List type view to the controller. mixed
editAction() Runs the data edit action. bool
execAfterAction() Run the controller after actions. mixed
insertAction() Runs data insert action. bool
searchGridView() Returns the key of the first GridView. string
addButton() Adds a new button to the tab. mixed
addCustomView() mixed
getCurrentView() BaseView|ListView
getMainViewName() Returns the name assigned to the main view string
getSettings() Returns the configuration value for the indicated view. mixed
getViewModelValue() Return the value for a field in the model of the view. mixed
setCurrentView() mixed
setSettings() Set value for setting of a view mixed
autocompleteAction() Run the autocomplete action. array
checkOwnerData() Check if the active user has permission to view the information of the active record in the informed model. bool
deleteAction() Action to delete data. bool
exportAction() mixed
getAutocompleteValues() Return values from Widget Values for autocomplete action array
getOwnerFilter() Returns the where filter to apply to obtain the data created by the active user. \FacturaScripts\Core\Base\DataBase\DataBaseWhere[]
requestGet() Return array with parameters values array
validateFormToken() bool
addExtension() mixed
getTemplate() Return the template to use for this controller. string|bool
pipe() mixed
publicCore() Execute the public part of the controller. mixed
redirect() Redirect to an url or controller. mixed
setTemplate() Set the template to use for this controller. bool
toolBox() ToolBox
url() Return the URL of the actual controller. string
checkPHPversion() mixed
getClassName() Return the name of the controller. string

Properties

$hasData

Indicates if the main view has data or is empty.

public bool $hasData = false

$tabsPosition

Tabs position in page: left, bottom.

public string $tabsPosition

$current

Indicates current view, when drawing.

private string $current

$views

List of views displayed by the controller.

public \FacturaScripts\Core\Lib\ExtendedController\BaseView[]|\FacturaScripts\Core\Lib\ExtendedController\ListView[] $views = []

$className

Name of the class of the controller (although its in inheritance from this class, the name of the final class we will have here)

private string $className

$request

Request on which we can get data.

public Request $request

$response

HTTP Response object.

protected Response $response

$template

Name of the file for the template.

private string|bool $template

$uri

Given uri, default is empty.

public string $uri

Methods

getModelClassName()

Return the document class name.

public getModelClassName( ) : string
Return values
string

getPageData()

Returns basic page attributes

public getPageData( ) : array
Return values
array

createAccountsView()

protected createAccountsView( [ $viewName : string = 'ListAsiento' ] ) : mixed
Parameters
$viewName : string = 'ListAsiento'
Return values
mixed

createReceiptsView()

protected createReceiptsView( [ $viewName : string = 'ListReciboProveedor' ] ) : mixed
Parameters
$viewName : string = 'ListReciboProveedor'
Return values
mixed

execPreviousAction()

protected execPreviousAction( $action : string ) : bool
Parameters
$action : string
Return values
bool

generateAccountingAction()

protected generateAccountingAction( ) : bool
Return values
bool

loadData()

Load data view procedure

protected loadData( $viewName : string , $view : BaseView ) : mixed
Parameters
$viewName : string
$view : BaseView
Return values
mixed

getCustomFields()

Returns an array of custom fields to add on the header.

public abstract getCustomFields( ) : mixed
Return values
mixed

getNewSubjectUrl()

Returns an url to create a new subject.

public abstract getNewSubjectUrl( ) : mixed
Return values
mixed

getPageData()

Return the basic data for this page.

public getPageData( ) : array
Return values
array

getLineXMLView()

Returns the name of the XMLView file for lines.

protected abstract getLineXMLView( ) : mixed
Return values
mixed

setSubject()

Sets subject for this document.

protected abstract setSubject( &$view : mixed , $formData : mixed ) : mixed
Parameters
$view : mixed
$formData : mixed
Return values
mixed

getModelClassName()

Returns the document class name.

public abstract getModelClassName( ) : mixed
Return values
mixed

__construct()

Initialize all objects and properties.

public __construct( $className : string [, $uri : string = '' ] ) : mixed
Parameters
$className : string
$uri : string = ''
Return values
mixed

createViews()

Inserts the views or tabs to display.

protected abstract createViews( ) : mixed
Return values
mixed

execPreviousAction()

Run the actions that alter data before reading it.

protected execPreviousAction( $action : string ) : bool
Parameters
$action : string
Return values
bool

loadData()

Loads the data to display.

protected abstract loadData( $viewName : string , $view : BaseView ) : mixed
Parameters
$viewName : string
$view : BaseView
Return values
mixed

recalculateDocumentAction()

Recalculate the document total based on lines.

protected recalculateDocumentAction( ) : bool
Return values
bool

saveDocumentError()

protected saveDocumentError( $message : string ) : string
Parameters
$message : string
Return values
string

addHtmlView()

Adds a HTML type view to the controller.

protected addHtmlView( $viewName : string , $fileName : string , $modelName : string , $viewTitle : string [, $viewIcon : string = 'fab fa-html5' ] ) : mixed
Parameters
$viewName : string
$fileName : string
$modelName : string
$viewTitle : string
$viewIcon : string = 'fab fa-html5'
Return values
mixed

addFileAction()

private addFileAction( ) : bool
Return values
bool

createViewDocFiles()

protected createViewDocFiles( [ $viewName : string = 'docfiles' ] [, $template : string = 'Tab/DocFiles' ] ) : mixed
Parameters
$viewName : string = 'docfiles'
$template : string = 'Tab/DocFiles'
Return values
mixed

deleteFileAction()

private deleteFileAction( ) : bool
Return values
bool

editFileAction()

private editFileAction( ) : bool
Return values
bool

loadDataDocFiles()

private loadDataDocFiles( $view : BaseView , $model : string , $modelid : string ) : mixed
Parameters
$view : BaseView
$model : string
$modelid : string
Return values
mixed

unlinkFileAction()

private unlinkFileAction( ) : bool
Return values
bool

validateFileActionToken()

private validateFileActionToken( ) : bool
Return values
bool

createViewLogAudit()

public createViewLogAudit( [ $viewName : string = 'ListLogMessage' ] ) : mixed
Parameters
$viewName : string = 'ListLogMessage'
Return values
mixed

loadDataLogAudit()

public loadDataLogAudit( $view : mixed , $model : mixed , $modelid : mixed ) : mixed
Parameters
$view : mixed
$model : mixed
$modelid : mixed
Return values
mixed

setTabsPosition()

Sets the tabs position, by default is setted to 'left', also supported 'bottom' and 'top'.

public setTabsPosition( $position : string ) : mixed
Parameters
$position : string
Return values
mixed

addEditListView()

Adds a EditList type view to the controller.

protected addEditListView( $viewName : string , $modelName : string , $viewTitle : string [, $viewIcon : string = 'fas fa-bars' ] ) : mixed
Parameters
$viewName : string
$modelName : string
$viewTitle : string
$viewIcon : string = 'fas fa-bars'
Return values
mixed

addEditView()

Adds a Edit type view to the controller.

protected addEditView( $viewName : string , $modelName : string , $viewTitle : string [, $viewIcon : string = 'fas fa-edit' ] ) : mixed
Parameters
$viewName : string
$modelName : string
$viewTitle : string
$viewIcon : string = 'fas fa-edit'
Return values
mixed

addGridView()

Adds a Grid type view to the controller.

protected addGridView( $master : array , $detail : array , $viewTitle : string [, $viewIcon : string = 'fas fa-list-alt' ] ) : mixed

Master/Detail params: ['name' = 'viewName', 'model' => 'modelName']

Parameters
$master : array
$detail : array
$viewTitle : string
$viewIcon : string = 'fas fa-list-alt'
Tags
deprecated

will be removed in the next year

Return values
mixed

addListView()

Adds a List type view to the controller.

protected addListView( $viewName : string , $modelName : string , $viewTitle : string [, $viewIcon : string = 'fas fa-list' ] ) : mixed
Parameters
$viewName : string
$modelName : string
$viewTitle : string
$viewIcon : string = 'fas fa-list'
Return values
mixed

editAction()

Runs the data edit action.

protected editAction( ) : bool
Return values
bool

execAfterAction()

Run the controller after actions.

protected execAfterAction( $action : string ) : mixed
Parameters
$action : string
Return values
mixed

insertAction()

Runs data insert action.

protected insertAction( ) : bool
Return values
bool

searchGridView()

Returns the key of the first GridView.

private searchGridView( ) : string
Return values
string

addButton()

Adds a new button to the tab.

public addButton( $viewName : string , $btnArray : array ) : mixed
Parameters
$viewName : string
$btnArray : array
Return values
mixed

getMainViewName()

Returns the name assigned to the main view

public getMainViewName( ) : string
Return values
string

getSettings()

Returns the configuration value for the indicated view.

public getSettings( $viewName : string , $property : string ) : mixed
Parameters
$viewName : string
$property : string
Return values
mixed

getViewModelValue()

Return the value for a field in the model of the view.

public getViewModelValue( $viewName : string , $fieldName : string ) : mixed
Parameters
$viewName : string
$fieldName : string
Return values
mixed

setCurrentView()

public setCurrentView( $viewName : string ) : mixed
Parameters
$viewName : string
Return values
mixed

setSettings()

Set value for setting of a view

public setSettings( $viewName : string , $property : string , $value : mixed ) : mixed
Parameters
$viewName : string
$property : string
$value : mixed
Return values
mixed

autocompleteAction()

Run the autocomplete action.

protected autocompleteAction( ) : array

Returns a JSON string for the searched values.

Return values
array

checkOwnerData()

Check if the active user has permission to view the information of the active record in the informed model.

protected checkOwnerData( $model : object ) : bool
Parameters
$model : object
Return values
bool

deleteAction()

Action to delete data.

protected deleteAction( ) : bool
Return values
bool

exportAction()

protected exportAction( ) : mixed
Return values
mixed

getAutocompleteValues()

Return values from Widget Values for autocomplete action

protected getAutocompleteValues( $viewName : string , $fieldName : string ) : array
Parameters
$viewName : string
$fieldName : string
Return values
array

getOwnerFilter()

Returns the where filter to apply to obtain the data created by the active user.

protected getOwnerFilter( $model : object ) : \FacturaScripts\Core\Base\DataBase\DataBaseWhere[]
Parameters
$model : object
Return values
\FacturaScripts\Core\Base\DataBase\DataBaseWhere[]

requestGet()

Return array with parameters values

protected requestGet( $keys : array ) : array
Parameters
$keys : array
Return values
array

validateFormToken()

protected validateFormToken( ) : bool
Return values
bool

addExtension()

public static addExtension( $extension : mixed ) : mixed
Parameters
$extension : mixed
Return values
mixed

getTemplate()

Return the template to use for this controller.

public getTemplate( ) : string|bool
Return values
string|bool

pipe()

public pipe( $name : string , ...$arguments : array ) : mixed
Parameters
$name : string
$arguments : array
Return values
mixed

publicCore()

Execute the public part of the controller.

public publicCore( &$response : Response ) : mixed
Parameters
$response : Response
Return values
mixed

redirect()

Redirect to an url or controller.

public redirect( $url : string , $delay : int ) : mixed
Parameters
$url : string
$delay : int
Return values
mixed

setTemplate()

Set the template to use for this controller.

public setTemplate( $template : string|bool ) : bool
Parameters
$template : string|bool
Return values
bool

url()

Return the URL of the actual controller.

public url( ) : string
Return values
string

checkPHPversion()

private checkPHPversion( $min : float ) : mixed
Parameters
$min : float
Return values
mixed

getClassName()

Return the name of the controller.

protected getClassName( ) : string
Return values
string

Search results