Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
0315b53f1f
@ -992,19 +992,25 @@ class Contact extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set property ->gender from property ->civility_id
|
* Set the property "gender" of this class, based on the property "civility_id"
|
||||||
|
* or use property "civility_code" as fallback, when "civility_id" is not available.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setGenderFromCivility()
|
public function setGenderFromCivility()
|
||||||
{
|
{
|
||||||
unset($this->gender);
|
unset($this->gender);
|
||||||
if (in_array($this->civility_id, array('MR'))) {
|
|
||||||
$this->gender = 'man';
|
if (in_array($this->civility_id, array('MR')) || in_array($this->civility_code, array('MR')))
|
||||||
} elseif (in_array($this->civility_id, array('MME', 'MLE'))) {
|
{
|
||||||
$this->gender = 'woman';
|
$this->gender = 'man';
|
||||||
}
|
}
|
||||||
|
elseif(in_array($this->civility_id, array('MME','MLE')) || in_array($this->civility_code, array('MME','MLE')))
|
||||||
|
{
|
||||||
|
$this->gender = 'woman';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
|
|||||||
@ -30,7 +30,8 @@
|
|||||||
* <dol_use_font_a> Use font A of printer
|
* <dol_use_font_a> Use font A of printer
|
||||||
* <dol_use_font_b> Use font B of printer
|
* <dol_use_font_b> Use font B of printer
|
||||||
* <dol_use_font_c> Use font C of printer
|
* <dol_use_font_c> Use font C of printer
|
||||||
* <dol_bold> </dol_bold> Text Bold
|
* <dol_bold> Text Bold
|
||||||
|
* <dol_bold_disabled> Disable Text Bold
|
||||||
* <dol_double_height> </dol_double_height> Text double height
|
* <dol_double_height> </dol_double_height> Text double height
|
||||||
* <dol_double_width> </dol_double_width> Text double width
|
* <dol_double_width> </dol_double_width> Text double width
|
||||||
* <dol_underline> </dol_underline> Underline text
|
* <dol_underline> </dol_underline> Underline text
|
||||||
@ -162,7 +163,7 @@ class dolReceiptPrinter extends Printer
|
|||||||
'dol_use_font_b',
|
'dol_use_font_b',
|
||||||
'dol_use_font_c',
|
'dol_use_font_c',
|
||||||
'dol_bold',
|
'dol_bold',
|
||||||
'/dol_bold',
|
'dol_bold_disabled',
|
||||||
'dol_double_height',
|
'dol_double_height',
|
||||||
'/dol_double_height',
|
'/dol_double_height',
|
||||||
'dol_double_width',
|
'dol_double_width',
|
||||||
@ -711,6 +712,12 @@ class dolReceiptPrinter extends Printer
|
|||||||
break;
|
break;
|
||||||
case 'DOL_USE_FONT_C':
|
case 'DOL_USE_FONT_C':
|
||||||
$this->printer->setFont(Printer::FONT_C);
|
$this->printer->setFont(Printer::FONT_C);
|
||||||
|
break;
|
||||||
|
case 'DOL_BOLD':
|
||||||
|
$this->printer->setEmphasis(true);
|
||||||
|
break;
|
||||||
|
case 'DOL_BOLD_DISABLED':
|
||||||
|
$this->printer->setEmphasis(false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->printer->text($vals[$tplline]['tag']);
|
$this->printer->text($vals[$tplline]['tag']);
|
||||||
|
|||||||
@ -45,3 +45,5 @@ DOL_ACTIVATE_BUZZER=Activate buzzer
|
|||||||
DOL_PRINT_QRCODE=Print QR Code
|
DOL_PRINT_QRCODE=Print QR Code
|
||||||
DOL_PRINT_LOGO=Print logo of my company
|
DOL_PRINT_LOGO=Print logo of my company
|
||||||
DOL_PRINT_LOGO_OLD=Print logo of my company (old printers)
|
DOL_PRINT_LOGO_OLD=Print logo of my company (old printers)
|
||||||
|
DOL_BOLD=Bold
|
||||||
|
DOL_BOLD_DISABLED=Disable bold
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user