| Server IP : 138.197.176.125 / Your IP : 216.73.217.122 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/crest/ |
Upload File : |
<?php
// Turn on debugging level
$Vtiger_Utils_Log = true;
// Include necessary classes
include_once('vtlib/Vtiger/Module.php');
// Define instances
$leads = Vtiger_Module::getInstance('Payments');
// Nouvelle instance pour le nouveau bloc
$block = Vtiger_Block::getInstance('LBL_PAYMENTS_DETAILS', $leads);
// Add field
$fieldInstance = new Vtiger_Field();
$fieldInstance->name = 'payment_mode';
$fieldInstance->table = 'vtiger_payments';
$fieldInstance->column = 'payment_mode';
$fieldInstance->label = 'Mode';
$fieldInstance->columntype = 'VARCHAR(255)';
$fieldInstance->uitype = 15;
$fieldInstance->typeofdata = 'V~O';
$fieldInstance->sequence = 21;
$block->addField($fieldInstance);
$fieldInstance->setPicklistValues( Array ('Cash', 'Credit Card', 'Cheque', 'Other') );
?>