|
@@ -602,8 +602,12 @@ class AccountancyExport
|
|
|
$Tab['lib_compte'] = str_pad(self::trunc(dol_string_unaccent($data->subledger_label), 30), 30);
|
|
|
|
|
|
if ($data->doc_type == 'customer_invoice') {
|
|
|
- if (!empty($conf->global->MMI_COMPTA_EXPORT_LIBALPHA_USE_1STLETTER))
|
|
|
- $Tab['lib_alpha'] = strtoupper(str_pad('C'.self::trunc(dol_string_unaccent($data->subledger_label), 1), 6));
|
|
|
+ if (!empty($conf->global->MMI_COMPTA_EXPORT_LIBALPHA_USE_1STLETTER)) {
|
|
|
+ if (substr($Tab['num_compte'], 0, 7)=='0CLIENT')
|
|
|
+ $Tab['lib_alpha'] = strtoupper(str_pad('C'.substr($data->subledger_account, 7, 1), 6));
|
|
|
+ else
|
|
|
+ $Tab['lib_alpha'] = strtoupper(str_pad('C'.self::trunc(dol_string_unaccent($data->subledger_label), 6), 6));
|
|
|
+ }
|
|
|
else
|
|
|
$Tab['lib_alpha'] = strtoupper(str_pad('C'.self::trunc(dol_string_unaccent($data->subledger_label), 6), 6));
|
|
|
$Tab['filler'] = str_repeat(' ', 52);
|