Commit d8a5fa63 authored by Patrick Barroca's avatar Patrick Barroca 🐧

Merge branch 'hotline#84810_st_claude_pb_avec_connecteur_cdscript' into 'hotline'

hotline #84810 cosmogramme integration : remove truncate bar code when saving item

See merge request afi/opacce!2957
parents d51d3710 a6b4bb08
- ticket #84810 : Intégration Cosmogramme : correction de l'enregistrement des long code-barres.
\ No newline at end of file
......@@ -815,7 +815,7 @@ class notice_unimarc extends iso2709_record {
if ($this->controle_codes_barres == 1)
return utf8_encode(addslashes($code_barres));
$cab = substr(trim($code_barres), 0, 20);
$cab = trim($code_barres);
if (is_numeric($code_barres))
return $cab;
......
......@@ -53,4 +53,24 @@ class CdScriptIntegrationLeKiosqueTest extends CdScriptIntegrationTestCase {
public function resumeShouldContainsDecoMagazineAndRevue() {
$this->assertEquals("Revue trimestrielle qui allie l'architecture à la décoration et se veut une publication de référence, d'information et d'orientation.", $this->_deco_magazine->getResume());
}
}
\ No newline at end of file
}
class CdScriptIntegrationStoryPlayrTest extends CdScriptIntegrationTestCase {
protected $_record;
public function setUp() {
parent::setUp();
$this->loadRecordsFromFile('unimarc_storyplayr');
$this->_record = Class_Notice::find(1);
}
/** @test */
public function barCodeShouldBeLonguerThan20Chars() {
$this->assertEquals('d2e2da3c-d88d-4c0e-b109-9c1e429b4b64', $this->_record->getFirstExemplaire()->getCodeBarres());
}
}
This diff is collapsed.
......@@ -671,11 +671,11 @@ class Class_IntProfilDonnees extends Storm_Model_Abstract {
'attributs' =>
[['type_doc' =>
[[ 'code' => '0', 'label' => '', 'zone_995' => '' ],
[ 'code' => '1', 'label' => 'am;na', 'zone_995' => '' ],
[ 'code' => '2', 'label' => 'as', 'zone_995' => ''],
[ 'code' => '3', 'label' => 'i;j', 'zone_995' => ''],
[ 'code' => '4', 'label' => 'g','zone_995' => ''],
[ 'code' => '5', 'label' => 'l;m', 'zone_995' => ''],
[ 'code' => '1', 'label' => '', 'zone_995' => '' ],
[ 'code' => '2', 'label' => '', 'zone_995' => ''],
[ 'code' => '3', 'label' => '', 'zone_995' => ''],
[ 'code' => '4', 'label' => '','zone_995' => ''],
[ 'code' => '5', 'label' => '', 'zone_995' => ''],
[ 'code' => '6', 'label' => '', 'zone_995' => '' ],
[ 'code' => '7', 'label' => '', 'zone_995' => '' ],
[ 'code' => '8', 'label' => '', 'zone_995' => ''],
......@@ -683,6 +683,7 @@ class Class_IntProfilDonnees extends Storm_Model_Abstract {
[ 'code' => '10', 'label' => '', 'zone_995' => 'kio'],
[ 'code' => '11', 'label' => '', 'zone_995' => 'tou'],
[ 'code' => '12', 'label' => '', 'zone_995' => 'art'],
[ 'code' => '13', 'label' => '', 'zone_995' => 'sto'],
],
self::FIELD_ITEM_BARCODE => 'f',
self::FIELD_ITEM_COTE => 'k',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment