db.alter_column('dae_poste', 'service', self.gf('django.db.models.fields.related.ForeignKey')(null=True, db_column='service', to=orm['rh.Service']))
# Changing field 'Remuneration.montant'
- db.alter_column('dae_remuneration', 'montant', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=9, decimal_places=2, blank=True))
+ db.alter_column('dae_remuneration', 'montant', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=12, decimal_places=2, blank=True))
def backwards(self, orm):
'devise': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'db_column': "'devise'", 'to': "orm['rh.Devise']"}),
'dossier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dae_remunerations'", 'db_column': "'dossier'", 'to': "orm['dae.Dossier']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'montant': ('django.db.models.fields.DecimalField', [], {'default': '0', 'null': 'True', 'max_digits': '9', 'decimal_places': '2', 'blank': 'True'}),
+ 'montant': ('django.db.models.fields.DecimalField', [], {'default': '0', 'null': 'True', 'max_digits': '12', 'decimal_places': '2', 'blank': 'True'}),
'supprime': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'db_column': "'type'", 'to': "orm['rh.TypeRemuneration']"}),
'type_revalorisation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'db_column': "'type_revalorisation'", 'to': "orm['rh.TypeRevalorisation']"}),
if remun.type_remuneration.nature_remuneration != 'Charges' and remun.montant != 0:
devise, created = rh.Devise.objects.get_or_create(code=remun.code_devise)
- rh_remun = rh.Remuneration.objects.create(
- dossier=dossier1,
- type_id=remun.type_remuneration_id,
- type_revalorisation_id=remun.id_type_revalorisation,
- montant=Decimal(str(remun.montant)),
- devise=devise,
- supprime=False,
- date_debut=date_debut,
- date_fin=date_fin
- )
+ try:
+ rh_remun = rh.Remuneration.objects.create(
+ dossier=dossier1,
+ type_id=remun.type_remuneration_id,
+ type_revalorisation_id=remun.id_type_revalorisation,
+ montant=remun.montant,
+ devise=devise,
+ supprime=False,
+ date_debut=date_debut,
+ date_fin=date_fin
+ )
+ except:
+ import pdb; pdb.set_trace()
# Se souvenir de ce type de rémunération
if remun.type_remuneration.type_paiement == u'Régulier':
def forwards(self, orm):
# Changing field 'Remuneration.montant'
- db.alter_column('rh_remuneration', 'montant', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=9, decimal_places=2, blank=True))
+ db.alter_column('rh_remuneration', 'montant', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=12, decimal_places=2, blank=True))
def backwards(self, orm):
'devise': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'db_column': "'devise'", 'to': "orm['rh.Devise']"}),
'dossier': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'rh_remunerations'", 'db_column': "'dossier'", 'to': "orm['rh.Dossier']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'montant': ('django.db.models.fields.DecimalField', [], {'default': '0', 'null': 'True', 'max_digits': '9', 'decimal_places': '2', 'blank': 'True'}),
+ 'montant': ('django.db.models.fields.DecimalField', [], {'default': '0', 'null': 'True', 'max_digits': '12', 'decimal_places': '2', 'blank': 'True'}),
'supprime': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'db_column': "'type'", 'to': "orm['rh.TypeRemuneration']"}),
'type_revalorisation': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'db_column': "'type_revalorisation'", 'to': "orm['rh.TypeRevalorisation']"}),
verbose_name = u"Type de revalorisation",
null=True, blank=True)
montant = models.DecimalField(null=True, blank=True,
- default=0, max_digits=9, decimal_places=2)
+ default=0, max_digits=12, decimal_places=2)
# Annuel (12 mois, 52 semaines, 364 jours?)
devise = models.ForeignKey('Devise', db_column='devise', related_name='+',)
# commentaire = precision